Re: Guido rethinking removal of cmp from sort method

2011-03-30 Thread harrismh777
Antoon Pardon wrote: On Sun, Mar 13, 2011 at 12:59:55PM +, Steven D'Aprano wrote: The removal of cmp from the sort method of lists is probably the most disliked change in Python 3. On the python-dev mailing list at the moment, Guido is considering whether or not it was a mistake. If anyone

Re: delete namespaces

2011-03-30 Thread rusi
On Mar 30, 6:14 am, monkeys paw wrote: > How do i delete a module namespace once it has been imported? > > I use > > import banner > > Then i make a modification to banner.py. When i import it again, > the new changes are not reflected. Is there a global variable i can > modify? It seems you are

Re: FBI wants public help solving encrypted notes from murder mystery

2011-03-30 Thread David Bernier
Stretto wrote: "Joe Snodgrass" wrote in message news:c37e8e0b-a825-4ac5-9886-8828ab1fa...@x8g2000prh.googlegroups.com... FBI cryptanalysis hasn’t decrypted notes from 1999 murder mystery http://tinyurl.com/4d56zsz The FBI is seeking the public's help in breaking the encrypted code found in

Re: delete namespaces

2011-03-30 Thread Ritesh Nadhani
On Tue, Mar 29, 2011 at 6:14 PM, monkeys paw wrote: > How do i delete a module namespace once it has been imported? > > I use > > import banner > > Then i make a modification to banner.py. When i import it again, > the new changes are not reflected. Is there a global variable i can > modify? > --

Re: delete namespaces

2011-03-30 Thread Chris Angelico
On Thu, Mar 31, 2011 at 11:11 AM, Raymond Hettinger wrote: > [monkeys paw] >> > How do i delete a module namespace once it has been imported? >  . . . >> > Then i make a modification to banner.py. When i import it again, >> > the new changes are not reflected. > > [Terry Reedy] >> The best thing,

Learn Python the Hardway exercise 11 question 4

2011-03-30 Thread Joseph Sanoyo
print "How old are you?", age = raw_input() print "How tall are you?", height = raw_input() print "How much do you weigh?", weight = raw_input() print "So, you're %r old, %r tall and %r heavy." % ( age, height, weight) Note: Notice that we put a , (comma) at the end of each print line. This is so t

Re: Fun python 3.2 one-liner

2011-03-30 Thread Gregory Ewing
Martin De Kauwe wrote: what is the character limit on a one liner :P. For PEP 8 compliance, 80 characters. :-) -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: Sudden error: SyntaxError: Non-ASCII character '\xc2' in file

2011-03-30 Thread Terry Reedy
On 3/30/2011 7:58 PM, Gnarlodious wrote: On Mar 30, 9:28 am, Peter Otten wrote: You are trying to run your 3.x code with Python 2.x... You're right. Exactly why this started happening I don't know. I believe recent Mac OSX comes with some 2.x installed as the default Python. -- Terry Jan

Forcing absolute package imports in 2.7?

2011-03-30 Thread Michael Parker
Hi all, I'm reading Learning Python 4th Edition by Lutz. In the section on relative package imports, he says: "In Python 3.0, the `import modname` statement is always absolute, skipping the containing package’s directory. In 2.6, this statement form still performs relative imports today (i.e., the

Re: FBI wants public help solving encrypted notes from murder mystery

2011-03-30 Thread Graham Cooper
On Mar 31, 12:18 pm, "Stretto" wrote: > "Joe Snodgrass" wrote in message > > news:c37e8e0b-a825-4ac5-9886-8828ab1fa...@x8g2000prh.googlegroups.com... > > > > > > > > > FBI cryptanalysis hasn’t decrypted notes from 1999 murder mystery > > >http://tinyurl.com/4d56zsz > > > The FBI is seeking the pu

Re: Guido rethinking removal of cmp from sort method

2011-03-30 Thread Steven D'Aprano
On Wed, 30 Mar 2011 11:06:20 +0200, Antoon Pardon wrote: > As far as I can see, key will only produce significant speedups, if > comparing items can then be completly done internally in the python > engine without referencing user python code. Incorrect. You don't even need megabytes of data to s

