Re: Meetup in "Rapid prototyping in business & social networking in python"

2008-10-01 Thread Victor Bay
Hi, pythoners, I am planning a face-to-face meetup on RAD with python: http://python.meetup.com/190/ Depends on the time commitment frame of python developers, we meet monthly, weekly, or even daily, at convenient place like coffee society, library, bookstore, ..., etc. I will also be trying to

Re: decent interactive python shell on MS Windows?

2008-10-01 Thread Todd Whiteman
[EMAIL PROTECTED] wrote: Hi everyone, After having used Python on Linux for some time, I now have to do Python coding on Windows. I am big fan of the interactive Python shell to test, eg, regexps. Is there an interactive Python shell on Windows that supports: - easy copy-pasting to/from an edi

Re: Event-driven framework (other than Twisted)?

2008-10-01 Thread Phillip B Oldham
On Oct 1, 6:53 pm, Lie Ryan <[EMAIL PROTECTED]> wrote: > In fact, MVC and event-driven is two entirely different concept. You can > have both, or none. It is, in the end, your choice which one to use or > whether you want to use both or none. > > Event-driven programming is a concept that your prog

Re: Are there any python micro-frameworks (like ruby's Camping)?

2008-10-01 Thread Fred Pacquier
Phillip B Oldham <[EMAIL PROTECTED]> said : > On Oct 1, 10:29 am, Michele Simionato <[EMAIL PROTECTED]> > wrote: >> How about wsgiref in the standard library? It is as small as you can >> get without resorting to CGI. > > Interesting... I'll be sure to check that out also. > > Someone also menti

Re: Peek inside iterator (is there a PEP about this?)

2008-10-01 Thread Aaron "Castironpi" Brady
On Oct 1, 9:46 am, Luis Zarrabeitia <[EMAIL PROTECTED]> wrote: > Hi there. > > For most use cases I think about, the iterator protocol is more than enough. > However, on a few cases, I've needed some ugly hacks. > > Ex 1: > > a = iter([1,2,3,4,5]) # assume you got the iterator from a function and >

Re: decent interactive python shell on MS Windows?

2008-10-01 Thread Jason Scheirer
On Oct 1, 9:53 am, [EMAIL PROTECTED] wrote: > Hi everyone, > > After having used Python on Linux for some time, I now have to do > Python coding on Windows. I am big fan of the interactive Python shell > to test, eg, regexps. > > Is there an interactive Python shell on Windows that supports: > > -

Re: How to emit UTF-8 from console mode?

2008-10-01 Thread Martin v. Löwis
> But what are we doing here? Can you convince me that we are emitting UTF-8? Most definitely not. We are emitting cp1251. > I need UTF-8 because I need to experiment with some OS function calls that > give me UTF-16 and I need to emit UTF-16 or UTF-8. Try setting the code page to 65001, and e

Re: decent interactive python shell on MS Windows?

2008-10-01 Thread james . kirin39
On Oct 1, 3:10 pm, Jason Scheirer <[EMAIL PROTECTED]> wrote: > On Oct 1, 9:53 am, [EMAIL PROTECTED] wrote: > > > > > Hi everyone, > > > After having used Python on Linux for some time, I now have to do > > Python coding on Windows. I am big fan of the interactive Python shell > > to test, eg, regex

Re: decent interactive python shell on MS Windows?

2008-10-01 Thread Stef Mientki
Jason Scheirer wrote: On Oct 1, 9:53 am, [EMAIL PROTECTED] wrote: Hi everyone, After having used Python on Linux for some time, I now have to do Python coding on Windows. I am big fan of the interactive Python shell to test, eg, regexps. Is there an interactive Python shell on Windows that

TypeError: can't pickle HASH objects?

2008-10-01 Thread est
>>> import md5 >>> a=md5.md5() >>> import pickle >>> pickle.dumps(a) Traceback (most recent call last): File "", line 1, in File "C:\Python25\lib\pickle.py", line 1366, in dumps Pickler(file, protocol).dump(obj) File "C:\Python25\lib\pickle.py", line 224, in dump self.save(obj) Fil

Re: Peek inside iterator (is there a PEP about this?)

2008-10-01 Thread Terry Reedy
Luis Zarrabeitia wrote: Hi there. For most use cases I think about, the iterator protocol is more than enough. However, on a few cases, I've needed some ugly hacks. Ex 1: a = iter([1,2,3,4,5]) # assume you got the iterator from a function and b = iter([1,2,3]) # these two are just exampl

Re: How to give a global variable to a function which is in a module?

2008-10-01 Thread Terry Reedy
Kurda Yon wrote: Hi, I would like to declare a global variable, which is seen to a particular function. If I do as the following it works: x = 1 def test(): global x print x return 1 If you are just reading x, the global statement does nothing and is not needed. However, it does not

Re: string concatenate

2008-10-01 Thread Terry Reedy
sandric ionut wrote: I have the following situation: nameAll = [] for i in range(1,10,1): n = "name" + str([i]) nameAll += n print nameAll nameAll = [] for i in range(1,11): n = "name" + str(i) nameAll.append(n) print(' '.join(nameAll)) #3.0 #prints name1 na

Socket Question

2008-10-01 Thread Ali Hamad
Hello All : A socket question from a networking newbie. I need to create a server that: 1) receive a message from client. 2) check that message and response to it. 3) the client get the server message and send another message. 4) finally, the server receive the message and close the connection.

