Re: PyPy, is it a 1:1 replacement for CPython?

2012-07-20 Thread Dan Stromberg
On Fri, Jul 20, 2012 at 8:59 PM, Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > On Sat, 21 Jul 2012 13:35:21 +1000, Simon Cropper wrote: > > > Hi, > > > > Can you use PyPy as a direct replacement for the normal python or is it > > a specialized compiler that can only work with li

Re: PyPy, is it a 1:1 replacement for CPython?

2012-07-20 Thread Steven D'Aprano
On Sat, 21 Jul 2012 13:35:21 +1000, Simon Cropper wrote: > Hi, > > Can you use PyPy as a direct replacement for the normal python or is it > a specialized compiler that can only work with libraries that are > manipulated to operate within its constraints (if it has any). PyPy should work perfect

Re: PyPy, is it a 1:1 replacement for CPython?

2012-07-20 Thread Alec Taylor
ask on PyPy's list But yes, it is designed as a 1:1 replacement of CPython On Sat, Jul 21, 2012 at 1:35 PM, Simon Cropper wrote: > Hi, > > Can you use PyPy as a direct replacement for the normal python or is it a > specialized compiler that can only work with libraries that are manipulated > to

Re: ANN: dbf.py 0.94

2012-07-20 Thread Chris Angelico
On Sat, Jul 21, 2012 at 1:34 PM, Steven D'Aprano wrote: > Unless the software is so well-known that everybody knows what it is... I've yet to meet ANY piece of software that's like that. Even with releases of CPython (arguably the primary point of this list) it wouldn't hurt to give an explanatio

Re: ANN: dbf.py 0.94

2012-07-20 Thread Temia Eszteri
On 21 Jul 2012 03:34:44 GMT, Steven D'Aprano wrote: >tl;dr Easy there, tiger. No need to get riled up over a single nitpick over phrasing. ~Temia -- Invective! Verb your expletive nouns! -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: dbf.py 0.94

2012-07-20 Thread Steven D'Aprano
On Sat, 21 Jul 2012 13:30:40 +1000, Simon Cropper wrote: > Works with PyPy, OK. > > Hopefully works with other implementations, Hm, what does this mean? I guess that Ethan means that his library definitely works with PyPy and CPython, because he has tested it on those, and that he expects that

Re: ANN: dbf.py 0.94

2012-07-20 Thread Ethan Furman
Steven D'Aprano wrote: On Fri, 20 Jul 2012 16:59:21 -0700, Ethan Furman wrote: Getting closer to a stable release. Excellent! That's fantastic news! I've been waiting for a stable release of dbf for months! I just have one question. What is dbf? :) dbf (also known as python dbase) is a

Re: ANN: dbf.py 0.94

2012-07-20 Thread Temia Eszteri
On Sat, 21 Jul 2012 13:02:55 +1000, Chris Angelico wrote: >On Sat, Jul 21, 2012 at 12:56 PM, Temia Eszteri >wrote: >> On 21 Jul 2012 00:50:13 GMT, Steven D'Aprano >> wrote: >> Latest version has a simpler, cleaner API, and works on PyPy (and hopefully the other implementations as wel

PyPy, is it a 1:1 replacement for CPython?

2012-07-20 Thread Simon Cropper
Hi, Can you use PyPy as a direct replacement for the normal python or is it a specialized compiler that can only work with libraries that are manipulated to operate within its constraints (if it has any). Are there any issues with using PyPy? For example, if programs are created under PyPy a

Re: ANN: dbf.py 0.94

2012-07-20 Thread Steven D'Aprano
On Fri, 20 Jul 2012 19:56:59 -0700, Temia Eszteri wrote: >>I don't generally click on arbitrary links to find out whether or not >>the link is something that interests me enough to click on it. > > Can't really call a cheese shop link arbitrary. It's in the best place > it could be for providing

Re: ANN: dbf.py 0.94

2012-07-20 Thread Simon Cropper
On 21/07/12 09:59, Ethan Furman wrote: Getting closer to a stable release. Latest version has a simpler, cleaner API, and works on PyPy (and hopefully the other implementations as well ;), as well as CPython. Get your copy at http://python.org/pypi/dbf. Bug reports, comments, and kudos welcome