Re: FBI wants public help solving encrypted notes from murder mystery

2011-03-30 Thread Stretto
"Joe Snodgrass" wrote in message news:c37e8e0b-a825-4ac5-9886-8828ab1fa...@x8g2000prh.googlegroups.com... FBI cryptanalysis hasn’t decrypted notes from 1999 murder mystery http://tinyurl.com/4d56zsz The FBI is seeking the public's help in breaking the encrypted code found in two notes disc

Re: FBI wants public help solving encrypted notes from murder mystery

2011-03-30 Thread David Bernier
Joe Snodgrass wrote: FBI cryptanalysis hasn’t decrypted notes from 1999 murder mystery http://tinyurl.com/4d56zsz The FBI is seeking the public's help in breaking the encrypted code found in two notes discovered on the body of a murdered man in 1999. The FBI says that officers in St. Louis, M

running Python2 Python3 parallel concurrent

2011-03-30 Thread harrismh777
Greetings, The purpose of this communique is to document a process for installing python2.7.1 in parallel with python3.2 on a concurrent desktop with independent idle and python path structure. Each version (python2, python3) will be installed in a separate python shell (idle) run on

Re: popular programs made in python?

2011-03-30 Thread eryksun ()
On Tuesday, March 29, 2011 10:32:26 AM UTC-4, Neil Alt wrote: > i mean made with python only, not just a small part of python. I think it's uncommon for an application to be programmed entirely in Python. It's common to use C/C++ to accelerate performance critical parts of the code. I don't see

Re: best python games?

2011-03-30 Thread Raymond Hettinger
On Mar 25, 7:39 pm, sogeking99 wrote: > hey guys, what are some of the best games made in python? free games > really. like pygames stuff. i want to see what python is capable of. > > cant see any good one on pygames site really, though they have nothing > like sort by rating or most downloaded as

Re: Why aren't copy and deepcopy in __builtins__?

2011-03-30 Thread Raymond Hettinger
On Mar 27, 8:29 pm, John Ladasky wrote: > Simple question.  I use these functions much more frequently than many > others which are included in __builtins__.  I don't know if my > programming needs are atypical, but my experience has led me to wonder > why I have to import these functions. I aske

Re: Directly Executable Files in Python

2011-03-30 Thread Raymond Hettinger
On Mar 28, 8:37 pm, Jordan Meyer wrote: > Is it possible to make a directly executable (such as .exe on Windows) file > from scripts written in Python? So as to prevent the end-user from having to > download an interpreter to run the program. http://docs.python.org/faq/programming.html#how-can-

Re: delete namespaces

2011-03-30 Thread Raymond Hettinger
[monkeys paw] > > How do i delete a module namespace once it has been imported? . . . > > Then i make a modification to banner.py. When i import it again, > > the new changes are not reflected. [Terry Reedy] > The best thing, if possible, is to restart the program. > If you develop banner.py with

Re: Sudden error: SyntaxError: Non-ASCII character '\xc2' in file

2011-03-30 Thread Gnarlodious
On Mar 30, 9:28 am, Peter Otten wrote: > You are trying to run your 3.x code with Python 2.x... You're right. Exactly why this started happening I don't know. Thanks. -- Gnarlie -- http://mail.python.org/mailman/listinfo/python-list

Re: popular programs made in python?

2011-03-30 Thread Raymond Hettinger
On Mar 29, 7:32 am, Neil Alt wrote: > i mean made with python only, not just a small part of python. BitTorrent was a huge success. Raymond -- http://mail.python.org/mailman/listinfo/python-list

Re: learn python the hard way exercise 42 help

2011-03-30 Thread Raymond Hettinger
On Mar 30, 6:48 am, neil harper wrote: > http://pastie.org/1735028 > hey guys play is confusing me, i get how next gets the first room, which > is passed when the instance of Game() is created, but how does it get > the next room? It might help show calling patterns if you added print statements

Re: Fun python 3.2 one-liner

2011-03-30 Thread Raymond Hettinger
On Mar 30, 2:19 am, Martin De Kauwe wrote: > what is the character limit on a one liner :P. Very interesting > jesting apart, any more? Sure, here are three one-liners using itertools.groupby() to emulate some Unix pipelines: sort letters | uniq # list unique values sort letters | uniq