why? __builtins__ key added from eval

2008-10-01 Thread William Purcell
I want to use eval to evaluate wx.TextCtrl inputs. How can I keep python from adding the __builtins__ key to mydict when I use it with eval? Other wise I have to __delitem__('__builtins__') everytime I use eval? >>> mydict = {'a':2,'b':3} >>> eval('a*b',mydict) 6 >>> mydict {'a': 2, '__builtins__'

Re: [Tutor] Replacing cmd.exe with custom .py application

2008-10-01 Thread Tim Golden
Ezra Taylor wrote: Is there something similar to /dev/null on Windows? NUL: TJG -- http://mail.python.org/mailman/listinfo/python-list

Tkinter on WIndows XP opens a blank screen. How can I get rid of it?

2008-10-01 Thread dudeja . rajat
Hi, I m using Tkinter and Tix to create a GUI on Windows XP. So far I've created the GUI and it just works. But the problem is as soon as I double click on the script it besides opening the GUI also opens a shell ( a blank screen) with it. Pleas suggest how can I get rid of this blank screen.

Re: What is not objects in Python?

2008-10-01 Thread Boris Borcic
42, for instance. Proof : >>> 42 is not object True QED -- http://mail.python.org/mailman/listinfo/python-list

RE: decent interactive python shell on MS Windows?

2008-10-01 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of > [EMAIL PROTECTED] > Sent: Wednesday, October 01, 2008 12:54 PM > To: [email protected] > Subject: decent interactive python shell on MS Windows? > Is there an interactive Python shell

Re: TypeError: can't pickle HASH objects?

2008-10-01 Thread mdsherry
On Oct 1, 3:50 pm, est <[EMAIL PROTECTED]> wrote: > >>> import md5 > >>> a=md5.md5() > >>> import pickle > >>> pickle.dumps(a) > > Traceback (most recent call last): >   File "", line 1, in >   File "C:\Python25\lib\pickle.py", line 1366, in dumps >     Pickler(file, protocol).dump(obj) >   File "

Re: Socket Question

2008-10-01 Thread Leon Zhang
Maybe you need to close the socket somewhere else, rather than to close it when you receive the your response. On Tue, Sep 30, 2008 at 7:01 AM, Ali Hamad <[EMAIL PROTECTED]> wrote: > Hello All : > > A socket question from a networking newbie. I need to create > a server that: > > 1) receive a me