Re: can someone teach me this?

2012-07-20 Thread hamilton
On 7/20/2012 8:09 PM, Menghsiu Lee wrote: Hi, I have tried 1000 times to compile this python file to be an exe file by using py2exe and gui2exe But, it does not work out. I am thinking if there can be some genius teaching me how to make this happen. The link in below is the complete code with a

Re: ANN: dbf.py 0.94

2012-07-20 Thread Chris Angelico
On Sat, Jul 21, 2012 at 12:56 PM, Temia Eszteri wrote: > On 21 Jul 2012 00:50:13 GMT, Steven D'Aprano > wrote: > >>> Latest version has a simpler, cleaner API, and works on PyPy (and >>> hopefully the other implementations as well ;), as well as CPython. >>> >>> Get your copy at http://python.org

Re: ANN: dbf.py 0.94

2012-07-20 Thread Temia Eszteri
On 21 Jul 2012 00:50:13 GMT, Steven D'Aprano wrote: >> Latest version has a simpler, cleaner API, and works on PyPy (and >> hopefully the other implementations as well ;), as well as CPython. >> >> Get your copy at http://python.org/pypi/dbf. > >I don't generally click on arbitrary links to find

Re: can someone teach me this?

2012-07-20 Thread rusi
On Jul 21, 7:09 am, Menghsiu Lee wrote: "can someone teach me this?" Lesson 1: Use an informational subject line Lesson 2: Post what you did and what happened -- http://mail.python.org/mailman/listinfo/python-list

can someone teach me this?

2012-07-20 Thread Menghsiu Lee
Hi, I have tried 1000 times to compile this python file to be an exe file by using py2exe and gui2exe But, it does not work out. I am thinking if there can be some genius teaching me how to make this happen. The link in below is the complete code with all sources. Everything is open to everyon

Re: ANN: dbf.py 0.94