Dictionary Descriptors

2011-03-30 Thread Raymond Hettinger
On the python-ideas list, someone made a wild proposal to add descriptors to dictionaries. None of the respondents seemed to realize that you could (not should, just could) already implement this using hooks already present in the language. I'm posting an example here because I thought you all mi

Next Melbourne PUG meeting 6pm Monday 4th of April @ RMIT

2011-03-30 Thread Richard Jones
Hi all, Sorry for the late post this week. The next meeting is next Monday, the 4th of April at RMIT. The room has changed! After the double-booking last week we've been moved to 12.07.02 (building 12, level 7, room 2). Tennessee's going to talk to us about an approach to benchmarking that he's

Re: FBI wants public help solving encrypted notes from murder mystery

2011-03-30 Thread harrismh777
Fons Adriaensen wrote: [LINK] ??? http://www.net-security.org/secworld.php?id=10823 -- http://mail.python.org/mailman/listinfo/python-list

Re: FBI wants public help solving encrypted notes from murder mystery

2011-03-30 Thread Fons Adriaensen
On Wed, Mar 30, 2011 at 01:25:54PM -0700, Joe Snodgrass wrote: > For larger images of the notes go here. [LINK] [LINK] ??? -- FA -- http://mail.python.org/mailman/listinfo/python-list

FBI wants public help solving encrypted notes from murder mystery

2011-03-30 Thread Joe Snodgrass
FBI cryptanalysis hasn’t decrypted notes from 1999 murder mystery http://tinyurl.com/4d56zsz The FBI is seeking the public's help in breaking the encrypted code found in two notes discovered on the body of a murdered man in 1999. The FBI says that officers in St. Louis, Missouri discovered the

py 2.7.1 & openssl

2011-03-30 Thread V N
I installed openssl-1.0.0d.tar.gz on my RHEL 5 box using: ./config --prefix=/usr/local --openssldir=/usr/local/openssl shared zlib make sudo make install Then I installed python 2.7.1 using PYHOME=/usr/local/Python-2.7.1; export PYHOME LD_RUN_PATH=$PYHO

Re: Data files for tests

2011-03-30 Thread Ethan Furman
Steven D'Aprano wrote: I have a package with some tests. The tests are not part of the package Do you mean they are not importable, as in --> from spam import tests or they are not distributed? Because it seems to me that distributing them would be worthwhile to at least some of the folks d

Re: delete namespaces

2011-03-30 Thread Tim Golden
On 30/03/2011 8:03 PM, Terry Reedy wrote: On 3/30/2011 5:10 AM, Jean-Michel Pichavant wrote: 3/ if you want to do the 2/ but require a painful long prologue to your test, then you may want to use the builtin reload. Use it with care, because any existing object created from the previous module

Get USB ID of a serial port through pyserial?

2011-03-30 Thread John Nagle
Is there some way to get the USB ID of a serial port through pyserial on Linux and/or Windows? USB serial port devices have device names determined by when they were plugged in. So, if you have more than one USB serial device, you need the USB device's built-in ID to figure out what's out ther

Re: delete namespaces

2011-03-30 Thread Terry Reedy
On 3/30/2011 5:10 AM, Jean-Michel Pichavant wrote: 3/ if you want to do the 2/ but require a painful long prologue to your test, then you may want to use the builtin reload. Use it with care, because any existing object created from the previous module will not be affected, they'll still hold th

Re: Sudden error: SyntaxError: Non-ASCII character '\xc2' in file

2011-03-30 Thread eryksun ()
On Wednesday, March 30, 2011 10:34:46 AM UTC-4, Gnarlodious wrote: > > The error originates at '·' which string contains a · > character. > > Complete error message is: > > SyntaxError: Non-ASCII character '\xc2' in file /Library/WebServer/ > Sites/Sectrum/Site/Feed.py on line 17, but no encodin

Re: argparse csv + choices