Re: Tkinter on WIndows XP opens a blank screen. How can I get rid of it?

2008-10-01 Thread Chris Rebert
Run your script using pythonw.exe instead of python.exe ; it doesn't open a console window and exists for this exact purpose. Cheers, Chris Rebert On Sep 30, 2008, at 1:28 PM, [EMAIL PROTECTED] wrote: Hi, I m using Tkinter and Tix to create a GUI on Windows XP. So far I've created the GU

Re: Socket Question

2008-10-01 Thread [EMAIL PROTECTED]
Maybe you need to close the socket somewhere else, rather than to close it when you receive the your response. On 9月30日, 上午7时01分, Ali Hamad <[EMAIL PROTECTED]> wrote: > Hello All : > > A socket question from a networking newbie. I need to create > a server that: > > 1) receive a message from clien

docstrings => RestructuredText => Sphinx => Nice html docs (?)

2008-10-01 Thread Infinity77
Hi All, I apologize in advance if my question sounds dumb. I googled back and forth but my google-fu today is not working very well... I have seen the new style Python html documentation, which is extremely nice, and by reading here and there I have seen that it has been generated using Georg

Are there any free source for matrix diagonalization?

2008-10-01 Thread Kurda Yon
Hi, Does Python have a free source community for the numerical problems coding? I mean, are there some web-sites where I could find a free code for such problems like calculation of eigenvectors and eigenvalues of matrices? Thank you! -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter on WIndows XP opens a blank screen. How can I get rid of it?

2008-10-01 Thread Jerry Hill
On Wed, Oct 1, 2008 at 5:02 PM, Chris Rebert <[EMAIL PROTECTED]> wrote: > Run your script using pythonw.exe instead of python.exe ; it doesn't open a > console window and exists for this exact purpose. In particular, you can just rename your script from "myscript.py" to "myscript.pyw". Then when

Re: Are there any free source for matrix diagonalization?

2008-10-01 Thread Terry Reedy
Kurda Yon wrote: Hi, Does Python have a free source community for the numerical problems coding? I mean, are there some web-sites where I could find a free code for such problems like calculation of eigenvectors and eigenvalues of matrices? Did you try searching, say with Google? "Python numer

Re: Are there any free source for matrix diagonalization?

2008-10-01 Thread Tim Daneliuk
Kurda Yon wrote: > Hi, > > Does Python have a free source community for the numerical problems > coding? I mean, are there some web-sites where I could find a free > code for such problems like calculation of eigenvectors and > eigenvalues of matrices? > > Thank you! Try here: http://numpy.scip

megarotic - Free

2008-10-01 Thread Albertos
megarotic . . . ***CLICK HERE http://vids365.cn/megarotic * . . . . . . . . . . . . megarotic -- http://mail.python.org/mailman/listinfo/python-list

megarotic ip - Free

2008-10-01 Thread Albertos
megarotic ip . . . ***CLICK HERE http://vids365.cn/megarotic-ip * . . . . . . . . . . . . megarotic ip -- http://mail.python.org/mailman/listinfo/python-list

megarotic rar - Free

2008-10-01 Thread Albertos
megarotic rar . . . ***CLICK HERE http://vids365.cn/megarotic-rar * . . . . . . . . . . . . megarotic rar -- http://mail.python.org/mailman/listinfo/python-list

megarotic hot - Free

2008-10-01 Thread Albertos
megarotic hot . . . ***CLICK HERE http://vids365.cn/megarotic-hot * . . . . . . . . . . . . megarotic hot -- http://mail.python.org/mailman/listinfo/python-list

www megarotic - Free

2008-10-01 Thread Albertos
www megarotic . . . ***CLICK HERE http://vids365.cn/www-megarotic * . . . . . . . . . . . . www megarotic -- http://mail.python.org/mailman/listinfo/python-list

www megarotic - Free

2008-10-01 Thread Albertos
www megarotic . . . ***CLICK HERE http://vids365.cn/www-megarotic * . . . . . . . . . . . . www megarotic -- http://mail.python.org/mailman/listinfo/python-list

