How does this scale compared to either JSP or PHP (does PHP even scale?)
Question 2:
What OS does Python run fastest on?
P.S.
Let me clarify, I define scaling as – with a single server (e.g. dual xeon 2.0 GHz) – can this language handle 100 concurrent users? (refer to Question 1 and 2)
I’m not sure question 1 is very apt, as Python is a general-purpose programming language, not designed specifically for web stuff. However, there is a pretty good CGI module, and a decent threading module, so you can write multithreaded web apps.
For #2 it runs fastest on i guess the fastest computer out there
Except in this case the whole server generally runs in a single thread. It uses non-blocking I/O. Actually many services can share this thread, serving all kinds of protocols (think SSH, Telnet, FTP, WebDAV..) with all the customizeability of the Python language.
There are rumors about possible wxPython books to come. I believe that Robin recently mentioned that work on the book was behind schedule. Also, another person had mentioned writing a wxPython book about 6 months back but I haven’t really seen him on the list since…
yes, the documentation for wxPython is less than spectacular, but it is fairly easy to whip up a program with it, and when in doubt, check out the source file(s) for the module(s) in question. There are plenty of examples out there that show different types of apps in wxPython.
The ingame logic systems of MMORPG EveOnline (www.eve-online.com) runs on a version of python. This handles several thousand players on a disitributed server backbone at the same time.
Well, the twisted matrix framework under Python 2.1 can easily handle 100 requests per seconds generated on the same machine (700 MHz Duron) using the Apache Benchmark program (ab). However, the pages requested by ab were rather simple and did not require much cycles for generation. As Python 2.3 is said to be 20 … 30% faster than previous versions your harware should easily be able to serve several houndreds (if not a few thousands — see the thrading limitations of your OS) of simultaneous users — provided it does not take too long to generate the pages in your webapp.
Python isn’t my first choice of programming language, whitespace stuff just doesn’t blend with me, so I prefer Perl for quick prototyping and stuff, but Python gets major respect because Portage is based on it.
Verwenden Sie Gentoo, werden Sie Teil des Vorlagenrennens!! ;D
With slow kit it runs a lot slower on Windows than Linux.
I have two identical machines at work – old Compaq Deskpros 300 MHz and 64 MB RAM. One is running Mandrake Linux the other is running Windows NT. Both have network overheads the Win machine is a Novell client and the Linux machine is a Samba and VNC server. Python apps execute quite fast on the Linux machine but crawl on the NT machine.
On the other hand the same python apps run quite fast on 2GHz Win 2000 and XP machines – whether its just the faster machines, the later win OS’s or a combination of both I don’t know.
As a gentoo user, I have to agree with you on the portage thing. That’s a seriously sweet pkg mgmt system written in python. However, I have to point out that portage relying on phthon is reason behind several major developers leaving the project. I guess no language can make everyone happy. Frankly, the way portage works, I don’t care what it’s written in, it works great. Makes me want to try Python out for myself…
Python is quite good to get people to understand the advantages of functional programming without overwhelming them. For example it has lambdas, map and other nice stuff for lists, lazy evaluation via yield, and so on. Yet you do not have to use functional style, and it does not feel as strange as pure functional languages such as clean or haskell.
With advanced JIT-Compilers like psycho <psycho.sourceforge.net> you can even have quite good performance.
I am not that familiar with python, but so far I love it.
Why would they leave because portage was based on Python? It started that way and as far as I know will continue that way. I have only read about one major split and that was over “management” issues.
I have contemplated creating a ports system based on Perl. I am not sure I want that pain though. : )
And isn’t DrakX (Mandrake’s installer) written in Python (using PyGTK)? I thought I read that somewhere… Is Anaconda OSS? Just curious.
I’ve found for most simple GUI programing tasks, Python and PyGTK are absolutly wonderful. It makes perfect sense to use pygtk for management tools on Linux, cause most of the time, your just editing text files…
Interesting you bring up the functional programming stuff. For too long, people have stayed away from it because of all the lambda mysticism. But now my friends are really receptive to it, because Pythonistas like David Mertz try to show when it’s the most natural solution and when it’s not.
The short answer for the fork was “management”. But, IIRC, The first major developer or two to leave was over portage. They felt it should be rewritten in C++.
“Further, the current implementation language (Python) is not well-suited for many embedded systems; a rewrite in a lower level language (e.g. C/C++) will eventually be required to reach all targeted platforms. There are documented cultural and political biases against this solution, see the footnotes for Geert Bevin’s account of his departure from Gentoo over this very issue. This particular issue alone can likely not be resolved to the embedded project’s satisfaction in Gentoo.”
This makes sense for him. He wants to take Gentoo in an embedded direction. By rewriting he might get some speed, and would be able to drop a python implementation.
Personally, I’m fine with portage as it is. I was just pointing out that python is the source of frustration and argument amongst some in the community.
I had a good friend who is an amazing C++ guy. A couple years ago I told him about Python and I got the “ugh whitespace” issue. I let it drop. About 6 months ago he sends me an email to tell me about this really cool language called Python. I just grinned.
I want to learn wxpython because Tkinter don’t have a good native look and feel.
I agree, Tkinter looks out of place (like a turd in the punch bowl). wxWindows is an excellent alternative. I have heard some people complaining about the documentation, but if you use the sample application and the wxWindows documentation, and if you are familiar with another lanugage, you shouldn’t have any trouble at all understanding wxPython.
The problem of wxpython is that it wraps wxwindows and the documentation of wxwindows is c++ oriented (wxwindows is written in c++)
What do you think about it ?
I didn’t have any problems with it. The C++ syntax is a little different, but the paramaters you pass are the same, so it really doesn’t matter.
The whole whitespace issue is funny to me. Just about every piece of source code I have ever seen, be it html or c++, its all nicely formatted with tabs and such…whitespace. I assume its because it makes the code easier to read and deal with. In response to that, I have heard many people say something along the lines of, “..well yeah, but Python FORCES you to do it..I don’t like ‘restrictions'”. Hehe. That’s taking the notions of freedom a bit far, if you ask me. Sure, I will admit, Python doesn’t allow you to make crappily formatted code. So I suppose it’s kinda noble to fight for the right to write long bits of code on one line, or have no sense to the way you put your code down. Jeez.. whatever. The only time the whitespace issue has ever irked me is when I was first learning Python and was using lots of other peoples code to reference. I’d try to copy/paste some code from a browser, and run into issues. But ya know what? The solution is simple…write your own code! Hehe.
As far as doing GUI with python, wxPython is wonderful. Works very well when you need to be able to have your app run on mulitple platforms. But when crossplatform isn’t an issue, I prefer the Be API via Bethon
Question 1:
How does this scale compared to either JSP or PHP (does PHP even scale?)
Question 2:
What OS does Python run fastest on?
P.S.
Let me clarify, I define scaling as – with a single server (e.g. dual xeon 2.0 GHz) – can this language handle 100 concurrent users? (refer to Question 1 and 2)
THANKS
python is not only used for jsp- and php- like problems. it is a general purpose language, unlike jsp and php.
I’m not sure question 1 is very apt, as Python is a general-purpose programming language, not designed specifically for web stuff. However, there is a pretty good CGI module, and a decent threading module, so you can write multithreaded web apps.
For #2 it runs fastest on i guess the fastest computer out there
I don’t know but Yahoo! is using it…
http://public.yahoo.com/~radwin/talks/yahoo-phpcon2002.htm
Got it and playing with it. Er, Python folks, PYTHON!
Thanks !
Most of the time a take a look at the python web site because I knew it was comming soon but this time, I knew it first on OSnews.
I think most people here have checked this out before, but just for you Mr. nonymous
http://www.zope.org/
http://www.plone.org/ <- a zope addon
If you haven’t checked out zope, do so. Powered by python.
One of the reasons that I love python is that everybody likes it (except perl fans but they don’t hate python).
Normally, in forums, there is always flame wars but in python forums its always love and tips.
Another Python package for web-based authoring:
http://twistedmatrix.com/
Except in this case the whole server generally runs in a single thread. It uses non-blocking I/O. Actually many services can share this thread, serving all kinds of protocols (think SSH, Telnet, FTP, WebDAV..) with all the customizeability of the Python language.
See this article for a code-based introduction:
http://www-106.ibm.com/developerworks/linux/library/l-twist1.html
I want to learn wxpython because Tkinter don’t have a good native look and feel.
The problem of wxpython is that it wraps wxwindows and the documentation of wxwindows is c++ oriented (wxwindows is written in c++)
What do you think about it ?
There are rumors about possible wxPython books to come. I believe that Robin recently mentioned that work on the book was behind schedule. Also, another person had mentioned writing a wxPython book about 6 months back but I haven’t really seen him on the list since…
Well, Google uses a lot of Python as well for cluster, bot and etc. Check: http://www.google.com/jobs/ -> Engineering, Operations & IT
list comprehensions
concurrent assignment
python roXorz!
yes, the documentation for wxPython is less than spectacular, but it is fairly easy to whip up a program with it, and when in doubt, check out the source file(s) for the module(s) in question. There are plenty of examples out there that show different types of apps in wxPython.
See http://naumen.ru/ for information.
The ingame logic systems of MMORPG EveOnline (www.eve-online.com) runs on a version of python. This handles several thousand players on a disitributed server backbone at the same time.
Well, the twisted matrix framework under Python 2.1 can easily handle 100 requests per seconds generated on the same machine (700 MHz Duron) using the Apache Benchmark program (ab). However, the pages requested by ab were rather simple and did not require much cycles for generation. As Python 2.3 is said to be 20 … 30% faster than previous versions your harware should easily be able to serve several houndreds (if not a few thousands — see the thrading limitations of your OS) of simultaneous users — provided it does not take too long to generate the pages in your webapp.
/dev/ELF
Python isn’t my first choice of programming language, whitespace stuff just doesn’t blend with me, so I prefer Perl for quick prototyping and stuff, but Python gets major respect because Portage is based on it.
Verwenden Sie Gentoo, werden Sie Teil des Vorlagenrennens!! ;D
No one translate that… 😮
“Question 2:
What OS does Python run fastest on?”
With slow kit it runs a lot slower on Windows than Linux.
I have two identical machines at work – old Compaq Deskpros 300 MHz and 64 MB RAM. One is running Mandrake Linux the other is running Windows NT. Both have network overheads the Win machine is a Novell client and the Linux machine is a Samba and VNC server. Python apps execute quite fast on the Linux machine but crawl on the NT machine.
On the other hand the same python apps run quite fast on 2GHz Win 2000 and XP machines – whether its just the faster machines, the later win OS’s or a combination of both I don’t know.
“See http://naumen.ru/ for information.”
Personally, that link doesn’t give me a whole lot of info :o)
english link, perhaps?
http://www.naumen.com/go
As a gentoo user, I have to agree with you on the portage thing. That’s a seriously sweet pkg mgmt system written in python. However, I have to point out that portage relying on phthon is reason behind several major developers leaving the project. I guess no language can make everyone happy. Frankly, the way portage works, I don’t care what it’s written in, it works great. Makes me want to try Python out for myself…
-b
Python is quite good to get people to understand the advantages of functional programming without overwhelming them. For example it has lambdas, map and other nice stuff for lists, lazy evaluation via yield, and so on. Yet you do not have to use functional style, and it does not feel as strange as pure functional languages such as clean or haskell.
With advanced JIT-Compilers like psycho <psycho.sourceforge.net> you can even have quite good performance.
I am not that familiar with python, but so far I love it.
Why would they leave because portage was based on Python? It started that way and as far as I know will continue that way. I have only read about one major split and that was over “management” issues.
I have contemplated creating a ports system based on Perl. I am not sure I want that pain though. : )
Everybody’s been mentioning Gentoo’s portage… but Red Hat has written several of its management tools in Python…most notably their Anaconda installer
And isn’t DrakX (Mandrake’s installer) written in Python (using PyGTK)? I thought I read that somewhere… Is Anaconda OSS? Just curious.
I’ve found for most simple GUI programing tasks, Python and PyGTK are absolutly wonderful. It makes perfect sense to use pygtk for management tools on Linux, cause most of the time, your just editing text files…
Just my thoughts…
Interesting you bring up the functional programming stuff. For too long, people have stayed away from it because of all the lambda mysticism. But now my friends are really receptive to it, because Pythonistas like David Mertz try to show when it’s the most natural solution and when it’s not.
The short answer for the fork was “management”. But, IIRC, The first major developer or two to leave was over portage. They felt it should be rewritten in C++.
http://osnews.com/story.php?news_id=3892
http://www.zynot.org/info/fork.html
In Zach Welch’s fork announcement, he stated,
“Further, the current implementation language (Python) is not well-suited for many embedded systems; a rewrite in a lower level language (e.g. C/C++) will eventually be required to reach all targeted platforms. There are documented cultural and political biases against this solution, see the footnotes for Geert Bevin’s account of his departure from Gentoo over this very issue. This particular issue alone can likely not be resolved to the embedded project’s satisfaction in Gentoo.”
This makes sense for him. He wants to take Gentoo in an embedded direction. By rewriting he might get some speed, and would be able to drop a python implementation.
Personally, I’m fine with portage as it is. I was just pointing out that python is the source of frustration and argument amongst some in the community.
-bogey
I had a good friend who is an amazing C++ guy. A couple years ago I told him about Python and I got the “ugh whitespace” issue. I let it drop. About 6 months ago he sends me an email to tell me about this really cool language called Python. I just grinned.
I want to learn wxpython because Tkinter don’t have a good native look and feel.
I agree, Tkinter looks out of place (like a turd in the punch bowl). wxWindows is an excellent alternative. I have heard some people complaining about the documentation, but if you use the sample application and the wxWindows documentation, and if you are familiar with another lanugage, you shouldn’t have any trouble at all understanding wxPython.
The problem of wxpython is that it wraps wxwindows and the documentation of wxwindows is c++ oriented (wxwindows is written in c++)
What do you think about it ?
I didn’t have any problems with it. The C++ syntax is a little different, but the paramaters you pass are the same, so it really doesn’t matter.
The whole whitespace issue is funny to me. Just about every piece of source code I have ever seen, be it html or c++, its all nicely formatted with tabs and such…whitespace. I assume its because it makes the code easier to read and deal with. In response to that, I have heard many people say something along the lines of, “..well yeah, but Python FORCES you to do it..I don’t like ‘restrictions'”. Hehe. That’s taking the notions of freedom a bit far, if you ask me. Sure, I will admit, Python doesn’t allow you to make crappily formatted code. So I suppose it’s kinda noble to fight for the right to write long bits of code on one line, or have no sense to the way you put your code down. Jeez.. whatever. The only time the whitespace issue has ever irked me is when I was first learning Python and was using lots of other peoples code to reference. I’d try to copy/paste some code from a browser, and run into issues. But ya know what? The solution is simple…write your own code! Hehe.
As far as doing GUI with python, wxPython is wonderful. Works very well when you need to be able to have your app run on mulitple platforms. But when crossplatform isn’t an issue, I prefer the Be API via Bethon