2011-03-30 Thread Robert Kern
On 3/30/11 10:32 AM, Neal Becker wrote: I'm trying to combine 'choices' with a comma-seperated list of options, so I could do e.g., --cheat=a,b parser.add_argument ('--cheat', choices=('a','b','c'), type=lambda x: x.split(','), default=[]) test.py --cheat a error: argument --cheat: inva

Re: Sudden error: SyntaxError: Non-ASCII character '\xc2' in file

2011-03-30 Thread Peter Otten
Benjamin Kaplan wrote: > On Wed, Mar 30, 2011 at 10:34 AM, Gnarlodious > wrote: >> RSS script runs fine on my dev machine but errors on the server >> machine. Script was last run 3 days ago with no problem. Possible >> clue: dev machine is (Mac OSX) running Python 3.1.1 while server is >> running

argparse csv + choices

2011-03-30 Thread Neal Becker
I'm trying to combine 'choices' with a comma-seperated list of options, so I could do e.g., --cheat=a,b parser.add_argument ('--cheat', choices=('a','b','c'), type=lambda x: x.split(','), default=[]) test.py --cheat a error: argument --cheat: invalid choice: ['a'] (choose from 'a', 'b',

Re: Sudden error: SyntaxError: Non-ASCII character '\xc2' in file

2011-03-30 Thread Peter Otten
Gnarlodious wrote: > RSS script runs fine on my dev machine but errors on the server > machine. Script was last run 3 days ago with no problem. Possible > clue: dev machine is (Mac OSX) running Python 3.1.1 while server is > running Python 3.1.3. I have not updated anything that should suddenly >

Re: Sudden error: SyntaxError: Non-ASCII character '\xc2' in file

2011-03-30 Thread Benjamin Kaplan
On Wed, Mar 30, 2011 at 10:34 AM, Gnarlodious wrote: > RSS script runs fine on my dev machine but errors on the server > machine. Script was last run 3 days ago with no problem. Possible > clue: dev machine is (Mac OSX) running Python 3.1.1 while server is > running Python 3.1.3. I have not update

logging module usage

2011-03-30 Thread mennis
I am working on a library for controlling various appliances in which I use the logging module. I'd like some input on the basic structure of what I've done. Specifically the logging aspect but more general comments are welcome. I'm convinced I mis-understand something but I'm not sure what. I'

Sudden error: SyntaxError: Non-ASCII character '\xc2' in file

2011-03-30 Thread Gnarlodious
RSS script runs fine on my dev machine but errors on the server machine. Script was last run 3 days ago with no problem. Possible clue: dev machine is (Mac OSX) running Python 3.1.1 while server is running Python 3.1.3. I have not updated anything that should suddenly cause this error starting yest

Re: learn python the hard way exercise 42 help

2011-03-30 Thread eryksun ()
On Wednesday, March 30, 2011 9:48:29 AM UTC-4, neil harper wrote: > http://pastie.org/1735028 > hey guys play is confusing me, i get how next gets the first room, which > is passed when the instance of Game() is created, but how does it get > the next room? > > thanks Each room is a method of Gam

learn python the hard way exercise 42 help

2011-03-30 Thread neil harper
http://pastie.org/1735028 hey guys play is confusing me, i get how next gets the first room, which is passed when the instance of Game() is created, but how does it get the next room? thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: multiprocessing Pool.imap broken?

2011-03-30 Thread eryksun ()
On Tuesday, March 29, 2011 9:44:21 PM UTC-4, Yang Zhang wrote: > I've tried both the multiprocessing included in the python2.6 Ubuntu > package (__version__ says 0.70a1) and the latest from PyPI (2.6.2.1). > In both cases I don't know how to use imap correctly - it causes the > entire interpreter t

Re: Directly Executable Files in Python

2011-03-30 Thread eryksun ()
On Tuesday, March 29, 2011 3:51:30 AM UTC-4, Paul Rudin wrote: > Benjamin Kaplan writes: > > > If you can figure out a good way to compile a language like Python, > > you'll be very rich. Yes, it is running the interpreter and then > > running the bytecode on the interpreter. It's the same way Ja

Re: Bring out yer dead Bring out yer dead

