Showing posts with label python. Show all posts
Showing posts with label python. Show all posts

Monday, February 3, 2014

Pycharm 3.02 on OpenIndiana

The IDE


Working on the Ajax module of Brython (and multilingual documentation)

Requirements


PyCharm, the free community edition and the professional versions simply require a Java JDK. I use the Oracle (Sun) JDK7 on OpenIndiana.

Installation


The only challenge is downloading the tar.gz file. By faking the user agent to firefox for linux, the download link appears:

Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0

Then it's a matter of gunzip and tar -xvf and moving the directory to /opt and running pycharm.sh in the bin folder.

Francois
@f_dion

Tuesday, July 23, 2013

OI: Python modules that need cc

Tempting


So, it is always tempting to be at the latest greatest of some software. For example, Sun (Solaris) Studio 12 update 3 is freely available to download. But sometimes the latest will leave you with some head scratching.

Python modules


Some Python modules require a C compiler in order to provide a faster runtime, or even to install at all. Numpy is one such module. It provides superb capabilities in Python, but even doing:

# pip install numpy

It will still invoke the C compiler. Due to how the Python interpreter was compiled on OpenIndiana, by using the latest compiler (installed, say, in /opt/solarisstudio12.3), your install will fail. Using the Sun Studio in the opensolaris.org repository (yes, the old 12.1), things work great, as it is installed in /opt/sunstudio12.1

So if you encounter a failed install of a Python module under OpenIndiana, there is a good chance you hit the above problem.

François
@f_dion


Friday, June 14, 2013

dtrace with Python

dtrace: Python instrumentation

...where time becomes a loop

Last year, I mentionned that it was time for the Python community to embrace dtrace. I've gotten questions left and right, at user groups, through email etc as to what is dtrace and how it ties in with Python.


This week, a few posts on the Argentinian and Venezuelan Python lists on debugging Python and a total absence of a mention of dtrace and I knew I had to do a writeup. But before we get into the details, let's step back a bit.

Head over to my Python blog to read the rest of the article.

François
@f_dion

Friday, September 14, 2012

Netscape, Sun, Oracle. No, Heliod web server

Back in the days, the netscape web server (at some point branded iPlanet) was the reference for web serving. Of course, came Apache (a collection of patches to NSCA's HTTPs hence: a "patchy" server...). We are talking the 90s here to put things in perspective. I stuck to Apache for a while while IIS was being deployed all around me.

iPlanet

Although I felt a special attachment to Apache, knowing personally some of the original contributors (like Brian Behlendorf), I started doing speed comparisons, benchmarks, and the best performance I could get on my servers was from the iPlanet server. In the early 2000s this was known as Sun One Web Server and that's when I switched. Then the Java buzzword started infecting everything, including that web server, and ended up with the name Sun Java System Web Server. The web server part had no Java in it, but the bundled app server module did of course, along with the fancy web interface that was generated by that module.

The story doesn't end there however. Somebody (thank you, whoever you are) figured that before something bad happened to Sun, it would be wise to open source the server. Hence appeared the Open Web Server. You can read Joerg's blog comment on this here at c0t0d0s0.org

I grabbed all the resources that I could related to it, in case, tried to compile it, but the barrier to entry was high in term of the number of libraries. Still, I figured that I'd wait for the project to get some momentum before switching.

How wise that proved to be to open source the server... Soon after, Oracle bought Sun, closed most open source projects, and rebranded yet again the web server, now calling it Oracle iPlanet Web Server. It is now almost impossible to download, as it is hidden in the Fusion middleware cluster on Oracle's cloud delivery. It is mostly pushed by Oracle as a simple reverse proxy for weblogic.

Performance


Of course, with Oracle's approach, one would probably be wise to jump ship. But on a server with sufficient RAM (if you have a very low RAM scenario, lighttpd works well), it is the best performing of the current breed. I'm not talking about Apache. After all, it is 20 years old, so I expect something more recent to be faster. No, I'm talking about faster than lighttpd, faster than Cherokee. So I started again down the path of getting a stable build of Open Web Server last month. I want the performance, but I'd like the flexibility of having the source to figure out specific issues.

Made my day

Today, I got a nice surprise in my email from Dave Koelmeyer to the OpenIndiana discussion list:

Not related to OpenIndiana, but I thought it interesting stumbling across
this today: the open source guts of the "Sun Java System" web server
product which Oracle apparently swept under the carpet (the open source
bits that is, not the proprietary, rebranded offering).

http://173.255.252.27/jyri/articles/index.php/web-server/

That's pretty exciting news! There's even a sourceforge page: http://sourceforge.net/projects/heliod/ The name is Heliod

The future

I think I'll be running this web server pretty soon. A web interface to manage the complex configuration would probably be a good addition to it for those that are new to it, and if I get some time, I'll write one in Python (with web.py). I'll probably propose that project to our local Python User Group (PYPTUG).