2012-07-20 Thread Steven D'Aprano
On Fri, 20 Jul 2012 16:59:21 -0700, Ethan Furman wrote: > Getting closer to a stable release. Excellent! That's fantastic news! I've been waiting for a stable release of dbf for months! I just have one question. What is dbf? > Latest version has a simpler, cleaner API, and works on PyPy (and

Re: Newbie question on python programming

2012-07-20 Thread Ian Kelly
On Fri, Jul 20, 2012 at 5:38 PM, Chris Williams wrote: > Hello > > I hope this is the right newsgroup for this post. > > I am just starting to learn python programming and it seems very > straightforward so far. It seems, however, geared toward doing the sort of > programming for terminal output.

ANN: dbf.py 0.94

2012-07-20 Thread Ethan Furman
Getting closer to a stable release. Latest version has a simpler, cleaner API, and works on PyPy (and hopefully the other implementations as well ;), as well as CPython. Get your copy at http://python.org/pypi/dbf. Bug reports, comments, and kudos welcome! ;) ~Ethan~ -- http://mail.python.o

Newbie question on python programming

2012-07-20 Thread Chris Williams
Hello I hope this is the right newsgroup for this post. I am just starting to learn python programming and it seems very straightforward so far. It seems, however, geared toward doing the sort of programming for terminal output. Is it possible to write the sort of applications you can create

Microsoft: Seeking Devs with All Levels of Experience for NATIONWIDE Remote Research Study

2012-07-20 Thread uccoord
'm with Microsoft User Research and we're looking nationally for developers with all levels of experience (from college graduate to senior developer) for an upcoming remote research study. This is a great opportunity to share feedback with Microsoft User Researchers and have a direct impact on t

Re: logging time format millisecond precision decimalsign

2012-07-20 Thread David Bolen
"Alex van der Spek" writes: > I use this formatter in logging: > > formatter = logging.Formatter(fmt='%(asctime)s \t %(name)s \t %(levelname)s > \t %(message)s') > > Sample output: > > 2012-07-19 21:34:58,382 root INFO Removed - C:\Users\ZDoor\Documents > > The time stamp has millisecond pr

Re: A thread import problem

2012-07-20 Thread Bruce Sherwood
Dieter Maurer commented the following on my question about a thread import problem: -- In a recent discussion in this list someone mentioned that on module import, you should not start a thread. The reason: apparently, Python uses some kind of locking during import which can in

Re: best way to handle this in Python

2012-07-20 Thread Ian Kelly
On Fri, Jul 20, 2012 at 4:34 AM, Rita wrote: > Thats an interesting data structure Dennis. I will actually be running this > type of query many times preferable in an ad-hoc environment. That makes it > tough for sqlite3 since there will be several hundred thousand tuples. Several hundred thousan

Re: Encapsulation, inheritance and polymorphism

2012-07-20 Thread Hans Mulder
On 20/07/12 11:05:09, Virgil Stokes wrote: > On 20-Jul-2012 10:27, Steven D'Aprano wrote: >> On Fri, 20 Jul 2012 08:20:57 +1000, Chris Angelico wrote: >> >Since the current evidence indicates the universe will just > keep > expanding, it's more of a "deep freeze death..." H

Re: properly catch SIGTERM

2012-07-20 Thread Oscar Benjamin
What about Kushal's suggestion above? Does the following work for you? signal.signal(signal.SIGTERM, my_SIGTERM_handler) signal.siginterrupt(signal.SIGTERM, flag=False) According to the siginterrupt docs ( http://docs.python.org/library/signal.html) """ Change system call restart behaviour: if fl

Re: Odd csv column-name truncation with only one column

2012-07-20 Thread Hans Mulder
On 19/07/12 23:10:04, Dennis Lee Bieber wrote: > On Thu, 19 Jul 2012 13:01:37 -0500, Tim Chase > declaimed the following in > gmane.comp.python.general: > >> It just seems unfortunate that the sniffer would ever consider >> [a-zA-Z0-9] as a valid delimiter. +1 > I'd suspect the sniffer l

Re: Finding duplicate file names and modifying them based on elements of the path

2012-07-20 Thread MRAB
On 20/07/2012 04:07, larry.mart...@gmail.com wrote: [snip] Also, in make_dir5_key the format specifier for strftime should be %y%m %d so they sort properly. Correct. I realised that only some time later, after I'd turned off my computer for the night. :-( -- http://mail.python.org/mailman/listi

Re: logging time format millisecond precision decimalsign

2012-07-20 Thread Peter Otten
Alex van der Spek wrote: > I use this formatter in logging: > > formatter = logging.Formatter(fmt='%(asctime)s \t %(name)s \t > %(levelname)s \t %(message)s') > > Sample output: > > 2012-07-19 21:34:58,382 root INFO Removed - C:\Users\ZDoor\Documents > > The time stamp has millisecond pr

Re: properly catch SIGTERM

2012-07-20 Thread Eric Frederich
On Fri, Jul 20, 2012 at 1:51 AM, Jason Friedman wrote: > > This seems to work okay but just now I got this while hitting ctrl-c > > It seems to have caught the signal at or in the middle of a call to > > sys.stdout.flush() > > > > > > --- Caught SIGTERM; Attempting to quit gracefully --- > > Trac

Re: Google the video blah blah jews blah blah 9/11 blah blah conspiracy blah cia blah blah blah zionist blah blah brainwashing blah blah blah

2012-07-20 Thread Ben Finney
Steven D'Aprano writes: > On Thu, 19 Jul 2012 10:27:02 -0400, Matty Sarro wrote: > > > I must be a Jew or a traitor as I keep deleting this email. > > You might be both. https://www.youtube.com/watch?v=7kYVaycn5Fc> -- \ “My business is to teach my aspirations to conform themselves | `

logging time format millisecond precision decimalsign

2012-07-20 Thread Alex van der Spek
I use this formatter in logging: formatter = logging.Formatter(fmt='%(asctime)s \t %(name)s \t %(levelname)s \t %(message)s') Sample output: 2012-07-19 21:34:58,382 root INFO Removed - C:\Users\ZDoor\Documents The time stamp has millisecond precision but the decimal separator is a comma.

Re: best way to handle this in Python

2012-07-20 Thread Rita
Thats an interesting data structure Dennis. I will actually be running this type of query many times preferable in an ad-hoc environment. That makes it tough for sqlite3 since there will be several hundred thousand tuples. On Fri, Jul 20, 2012 at 12:18 AM, Dennis Lee Bieber wrote: > {NOTE: pref

Re: Encapsulation, inheritance and polymorphism

2012-07-20 Thread BartC
"Erik Max Francis" wrote in message news:gskdnwoqpkoovztnnz2dnuvz5s2dn...@giganews.com... On 07/20/2012 01:11 AM, Steven D'Aprano wrote: On Thu, 19 Jul 2012 13:50:36 -0500, Tim Chase wrote: I'm reminded of Graham's Number, which is so large that there aren't enough molecules in the universe

Re: QVariant.toPyObject()

2012-07-20 Thread Vincent Vande Vyvre
On 20/07/12 11:50, Wolfgang Rohdewald wrote: > toPyObject() is mentioned but undocumented at > http://www.riverbankcomputing.com/static/Docs/PyQt4/html/qvariant.html#toPyObject > > without it being documented, I find it a bit surprising that toPyObject() > can return a QString. > > Of course QStrin

QVariant.toPyObject()

2012-07-20 Thread Wolfgang Rohdewald
toPyObject() is mentioned but undocumented at http://www.riverbankcomputing.com/static/Docs/PyQt4/html/qvariant.html#toPyObject without it being documented, I find it a bit surprising that toPyObject() can return a QString. Of course QString is a python object but then QVariant is too. -- Wolf

Re: Encapsulation, inheritance and polymorphism

2012-07-20 Thread Virgil Stokes
On 20-Jul-2012 10:27, Steven D'Aprano wrote: On Fri, 20 Jul 2012 08:20:57 +1000, Chris Angelico wrote: Since the current evidence indicates the universe will just keep expanding, it's more of a "deep freeze death..." Heat death means *lack* of heat. The second law of thermodynamics sta

Re: Encapsulation, inheritance and polymorphism

2012-07-20 Thread Erik Max Francis
On 07/20/2012 01:11 AM, Steven D'Aprano wrote: On Thu, 19 Jul 2012 13:50:36 -0500, Tim Chase wrote: On 07/19/12 13:28, Chris Angelico wrote: On Fri, Jul 20, 2012 at 4:20 AM, Tim Chase wrote: Sure it terminates...If you don't run out of RAM to represent the number "i" in question, there's al

Re: Encapsulation, inheritance and polymorphism

2012-07-20 Thread Mark Lawrence
On 19/07/2012 22:13, Ian Kelly wrote: On Thu, Jul 19, 2012 at 3:01 PM, John Gordon wrote: In Dennis Lee Bieber writes: Sure it terminates...If you don't run out of RAM to represent the number "i" in question, there's also this "heat death of the universe" limit I keep hearing about ;-)

Re: properly catch SIGTERM

2012-07-20 Thread Kushal Kumaran
On Fri, Jul 20, 2012 at 11:39 AM, Dieter Maurer wrote: > Eric Frederich writes: >> ... >> This seems to work okay but just now I got this while hitting ctrl-c >> It seems to have caught the signal at or in the middle of a call to >> sys.stdout.flush() >> --- Caught SIGTERM; Attempting to quit gra

Re: Let child process to run while parent is out (multiprocessing)

2012-07-20 Thread Kushal Kumaran
On Fri, Jul 20, 2012 at 2:04 AM, John Wong wrote: > def main(...): > build_id = create_build_id(...) > build_stuff > return build_id > > Suppose build_stuff compiles a C program. It could take days to finish, and > notify users their builds are ready. I was thinking about using > mutli

Re: Finding duplicate file names and modifying them based on elements of the path

2012-07-20 Thread Paul Rudin
"larry.mart...@gmail.com" writes: > It seems that if you do a list(group) you have consumed the list. This > screwed me up for a while, and seems very counter-intuitive. You've consumed the *group* which is an iterator, in order to construct a list from its elements. Sorry if this is excessively

Re: Odd csv column-name truncation with only one column

2012-07-20 Thread Steven D'Aprano
On Thu, 19 Jul 2012 15:52:12 +0200, Hans Mulder wrote: > Perhaps it should be documented that the Sniffer doesn't work on > single-column data. > > If you really need to read a one-column csv file, you'll have to find > some other way to produce a Dialect object. Perhaps the predefined > 'cvs.ex

Re: Google the video blah blah jews blah blah 9/11 blah blah conspiracy blah cia blah blah blah zionist blah blah brainwashing blah blah blah

2012-07-20 Thread Steven D'Aprano
On Thu, 19 Jul 2012 10:27:02 -0400, Matty Sarro wrote: > I must be a Jew or a traitor as I keep deleting this email. You might be both. -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: Encapsulation, inheritance and polymorphism

2012-07-20 Thread Steven D'Aprano
On Fri, 20 Jul 2012 08:20:57 +1000, Chris Angelico wrote: >>> Since the current evidence indicates the universe will just keep >>> expanding, it's more of a "deep freeze death..." >> >> Heat death means *lack* of heat. > > The second law of thermodynamics states that energy tends to go from

Re: reloading code and multiprocessing

2012-07-20 Thread Chris Angelico
On Thu, Jul 19, 2012 at 8:15 PM, andrea crotti wrote: > We need to be able to reload code on a live system. This live system > has a daemon process always running but it runs many subprocesses with > multiprocessing, and the subprocesses might have a short life... > ... > As long as I import the

Re: Encapsulation, inheritance and polymorphism

2012-07-20 Thread Steven D'Aprano
On Thu, 19 Jul 2012 13:50:36 -0500, Tim Chase wrote: > On 07/19/12 13:28, Chris Angelico wrote: >> On Fri, Jul 20, 2012 at 4:20 AM, Tim Chase >> wrote: >>> Sure it terminates...If you don't run out of RAM to represent the >>> number "i" in question, there's also this "heat death of the universe"

Re: Finding duplicate file names and modifying them based on elements of the path

2012-07-20 Thread Paul Rubin
"larry.mart...@gmail.com" writes: > It seems that if you do a list(group) you have consumed the list. This > screwed me up for a while, and seems very counter-intuitive. Yes, that is correct, you have to carefully watch where the stuff in the iterators is getting consumed, including when there ar

Re: Finding duplicate file names and modifying them based on elements of the path

2012-07-20 Thread Peter Otten
larry.mart...@gmail.com wrote: > It seems that if you do a list(group) you have consumed the list. This > screwed me up for a while, and seems very counter-intuitive. Many itertools functions work that way. It allows you to iterate over the items even if there is more data than fits into memory.

Re: Encapsulation, inheritance and polymorphism

2012-07-20 Thread Devin Jeanpierre
On Thu, Jul 19, 2012 at 5:01 PM, John Gordon wrote: >> Since the current evidence indicates the universe will just keep >> expanding, it's more of a "deep freeze death..." > > Heat death means *lack* of heat. But it doesn't mean low temperature! The term is agnostic as to what the temperatu

Re: Encapsulation, inheritance and polymorphism

2012-07-20 Thread Ian Kelly
On Thu, Jul 19, 2012 at 3:01 PM, John Gordon wrote: > In Dennis Lee Bieber > writes: > >> > Sure it terminates...If you don't run out of RAM to represent the >> > number "i" in question, there's also this "heat death of the >> > universe" limit I keep hearing about ;-) >> > >> Since the c

Re: Encapsulation, inheritance and polymorphism

2012-07-20 Thread Steven D'Aprano
On Thu, 19 Jul 2012 09:06:45 -0400, Roy Smith wrote: > Heh. This reminds me of one of my current pet peeves. I've run across > documentation for more than one Python project (django is the one that > comes to mind, but I'm sure there's others) which misuse words like > "set" and "list". They're