megarotic pass - Free

2008-10-01 Thread Albertos
megarotic pass . . . ***CLICK HERE http://vids365.cn/megarotic-pass * . . . . . . . . . . . . megarotic pass -- http://mail.python.org/mailman/listinfo/python-list

megarotic login - Free

2008-10-01 Thread Albertos
megarotic login . . . ***CLICK HERE http://vids365.cn/megarotic-login * . . . . . . . . . . . . megarotic login -- http://mail.python.org/mailman/listinfo/python-list

megarotic asian - Free

2008-10-01 Thread Albertos
megarotic asian . . . ***CLICK HERE http://vids365.cn/megarotic-asian * . . . . . . . . . . . . megarotic asian -- http://mail.python.org/mailman/listinfo/python-list

Searching for Happiness

2008-10-01 Thread kaka
Excuse me!! Would you stop for a moment?! O...man...Haven't you thought-one day- about yourself ? Who has made it? Have you seen a design which hasn't a designer ?! Have you seen a wonderful,delicate work without a worker ?! It's you and the whole universe!.. Who has made them all ?!! You know who

Database GUI generation from schema

2008-10-01 Thread Eric Wertman
Sorry if this is misplaced, but I could have sworn I saw a link on this list to a package that would auto-generate data entry type forms from a database schema, similar to django's auto-admin interface. Does anyone recall a package like that? I did some searching, but I've only found documentatio

Re: How to emit UTF-8 from console mode?

2008-10-01 Thread Ross Ridge
> I need UTF-8 because I need to experiment with some OS function calls that > give me UTF-16 and I need to emit UTF-16 or UTF-8. <[EMAIL PROTECTED]> wrote: >Try setting the code page to 65001, and emit the UTF-8 explicitly. Hmm... apparently that's not allowed on Windows XP: C:\> chcp 65001 Ac

megarotic - Free2

2008-10-01 Thread wugivensnolan
megarotic . . . ***CLICK HERE http://vids365.cn/megarotic * . . . . . . . . . . . . megarotic -- http://mail.python.org/mailman/listinfo/python-list

Re: Event-driven framework (other than Twisted)?

2008-10-01 Thread James Mills
On Wed, Oct 1, 2008 at 6:01 PM, Phillip B Oldham <[EMAIL PROTECTED]> wrote: > Are there any python event driven frameworks other than twisted? Phillip, I have been developing a rather unique event-driven and component architecture library for quite some time that is (not twisted). Actually it's no

Re: Event-driven framework (other than Twisted)?

2008-10-01 Thread James Mills
On Wed, Oct 1, 2008 at 6:55 PM, Phillip B Oldham <[EMAIL PROTECTED]> wrote: > I've noticed that. I'm thinking more for a web environment (instead of > MVC) or as a HTTP server. I know Twisted has TwistedWeb, but I'm > looking for alternatives. Again with pymills, here's an alternative: http://hg.

Re: Event-driven framework (other than Twisted)?

2008-10-01 Thread James Mills
On Thu, Oct 2, 2008 at 2:09 AM, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > "view" doesn't imply (x)html - any valid HTTP response is ok. The whole > point of decoupling controler from view (in web MVC) is to allow the same > controler to return different views. There is an alternative to the

Re: Peek inside iterator (is there a PEP about this?)

2008-10-01 Thread Luis Zarrabeitia
On Wednesday 01 October 2008 01:14:14 pm Peter Otten wrote: > Luis Zarrabeitia wrote: > > a = iter([1,2,3,4,5]) # assume you got the iterator from a function and > > b = iter([1,2,3]) # these two are just examples. > > Can you provide a concrete use case? I'd like to... but I've refactored awa

Re: Python arrays and sting formatting options