2011-03-30 Thread bruno.desthuilli...@gmail.com
On 30 mar, 09:12, harrismh777 wrote: >       2.6.2 >       2.5.1 >    == >       (___)     \--- ( 3.2 ) > > Cartman: Bring out yer dead,..  bring out yer dead... > > Devlpr:         Here' one...  (Python27) > > Cartman: ... nine pence! > > Python27:               I'm not dead! > >

Re: [pyplot] using f1=figure(1)

2011-03-30 Thread eryksun ()
On Monday, March 28, 2011 12:04:02 PM UTC-4, Giacomo Boffi wrote: > > >>> f1=figure(1) > >>> f2=figure(2) > >>> f1 > > >>> f2 > > >>> plot(sin(linspace(0,10)),figure=f1) > [] > >>> plot(cos(linspace(0,10)),figure=f2) > [] > >>> show() You can set the current figure to fig1 with the following:

Re: Fun python 3.2 one-liner

2011-03-30 Thread Chris Angelico
On Wed, Mar 30, 2011 at 8:19 PM, Martin De Kauwe wrote: > what is the character limit on a one liner :P. Very interesting > jesting apart, any more? Not sure if this can be redone as a one-liner; currently it's two. for i in range(3): print '\n\t"'+("minor","medium","major")[i]+' ":({\n\t\t

Re: Fun python 3.2 one-liner

2011-03-30 Thread Martin De Kauwe
what is the character limit on a one liner :P. Very interesting jesting apart, any more? -- http://mail.python.org/mailman/listinfo/python-list

Re: delete namespaces

2011-03-30 Thread Jean-Michel Pichavant
monkeys paw wrote: How do i delete a module namespace once it has been imported? I use import banner Then i make a modification to banner.py. When i import it again, the new changes are not reflected. Is there a global variable i can modify? It depends on what you want to achieve. 1/ if you

Re: Guido rethinking removal of cmp from sort method

2011-03-30 Thread Antoon Pardon
On Tue, Mar 29, 2011 at 03:35:40PM -0400, Terry Reedy wrote: > For anyone interested, the tracker discussion on removing cmp is at > http://bugs.python.org/issue1771 > There may have been more on the old py3k list and pydev list. > > One point made there is that removing cmp= made list.sort consis

invio di una stringa

2011-03-30 Thread luca72
ciao a tutti sniffando i dati del protocollo irc con wireshark noto che a un certo punto per il resume di un trasferimento un noto programma manda questa stringa: PRIVMSG Ex|testtrasf|001 :\001DCC RESUME prova_trasferimento.pdf 58772 5016204\001 a questo punto il server risponde. Utilizzando i soc

PyInstaller and error: 'support/loader/run'

2011-03-30 Thread Ale Ghelfi
I've a script of Python 2.6.6 under Ubuntu 10.10 and i would pass it to XP like exe. My script use wxPython and read some files jpg that are in the same directory of the script. Before to use Pyinstaller 1.4, i did: cd /source/linux python Make.py make But "make" returned this error that i did

Bring out yer dead Bring out yer dead

2011-03-30 Thread harrismh777
2.6.2 2.5.1 == (___) \--- ( 3.2 ) Cartman: Bring out yer dead,.. bring out yer dead... Devlpr: Here' one... (Python27) Cartman: ... nine pence! Python27: I'm not dead! Cartman: What? Devlpr: Nothing, here's your nine pence. Pyt

Re: multiprocessing Pool.imap broken?

2011-03-30 Thread kyle.j.con...@gmail.com
Yang, My guess is that you are running into a problem using multiprocessing with the interpreter. The documentation states that Pool may not work correctly in this case. > Note: Functionality within this package requires that the __main__ method > be importable by the children. This is covered in

Hello Friends

2011-03-30 Thread Ashraf Ali
you can fine bollywood actresses biography,wallpapers & pictures on this website www.bollywoodhotactresses.weebly.com -- http://mail.python.org/mailman/listinfo/python-list

Hello Friends

2011-03-30 Thread Ashraf Ali
You can fine Bollywood Actresses Biography, WAllpapers & Pictures on the following website. www.bollywoodhotactresses.weebly.com -- http://mail.python.org/mailman/listinfo/python-list