occupywallst.org is looking for Python programmers
just got this from Richard: Justine just...@occupywallst.org told me they are looking for Python programmers. (It involves Django also.) so, if anyone is interested to help them out, please contact Justine. Best wishes Harald -- Harald Armin Massa no fx, no carrier pigeon - -- http://mail.python.org/mailman/listinfo/python-list
[issue5879] multiprocessing - example pool of http servers fails on windows socket has no attribute fromfd
New submission from Harald Armin Massa c...@ghum.de: the example from http://docs.python.org/library/multiprocessing.html?highlight=multiprocessing#module-multiprocessing named # Example where a pool of http servers share a single listening socket # does not work on windows. Reason: s = socket.fromfd(fd, family, type_, proto) in line 156 of reduction.py fails, because fromfd is not available on windows. Sad thing: reduction.py was put into processing.py exactly to solve that problem (i.e. reduction.py is provided as workaround for socket.fromfd not available on windows, from the documentation: if sys.platform == 'win32': import multiprocessing.reduction # make sockets pickable/inheritable the solution within processing was: try: fromfd = socket.fromfd except AttributeError: def fromfd(fd, family, type, proto=0): s = socket._socket.socket() _processing.changeFd(s, fd, family, type, proto) return s but: _multiprocessing has no longer a method changeFd. Harald -- components: Library (Lib) messages: 86810 nosy: ghum severity: normal status: open title: multiprocessing - example pool of http servers fails on windows socket has no attribute fromfd versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5879 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Europython 2006 call for proposals
Hello, I am writing this supporting the Python in Business Track. We are looking for talks proposals concerning the usage of Python in doing business. So, if you have a story to tell... Maybe you have written a webcrawler in Python and founded a search engine? Or you are using Python to organize all those HTTPS-certificates, selling your company and flying to space, all with programming Python? Or are you up to more challenging aspects of daily life, like using Python to organize the ticket sales for a cinema-chain? Or even to do Point-Of-Sale stuff with some retailers? Or you have done something else interesting with Python in your Business? Please, come to EuroPython 2006 and tell others how you got prosperous programming in Python! (Just to remind you: Switzerland is one of the most well known places to take care of your money matters) Did Python give you inspiration to make Javascript suck less? Did you write a famous Python book, got hired by a company and live happily ever after? Cone to CERN, Switzerland, from 3. to 5. July 2006 - tell your story! Learn about Web 2.5 and up at the place Web 0.1-1.0 were developed! Be at the place famous for creating the antimatter to blow up Vatican! Have food in THE cafeteria with the highest likelyhood to queue together with a future or past Nobel Prize winner. Go to www.europython.org - and don't miss the talk submission deadline on 2006-05-31 [on a special note to Italians who are only allowed to travel to conferences with the possibility of recruitment: there will be some highly qualified PyPys at the conference; and just have a look at the timescale of PyPy founding by the European Union] Harald -- http://mail.python.org/mailman/listinfo/python-list
Re: lines of code per functional point
Bryan, at the end of the paper there is a reference to: http://page.mi.fu-berlin.de/~prechelt/documents/jccpp_tr.pdf In chapter 5.6 on page 19 of this publication you can find Figure 10, Displaying program length in comparison. I read the graphics (looking at the yellow boxes) that most of the python programs are quite as small as the smallest 60% of perl programs; where small ist LOC. All progs in that study should have dealt with the same problem, so FP(perl)=FP(Python), and you should be correct with LOC/FP(Python) = LOC/FP(perl) Please also see that they were evaluating Python 1.5.2, which missed some very density improving features as there are esp. list comprehenstions. Harald -- http://mail.python.org/mailman/listinfo/python-list
Re: Cheese Shop: some history for the new-comers
Tim, For most people 'developers' would mean people developing *with* python, not developing python. one of the richest people on earth did define what developers are: http://www.ntk.net/ballmer/mirrors.html people developing with something. So, unless we get /F or BDFL to do an even more astonishing dance proclaiming that people developing Python are developers, not people developing WITH Python, I guess you are quite right. Harald -- http://mail.python.org/mailman/listinfo/python-list
Re: cx_Oracle and UTF8
Gerhard, thanks, that import os os.environ[NLS_LANG] = German_Germany.UTF8 import cx_Oracle con = cx_Oracle.connect(me/[EMAIL PROTECTED]) really helped. At least now the query returns something encoded differently. I dared not to believe that there is no direct encoding change api without touching the environment. Now all that is left is to find out if Oracle indeed has the same opinion what UTF8 should be like. Thank you very much, Harald -- http://mail.python.org/mailman/listinfo/python-list
Re: cx_Oracle and UTF8
Dietz, thank you for your answer. It's called NLS (national language support), and it is like a locale-setting in python/C. I'm too lazy to google right Sad thing: I allready googled that and had to learn: you CAN definitely change some parameters, that is sort order and language for error messages with alter session set NLSREGION and set NLSLANGUAGE The only part about the charset is with NLSLANG, which could be set to German_Germany.UTF8 BUT ... NLSLANG is no per-session parameter, not setable per alter session, it needs to get set within the environment to make SQLPLUS recognize it. (and, I do of course use python not sqlplus= In another of the WWW I learned that NLSLANG has to be set on per connection basis; not on per cursor / session basis; so my primary suspect is cx_Oracle.Connection ... but those objects to not have a visible method with any encoding in it. Harald -- http://mail.python.org/mailman/listinfo/python-list
cx_Oracle and UTF8
Hello, I am looking for a method to convince cx_Oracle and oracle to encode it's replies in UTF8. For the moment I have to... cn=cx_Oracle.connect(user,password, database) cs=cn.Cursor() cs.execute(select column1, column2, column3 from table) for row in cs.fetchall(): t=[] for i in range(0,len(row)): if hasattr(row[i],encode): t.append(row[i].encode(utf8)) else: t.append(row[i]) print t Guess I am to much accustomed to postgresql which just allows set client_encoding='utf8'... Harald -- http://mail.python.org/mailman/listinfo/python-list
Re: Python vs. Lisp -- please explain
OK, but then we should change http://python.org/doc/Summary.html, which starts with Python is an interpreted, interactive, object-oriented programming language. I second this motion. Even tried to persuade the site maintainer before. We should really, really change it. The perceived speed of Python will at least triple on dropping that interpreted - and I am NOT joking. Harald -- http://mail.python.org/mailman/listinfo/python-list
Re: How many web framework for python ?
Bruno, In fact, there are actually too much *good* python web frameworks. I tended to share that opinion, just because there are more web frameworks then keywords in Python. But we should stop thinking of this as a bug; it is a feature. Because everyone and his girlfriend creates an own web framework for Python, we have a clear security advantage over other languages. One ruby on rails worm will bring down at least 2000 web 2.0 beta sites. A worm for a Python web framework will be incompatible with all others. Harald -- http://mail.python.org/mailman/listinfo/python-list
Re: - E04 - Leadership! Google, Guido van Rossum, PSF
Guido at Google: a message in THE public forum c.l.p. A confirmation by Martellibot, that Guido is IN FACT sitting 15m distant from him; and everybody in Python knows where Martellibot has his desk. Can it get more official than this? yeah: a confirmation by Greg Stein @ Google within slashdot, that Guido is working at Google. I am sure that more people in the Python community are reading c.l.p. and /. than the washington post, the people affected have been informed. I guess that's as formal and official as it can get. And concerning Guido, Python, community and leadership: Guido is the designer, the creator of Python. He has nearly unlimeted trust in his design decisions: we all know, that he is THE gifted language designer. His proclamations are accepted because he has proven over time that he knows what's best for the language. Allow me to quote Greg Stein: Ha! Guido would quit in a heartbeat if you tried to make him manage people. That just isn't where he's at. He's absolutely brilliant and loves to write excellent code. Great. We're gonna let him do just that :-) So, Google with their geek-version of the Playboy-Mansion, free massage parleurs, free lunch and dinner and best recruitment tactics on the planet and the known universe will not be able to make Guido manage people. Somehow the Python community managed itself through the years... Python grew healthy and steadily; forked less then usual, inspired other languages and got faster and faster and faster. Maybe only mediocre and less ideas need a great leader. Maybe a great idea can lead for itself? Harald -- GHUM Harald Massa persuadere et programmare Harald Armin Massa Reinsburgstraße 202b 70197 Stuttgart 0173/9409607 -- http://mail.python.org/mailman/listinfo/python-list
Re: Guido at Google
It seems that our master Guido van Rossum had an offer from google and he accepted it!! Isn't Guido-Sans official title BDFL? *wink* whatever, if it's true, congratulations and best wishes. Now there is one *bot and the BDFL at google, we have still 3 bots in the wild, do we? Suggesting to name a Rigobot Harald -- http://mail.python.org/mailman/listinfo/python-list
Re: reddit.com rewritten in Python
Yeah! Another web framework for Python! Now we can prouldy say: Python: the only language with more web frameworks than keywords Harald -- http://mail.python.org/mailman/listinfo/python-list
Re: reddit.com rewritten in Python
Yeah! Another web framework for Python! Now we can proudly say: Python: the only language with more web frameworks than keywords Harald -- http://mail.python.org/mailman/listinfo/python-list
Re: python speed
Dr. Armin Rigo has some mathematical proof, that High Level Languages like esp. Python are able to be faster than low level code like Fortran, C or assembly. I am not wise enough to understand that proof. Maybe I understood those papers totally wrong and he was saying something totally different. But whatever, the pypy-team is formed out of some more people of his calibre and founded by the European Union to provide butter by the fish, say, to produce real code that may deliver that promise. And I could see real development just from watching the BDFL: 3 years ago PyPy was 2000times slower then CPython, and Guido was joking and that number is growing, this year there were not officially negated romours that sometime maybe PyPy could be the reference implementation of Python; and also reports that PyPy is only 18 times slower then CPython. For the time being, my Python programs just sit and wait for database, network, user input or the acting of COM-Applications like Excel or Winword. Sometimes I even have 3 threads, one to wait for user, one for database and one to wait for Excel - boy, I wait fast! But on the other hand, I do no real world applications like triple mersenne first person shooters, only business software like the one which in earlier time was written in COBOL or carved into cave walls. Less challenge, higher reward. Harald -- http://mail.python.org/mailman/listinfo/python-list
Re: python speed
Faster than assembly? LOL... :) why not? Of course, a simple script like copy 200 bytes from left to right can be handoptimized in assembler and run at optimum speed. Maybe there is even a special processor command to do that. I learned that there was one generation of CPUs which had effectively a command to copy X bytes from left to right; but a specific version of that CPU did this command slower then a loop in certain situations. Some newer generations of that CPU and even some competitors CPU had that command implented correctly, and it was indeed faster than the loop. Now: is it rather likely that for a single programm a programmer is able to get it right for all CPUs? It even gets more complicated. The human mind is able to consider a certain amount of things at once, sth. like on-chip-cache or short-term-memory. Now with an ever growing complexity of processors, with cache lines, partyparallelexecution, branchprediction, out of order execution, multilevelcaching, hypermetathreading ... it may be that the usual availaible human brain is no longer capable of really knowing what happens. My guess is that the average code speed of a Rigopy could indeed be higher than the average code speed of the average assembler programmer. Harald -- http://mail.python.org/mailman/listinfo/python-list
Re: Application Plugin Framework
Ron, I'm attempting to develop a plugin framework for an application that I'm working on. I wish to develop something in which all plugins exist in a directory tree. The PIL of the effbot is doing exactly this. (Python Image Library). I know it, because I had to work around that dynamic for freezing it with py2exe :) www.effbot.org, search for PIL There you can find how this problem was solved by the effbot. Guess that should be good enough for mortals. Harald -- http://mail.python.org/mailman/listinfo/python-list
migrate from ZODB 3.3.1 --- to where, and how?
Hello, I am using ZODB standalone in version 3.3.1 within some application. Now I learn that the 3.3.x branch of ZODB is retired. No problem so far, everything is running fine. BUT... retired gives me the hint that nothing GREAT will be done to this branch anymore :) Now I am questioning myself: to which branch should I migrate? Is 3.5 a sure bet, or are uneven subversions a bad sign, making retirement likely? As much as my diggings showed me, the special sign of 3.3 was import ZODB from persistent import Persistent from persistent.list import PersistentList from persistent.mapping import PersistentMapping that PersistentList and PersistenMapping reside within persistent.something, while in the 3.2 branch they reside somewhere else in the namespace. I learned it the hard way that 3.3 filestores not get converted magically or easy to 3.2 :) ... So, my questions: - where should I migrate to? - how is migration done best (especially taking care of old filestores Harald -- http://mail.python.org/mailman/listinfo/python-list
Re: Python vs Ruby
Casey, I have heard, but have not been able to verify that if a program is about 10,000 lines in C++ it is about 5,000 lines in Java and it is about 3,000 lines in Python (Ruby to?) BTW: it is normally only 50 lines in Perl. Not that you could read it, though Harald -- http://mail.python.org/mailman/listinfo/python-list
Re: Python's Performance
Fredrik, but still some very valuable people write: What is Python? Python is an interpreted, interactive, object-oriented programming language. It is often compared to Tcl, Perl, Scheme or Java. taken from http://www.python.org/doc/Summary.html maybe someone could update that??? Harald -- http://mail.python.org/mailman/listinfo/python-list
Re: Dabo in 30 seconds?
Cliff (who has a love/hate relationship with Twisted) wrote: Twisted, for one, can't be used without knowing Python. In fact, without knowing Python quite well. For that matter, it can't easily be used wink. Is using really a verb that is fitting for working with twisted? As much as I read and tried to learn, it is not that you use twisted, but you provide twisted with callbacks so that it uses you? So it is more something about devotion or digestion then simply use, or? Harald -- http://mail.python.org/mailman/listinfo/python-list
Re: PEP on path module for standard library
When you try to 'freeze' an application module, and Jason's 'path' module is present in any of the directories that are looked at by freeze's module finder (your app doesn't have to import it), freeze goes into an infinite loop of imports, eventually getting a 'maximum recursion depth' exception. This seems to be related to freeze getting confused between 'os.path' and Jason's 'path'. This is a bug in distutils. Thomas Hellers py2exe encounters the same bug. As much as I remember our conversation, he submitted a patch to distutils. In the meanwhile I renamed path.py to jpath.py, usings Jason's first letter in a motion of honour while circumventing this bug. Harald -- http://mail.python.org/mailman/listinfo/python-list
Re: PEP on path module for standard library
Having path descend from str/unicode is extremely useful since I can then pass a path object to any function someone else wrote without having to worry about whether they were checking for basestring. I use path.py from Jason to encapsulate a lot of the windows plattform specialities of path dealing. Being able to use path-opjects at every place where I would use str or unicode is very essential, because I often use Python to tame Excel and Word. To open files within these programms needs some plain str as PATH for the file. (which, of course, can also be down by ways to convert PATH to STRING. Harald -- http://mail.python.org/mailman/listinfo/python-list
Re: Considering moving from Delphi to Python [Some questions]
I want some feedback on folllwing: anybody who has experience in writing SOAP servers in Python and data entry heavy web applications. Any suggestions? darkcowherd I have never written SOAP Servers. But I have very very good experience in creating entry heavy web application using Python and Quixote; Webserver Medusa. The current entry forms have at maximum 700 distinct entries, of which groups can be multiplied via XMLHTTPRequest and DOM-Modifikation without page reloading. Speed is great. Because of very slow rendering and various buggies within IE (beast took longer to render then me to deliver) we switched to Firefox. System is performing adequately well and is being constantly extended; Pythons clear structure makes that easy. Hope that helps, Harald -- http://mail.python.org/mailman/listinfo/python-list
Re: How do you program in Python?
Peter, I do all my work using Scite Me too! So, any time I need to test the changes, I hit four keys (which at this point is understandably more like a chord that I hit without direct awareness of it) and I'm done. Sounds pretty close to old-style BASIC and since I've come that route too (in the distant past), this may not be a coincidence. in addition I have set up scite and paths so that F5, the scite run command, invokes python myskript.py, with output given in the scite output area (and saving before) in addition, ctrl+1 does a compile (checking for syntax errors) and exceptions are printed out in the scite output, colourcoded and with double-click on them scite opens the appropriate script at the offending position. VERY quick. Harald -- http://mail.python.org/mailman/listinfo/python-list