2008-10-01 Thread Paul Probert
Grant Edwards wrote: > On 2008-09-30, Peter Pearson <[EMAIL PROTECTED]> wrote: >> On Tue, 30 Sep 2008 00:04:18 +0200, Ivan Rebori wrote: >>> 1. Multi dimensional arrays - how do you load them in python >>> For example, if I had: >>> --- >>> 1 2 3 >>> 4 5 6 >>> 7 8 9 >>> >>> 10 11 12 >>> 13 14 1

Re: How to emit UTF-8 from console mode?

2008-10-01 Thread Mark Tolonen
"Ross Ridge" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I need UTF-8 because I need to experiment with some OS function calls that give me UTF-16 and I need to emit UTF-16 or UTF-8. <[EMAIL PROTECTED]> wrote: Try setting the code page to 65001, and emit the UTF-8 explicitly

Re: docstrings => RestructuredText => Sphinx => Nice html docs (?)

2008-10-01 Thread Benjamin
On Oct 1, 4:10 pm, Infinity77 <[EMAIL PROTECTED]> wrote: > Hi All, > >     I apologize in advance if my question sounds dumb. I googled back > and forth but my google-fu today is not working very well... > I have seen the new style Python html documentation, which is > extremely nice, and by readin

Re: How to emit UTF-8 from console mode?

2008-10-01 Thread Mark Tolonen
"Siegfried Heintze" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Make sure you are using the Lucida Console font for the cmd.exe window and type the commands: chcp 1251 python -c "print ''.join(unichr(i) for i in range(0x410,0x431))" Output: ?

Re: Socket Question

2008-10-01 Thread Mark Tolonen
"Ali Hamad" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hello All : A socket question from a networking newbie. I need to create a server that: 1) receive a message from client. 2) check that message and response to it. 3) the client get the server message and send another me

Re: Peek inside iterator (is there a PEP about this?)

2008-10-01 Thread Aaron "Castironpi" Brady
On Oct 1, 3:14 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: > Luis Zarrabeitia wrote: > > Hi there. > > > For most use cases I think about, the iterator protocol is more than enough. > > However, on a few cases, I've needed some ugly hacks. > > > Ex 1: > > > a = iter([1,2,3,4,5]) # assume you got the

Re: TypeError: can't pickle HASH objects?

2008-10-01 Thread Aaron "Castironpi" Brady
On Oct 1, 2:50 pm, est <[EMAIL PROTECTED]> wrote: > >>> import md5 > >>> a=md5.md5() > >>> import pickle > >>> pickle.dumps(a) > > Traceback (most recent call last): >   File "", line 1, in >   File "C:\Python25\lib\pickle.py", line 1366, in dumps >     Pickler(file, protocol).dump(obj) >   File "

RELEASED Python 2.6 final

2008-10-01 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team and the Python community, I am happy to announce the release of Python 2.6 final. This is the production-ready version of the latest in the Python 2 series. There are many new features and modules, impro

Re: RELEASED Python 2.6 final

2008-10-01 Thread Michele Simionato
On Oct 2, 5:46 am, Barry Warsaw <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On behalf of the Python development team and the Python community, I   > am happy to announce the release of Python 2.6 final. Cool! I have just downloaded the Mac installer and did the

index all instances by id - a memory leak?

2008-10-01 Thread Dan Barbus
Hi all, I'm a python beginner, and I have a problem with no solution I can see: I want to index all instances of an object by an internal id (not the hash) and be able to retrieve them later. I created a class-level dictionary (Item._itemById) where I add every new instance. My problem is: How

Re: index all instances by id - a memory leak?

2008-10-01 Thread Dan Barbus
On Oct 2, 7:54 am, Dan Barbus <[EMAIL PROTECTED]> wrote: > >     def getItemById(id): >         return _itemsById[id] I just saw that this won't compile. Still, ignoring this, I thing the purpose of the code is pretty clear. Thanks for any feedback. -- http://mail.python.org/mailman/listinfo/pyt

Re: RELEASED Python 2.6 final

2008-10-01 Thread Chris Rebert
Also, the docs currently seem broken. Example: http://docs.python.org/library/weakref.html#module-weakref , which is linked to from the new module index page, gives a 404 error. Cheers, Chris Rebert On Wed, Oct 1, 2008 at 8:46 PM, Barry Warsaw <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED ME

Re: Isolated environment for execfile

2008-10-01 Thread Gabriel Genellina
En Wed, 01 Oct 2008 08:11:29 -0300, Igor Kaplan <[EMAIL PROTECTED]> escribió: I got quite unusual problem and all my searches to find the answer on my own were not successful. Here is the scenario: I have the python program, let's call it script1.py, this program needs to execute an

Re: RELEASED Python 2.6 final

2008-10-01 Thread Paul Rubin
Barry Warsaw <[EMAIL PROTECTED]> writes: > http://docs.python.org/dev/whatsnew/2.6.html Wow! This is a very major upgrade with lots of welcome extensions. I hadn't been following the 2.6 efforts that closely so I am awed. Congrats! -- http://mail.python.org/mailman/listinfo/python-list

Re: TypeError: can't pickle HASH objects?

2008-10-01 Thread est
On Oct 2, 11:27 am, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]> wrote: > On Oct 1, 2:50 pm, est <[EMAIL PROTECTED]> wrote: > > > > > > > >>> import md5 > > >>> a=md5.md5() > > >>> import pickle > > >>> pickle.dumps(a) > > > Traceback (most recent call last): > >   File "", line 1, in > >   Fi

Re: index all instances by id - a memory leak?

2008-10-01 Thread Jason Scheirer
On Oct 1, 10:01 pm, Dan Barbus <[EMAIL PROTECTED]> wrote: > On Oct 2, 7:54 am, Dan Barbus <[EMAIL PROTECTED]> wrote: > > > > >     def getItemById(id): > >         return _itemsById[id] > > I just saw that this won't compile. Still, ignoring this, I thing the > purpose of the code is pretty clear.

Re: what does "python -i" use as input stream (stdin)?

2008-10-01 Thread Gabriel Genellina
En Wed, 01 Oct 2008 14:48:52 -0300, Almar Klein <[EMAIL PROTECTED]> escribió: I wanted to give your solution a try, but got stuck. The file that I want to replace the "standard input" with is a pseudo file object with a custom read method. I have a hard time finding out how to have a file d

Re: index all instances by id - a memory leak?

2008-10-01 Thread Marc 'BlackJack' Rintsch
On Wed, 01 Oct 2008 21:54:26 -0700, Dan Barbus wrote: > def __del__(self): > Item._count -= 1 > # Should I do something here to delete the instance? > # Will this ever be called if the instance is in a static > dictionary? Don't use the `__del__()` method. It is not r

Re: TypeError: can't pickle HASH objects?

2008-10-01 Thread James Mills
On Thu, Oct 2, 2008 at 3:34 PM, est <[EMAIL PROTECTED]> wrote: > wow. It's giga-size file. I need stream reading it, md5 it. It may > break for a while. So use generators and consume the stream ? --JamesMills -- -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/py

Re: Odd Errors

2008-10-01 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steven D'Aprano wrote: > On Wed, 01 Oct 2008 22:14:49 +1300, Lawrence D'Oliveiro wrote: > >> In message >> <[EMAIL PROTECTED]>, >> Aaron "Castironpi" Brady wrote: >> >>> Do you ever want to scream from the rooftops, "'append' operates by >>> side-effect!"? >> >>

Re: TypeError: can't pickle HASH objects?

2008-10-01 Thread electronixtar
James Mills wrote: > On Thu, Oct 2, 2008 at 3:34 PM, est <[EMAIL PROTECTED]> wrote: > >> wow. It's giga-size file. I need stream reading it, md5 it. It may >> break for a while. >> > > So use generators and consume the stream ? > > --JamesMills > > it's not the stream's problem. it the m

<    1   2