ANN: esky v0.4.0

2010-02-25 Thread Ryan Kelly
Hi All, Reposting from python-list - sorry to those who receive this twice. I'm pleased to announce the latest release of esky, an auto-update framework for frozen python apps. Details below for those who are interested. Cheers, Ryan --- esky:

ANN: A forum and project gallery for Python game development

2010-02-25 Thread George Oliver
Pyed Pypers is a community where you can upload your game project, comment on other projects, build teams, ask for technical help, and discuss everything about game development with Python. If this catches your interest, check it out at http://www.pyedpypers.org. --

Re: What's the word on using to comment-out?

2010-02-25 Thread Paul Rudin
kj no.em...@please.post writes: I think I remember, early in my learning of Python, coming across the commandment THOU SHALT NOT USE TRIPLE-QUOTES TO COMMENT-OUT LINES OF CODE, or something to that effect. But now I can't find it! No idea, but it would be nice to have some multiline comment

Re: When will Java go mainstream like Python?

2010-02-25 Thread Paul Rubin
sjdevn...@yahoo.com sjdevn...@yahoo.com writes: IMO, Python would be well-served by making the ref-counting semantics it currently has a guaranteed part of the language spec... I could be convinced otherwise, but I _think_ that that change would offer an alternative to all of the interesting

Re: When will Java go mainstream like Python?

2010-02-25 Thread Paul Rubin
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: Pointer-chasing is a cache- hostile activity. Garbage collection involves a lot of pointer-chasing, particularly of dead objects that have long since been flushed from the cache, compared with reference counting of recently-accessed

Re: Regular expression issue

2010-02-25 Thread Peter Otten
Ashok Prabhu wrote: The following is a sample of my problem. I get input from user and store it in variable 'b'. I want to match the user input with the contents of another variable 'a'. However I m not able to get the exact match. Could someone help? print a c c+ b 'c+'

Re: Creating variables from dicts

2010-02-25 Thread alex goretoy
The problem i see with using globals() is that it can overwrite a previously defined function or key within the global namespace, making the code potentially dangerous and wild with exploits. my $0.02 -Alex Goretoy -- http://mail.python.org/mailman/listinfo/python-list

Re: When will Java go mainstream like Python?

2010-02-25 Thread Gregory Ewing
Lawrence D'Oliveiro wrote: And then there’s caching. Modern CPUs owe most of their speed to assumptions that programs will obey locality of reference. Pointer-chasing is a cache- hostile activity. Another thing to consider is the rate at which garbage is created. Java's fundamental types

Re: When will Java go mainstream like Python?

2010-02-25 Thread Alf P. Steinbach
* sjdevn...@yahoo.com: On Feb 24, 8:05 pm, Lawrence D'Oliveiro l...@geek- central.gen.new_zealand wrote: In message op.u8nfpex8y5e...@laptopwanja, Wanja Gayk wrote: Reference counting is about the worst technique for garbage collection. It avoids the need for garbage collection. That's

Why born like human? Read Ramayana Follow Rama.

2010-02-25 Thread Sree Rama
Why born like human? Read Ramayana Follow Rama. Once in a life you should read this great story, read this story in simple language at http://ramayanastory-rama.blogspot.com/2010/02/sri-rama-prince-of-ayodhya.html -- http://mail.python.org/mailman/listinfo/python-list

Re: pydoc errors

2010-02-25 Thread Diez B. Roggisch
Am 25.02.10 08:54, schrieb john maclean: python version is 2.6.2 does any one else have this issue? Seen a few closed tickets for various Linux Distros but it is obvoiusly still my problem. help modules Please wait a moment while I gather a list of all available modules... dm.c: 1640: not

Re: When will Java go mainstream like Python?

2010-02-25 Thread Chris Rebert
On Wed, Feb 24, 2010 at 11:03 PM, sjdevn...@yahoo.com sjdevn...@yahoo.com wrote: On Feb 24, 8:05 pm, Lawrence D'Oliveiro l...@geek- central.gen.new_zealand wrote: In message op.u8nfpex8y5e...@laptopwanja, Wanja Gayk wrote: Reference counting is about the worst technique for garbage

Re: When will Java go mainstream like Python?

2010-02-25 Thread Paul Rubin
Alf P. Steinbach al...@start.no writes: So I think there's no really good solution: the price for simplicity in one dimension is some complexity in another dimension, You could look at the way Cyclone (http://cyclone.thelanguage.org) does region inference, and maybe combine that with a tracing

Re: Spam from gmail

2010-02-25 Thread Arnaud Delobelle
Steven D'Aprano wrote: (That last response is aimed at a generic You, not Ben specifically. Stupid English language, why can't we have a word for generic you?) I thought the word was one. -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list

taking python enterprise level?...

2010-02-25 Thread simn_stv
hello people, i have been reading posts on this group for quite some time now and many, if not all (actually not all!), seem quite interesting. i plan to build an application, a network based application that i estimate (and seriously hope) would get as many as 100, 000 hits a day (hehe,...my dad

Re: Signature-based Function Overloading in Python

2010-02-25 Thread Jean-Michel Pichavant
Michael Rudolf wrote: First: Thanks for all the replies so far, they really helped me. Am 24.02.2010 11:28, schrieb Jean-Michel Pichavant: def a(x=None): if x is None: pass else: pass This is the way to do it python, and it has its advantages: 1 docstring, 1 way do

Re: What's the word on using to comment-out?

2010-02-25 Thread Tim Chase
Paul Rudin wrote: kj no.em...@please.post writes: I think I remember, early in my learning of Python, coming across the commandment THOU SHALT NOT USE TRIPLE-QUOTES TO COMMENT-OUT LINES OF CODE, or something to that effect. But now I can't find it! No idea, but it would be nice to have some

Re: When will Python go mainstream like Java?

2010-02-25 Thread Stefan Behnel
mk, 24.02.2010 18:30: On 2010-02-24 03:26, George Sakkis wrote: Well I for one wouldn't want Python to go exactly Java way, see this: http://www.itjobswatch.co.uk/charts/permanent-demand-trend.aspx?s=jav... This is the percentage of job offers in UK where the keyword Java appears. Same

Re: Signature-based Function Overloading in Python

2010-02-25 Thread Jean-Michel Pichavant
Jean-Michel Pichavant wrote: Michael Rudolf wrote: First: Thanks for all the replies so far, they really helped me. Am 24.02.2010 11:28, schrieb Jean-Michel Pichavant: def a(x=None): if x is None: pass else: pass This is the way to do it python, and it has its

Using mock library (written by Michael Foord)

2010-02-25 Thread Lacrima
Hello! I use mock library http://www.voidspace.org.uk/python/mock/. There is no user group for the library, so I post in comp.lang.python and hope that people who use it will help me. The library allows to patch objects, using patch decorator. Patching is done only within the scope of the

Re: taking python enterprise level?...

2010-02-25 Thread Steve Holden
simn_stv wrote: hello people, i have been reading posts on this group for quite some time now and many, if not all (actually not all!), seem quite interesting. i plan to build an application, a network based application that i estimate (and seriously hope) would get as many as 100, 000 hits a

Re: taking python enterprise level?...

2010-02-25 Thread Martin P. Hellwig
On 02/25/10 10:26, simn_stv wrote: cut what i am concerned about is scalability and efficiency, well, as far as the 'core' is concerned. would python be able to manage giving me a solid 'core' and will i be able to use python provide any API i would like to implement?... cut Python isn't the

Re: taking python enterprise level?...

2010-02-25 Thread Tim Wintle
On Thu, 2010-02-25 at 02:26 -0800, simn_stv wrote: i plan to build an application, a network based application that i estimate (and seriously hope) would get as many as 100, 000 hits a day (hehe,...my dad always told me to 'AIM HIGH' ;0), not some 'facebook' or anything like it, its mainly for

Re: Can't Access ANY url from python (errno 61)

2010-02-25 Thread Lie Ryan
On 02/24/10 17:07, MattB wrote: All -- problem solved. Following Lie's suggestions, and the links from those pages, I went hunting around in my /library/preferences/ SystemConfiguration/. I opened all of the 6 or 7 files that were in there, and all looked as if they contained info directly

A more pythonish code

2010-02-25 Thread prasad_chand
Hi, I use python to do simple math problems as a hobby. I have made a program that finds the number of divisors(factors) of a given number. I am hoping to improve my language skills, specifically I would like to re-write the function prime_factors more gracefully. While the program works right,

Re: Pure virtual functions in Python?

2010-02-25 Thread lallous
On Feb 21, 11:21 am, Lie Ryan lie.1...@gmail.com wrote: On 02/21/10 19:27,lallouswrote: snip If the base defines the method and it was empty, then my C++ code would still call the function. This is not optimal because I don't want to go from C++ to Python if the _derived_ class does not

Re: Pure virtual functions in Python?

2010-02-25 Thread lallous
On Feb 22, 12:42 am, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: lallouswrote: If the base defines the method and it was empty, then my C++ code would still call the function. This is not optimal because I don't want to go from C++ to Python if the _derived_ class does not implement

Walking lists

2010-02-25 Thread lallous
Hello I am still learning Python, and have a question, perhaps I can shorten the code: L = ( (1, 2, 3), (4,), (5,), (6, 7) ) for x in L: print x What I want, is to write the for loop, something like this: for (first_element, the_rest) in L: print first_element for x in

Re: When will Java go mainstream like Python?

2010-02-25 Thread Lie Ryan
On 02/25/10 07:40, Wanja Gayk wrote: Am 24.02.2010, 00:22 Uhr, schrieb Lawrence D'Oliveiro l...@geek-central.gen.new_zealand: Java - The JVM code been hacked to death by Sun engineers (optimised) Python - The PVM code has seen speed-ups in Unladen or via Pyrex.. ad-infinitum but nowhere as

Re: Walking lists

2010-02-25 Thread Peter Otten
lallous wrote: I am still learning Python, and have a question, perhaps I can shorten the code: L = ( (1, 2, 3), (4,), (5,), (6, 7) ) for x in L: print x What I want, is to write the for loop, something like this: for (first_element, the_rest) in L: print

Re: taking python enterprise level?...

2010-02-25 Thread simn_stv
On Feb 25, 12:13 pm, Steve Holden st...@holdenweb.com wrote: simn_stv wrote: hello people, i have been reading posts on this group for quite some time now and many, if not all (actually not all!), seem quite interesting. i plan to build an application, a network based application that i

Re: What's the word on using to comment-out?

2010-02-25 Thread Lie Ryan
On 02/25/10 05:18, kj wrote: I think I remember, early in my learning of Python, coming across the commandment THOU SHALT NOT USE TRIPLE-QUOTES TO COMMENT-OUT LINES OF CODE, or something to that effect. But now I can't find it! I've never heard of it, though I can think of a few reasons why

Re: Walking lists

2010-02-25 Thread Tim Chase
lallous wrote: L = ( (1, 2, 3), (4,), (5,), (6, 7) ) What I want, is to write the for loop, something like this: for (first_element, the_rest) in L: print first_element for x in the_rest: # now access the rest of the elements Python 3 introduced a variable tuple assignment

why (1, 2, 3) [1, 2, 3] is true?

2010-02-25 Thread fat bold cyclop
I tired to google for comparison of tuple to list but i failed. Could anyone explain it to me? Best regards, fat bold cyclop -- http://mail.python.org/mailman/listinfo/python-list

RE: What's the word on using to comment-out?

2010-02-25 Thread macbeth
From: Lie Ryan On 02/25/10 05:18, kj wrote: I think I remember, early in my learning of Python, coming across the commandment THOU SHALT NOT USE TRIPLE-QUOTES TO COMMENT-OUT LINES OF CODE, or something to that effect. But now I can't find it! I've never heard of it, though I can

Re: taking python enterprise level?...

2010-02-25 Thread Tim Chase
simn_stv wrote: i plan to build an application, a network based application that i estimate (and seriously hope) would get as many as 100, 000 hits a day (hehe,...my dad always told me to 'AIM HIGH' ;0), not some 'facebook' or anything like it, its mainly for a financial transactions which gets

Re: How to monitor memory usage within Python? (Linux)

2010-02-25 Thread Giampaolo Rodola'
On 24 Feb, 23:35, kj no.em...@please.post wrote: Is there some standard module for getting info about the process's memory usage, in a Linux/Unix system? (I want to avoid hacks that involve, e.g., scraping ps's output.) Thanks! ~K http://code.google.com/p/psutil import psutil p =

Re: When will Java go mainstream like Python?

2010-02-25 Thread Silvio
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote in message news:hm4icr$q4...@lust.ihug.co.nz... In message op.u8nfpex8y5e...@laptopwanja, Wanja Gayk wrote: Reference counting is about the worst technique for garbage collection. It avoids the need for garbage collection. It

Re: Walking lists

2010-02-25 Thread Arnaud Delobelle
lallous wrote: Hello I am still learning Python, and have a question, perhaps I can shorten the code: L = ( (1, 2, 3), (4,), (5,), (6, 7) ) for x in L: print x What I want, is to write the for loop, something like this: for (first_element, the_rest) in L: print

Re: Using mock library (written by Michael Foord)

2010-02-25 Thread Peter Otten
Lacrima wrote: I use mock library http://www.voidspace.org.uk/python/mock/. There is no user group for the library, so I post in comp.lang.python and hope that people who use it will help me. The library allows to patch objects, using patch decorator. Patching is done only within the scope

The best way to check if two lists have identical values

2010-02-25 Thread mk
Hello everyone, I have stumbled upon this seemingly trivial problem: the answer is not there in http://www.python.org/doc/faq/programming/, and googling does not return many references really (at least for me). I have come up with this: def qips_identical(q, oldq): qips =

Re: Walking lists

2010-02-25 Thread lallous
Thank you all for the replies. The solution using Python 3's syntax look very intuitive. Thanks Tim, Arnaud for the idea (I am using 2.x) -- Elias On Feb 25, 1:28 pm, lallous elias.bachaal...@gmail.com wrote: Hello I am still learning Python, and have a question, perhaps I can shorten the

Re: Easter Eggs

2010-02-25 Thread mk
On 2010-02-25 03:04, Gabriel Genellina wrote: Also try: import antigravity Is this Py3 egg? My 2.6 doesn't seem to get it. Regards, mk -- http://mail.python.org/mailman/listinfo/python-list

Re: Spam from gmail (Was: fascism)

2010-02-25 Thread BJ Swope
If you like, but I tend to interpret meta- as idempotent. It's easier on my aspirin budget. -- Robert Kern And here I thought it was little blue pills for idempotentcy... Life is a sexually transmitted disease with a 100% fatality rate. -- brazzy Auburn fans are like slinkys... not

Re: why (1, 2, 3) [1, 2, 3] is true?

2010-02-25 Thread Stefan Behnel
fat bold cyclop, 25.02.2010 14:00: I tired to google for comparison of tuple to list but i failed. Could anyone explain it to me? Both are not equal, so the comparison returns an arbitrary result in Py2. Note that this was fixed in Py3: Python 3.1.1+ (r311:74480, Nov 2 2009, 15:45:00) [GCC

Re: Signature-based Function Overloading in Python

2010-02-25 Thread Michael Rudolf
Am 25.02.2010 11:58, schrieb Jean-Michel Pichavant: You said it yourself: simply make two or three functions and name them appropiately :-) When 2 methods of a class were to have the same name for doing completely different things like you said, there's a design flaw to my opinion. JM I

Re: The best way to check if two lists have identical values

2010-02-25 Thread Peter Otten
mk wrote: I have stumbled upon this seemingly trivial problem: the answer is not there in http://www.python.org/doc/faq/programming/, and googling does not return many references really (at least for me). I have come up with this: def qips_identical(q, oldq): qips =

Re: taking python enterprise level?...

2010-02-25 Thread D'Arcy J.M. Cain
On Thu, 25 Feb 2010 02:26:18 -0800 (PST) simn_stv nany...@googlemail.com wrote: i plan to build an application, a network based application that i estimate (and seriously hope) would get as many as 100, 000 hits a day That's nothing. I ran a financial type app on Python that sometimes hit

Re: The best way to check if two lists have identical values

2010-02-25 Thread Arnaud Delobelle
mk wrote: Hello everyone, I have stumbled upon this seemingly trivial problem: the answer is not there in http://www.python.org/doc/faq/programming/, and googling does not return many references really (at least for me). I have come up with this: def qips_identical(q, oldq): qips

Re: why (1, 2, 3) [1, 2, 3] is true?

2010-02-25 Thread fat bold cyclop
Both are not equal, so the comparison returns an arbitrary result in Py2. Thanks, Stefan. If I understand you correctly the comparison is not valid. But I wonder if there is any logic behind this (in 2.x). Is it possible to predict result of this comparison? Thanks again, fbc --

Re: Is this secure?

2010-02-25 Thread mk
On 2010-02-25 02:07, Steven D'Aprano wrote: On Wed, 24 Feb 2010 18:23:17 +0100, mk wrote: Anyway, the passwords for authorized users will be copied and pasted from email into in the application GUI which will remember it for them, so they will not have to remember and type them in. So to

Re: Pure virtual functions in Python?

2010-02-25 Thread Jean-Michel Pichavant
lallous wrote: I still prefer not to call at all, even if it was an empty function. Regards, Elias Is there any way we could convince you that there is no point caring about this ? Even if you were trying to optimize speed, it would still require proof that an empty function is part of

Re: why (1, 2, 3) [1, 2, 3] is true?

2010-02-25 Thread Richard Thomas
On Feb 25, 2:03 pm, fat bold cyclop fat.bold.cyc...@gmail.com wrote: Both are not equal, so the comparison returns an arbitrary result in Py2. Thanks, Stefan. If I understand you correctly the comparison is not valid. But I wonder if there is any logic behind this (in 2.x). Is it possible

Re: why (1, 2, 3) [1, 2, 3] is true?

2010-02-25 Thread Iain King
On Feb 25, 2:03 pm, fat bold cyclop fat.bold.cyc...@gmail.com wrote: Both are not equal, so the comparison returns an arbitrary result in Py2. Thanks, Stefan. If I understand you correctly the comparison is not valid. But I wonder if there is any logic behind this (in 2.x). Is it possible

Re: The best way to check if two lists have identical values

2010-02-25 Thread Daniel Stutzbach
On Thu, Feb 25, 2010 at 7:30 AM, mk mrk...@gmail.com wrote: There's a number of complications here, depending on definition of 'lists with identical values', like whether the same value can be repeated different number of times in two lists, or whether the order of values matters. Order and

Re: Walking lists

2010-02-25 Thread Jean-Michel Pichavant
lallous wrote: Thank you all for the replies. The solution using Python 3's syntax look very intuitive. Thanks Tim, Arnaud for the idea (I am using 2.x) -- Elias On Feb 25, 1:28 pm, lallous elias.bachaal...@gmail.com wrote: Hello I am still learning Python, and have a question, perhaps I

Re: The best way to check if two lists have identical values

2010-02-25 Thread mk
On 2010-02-25 14:55, Arnaud Delobelle wrote: Your code checks if the two lists have the same length and the same elements, but not necessarily the same number of each elements. E.g. qips = [1, 1, 2] oldqips = [1, 2, 2] will return True If you want to check if each value has the

Re: why (1, 2, 3) [1, 2, 3] is true?

2010-02-25 Thread Stefan Behnel
fat bold cyclop, 25.02.2010 15:03: Both are not equal, so the comparison returns an arbitrary result in Py2. Thanks, Stefan. If I understand you correctly the comparison is not valid. But I wonder if there is any logic behind this (in 2.x). Is it possible to predict result of this comparison?

Re: Is this secure?

2010-02-25 Thread mk
On 2010-02-25 02:31, Paul Rubin wrote: It might be helpful if you could say what your application does, or anyway give an idea of what its actual security requirements are. Generating and emailing someone a random password is a fairly standard method for (e.g.) web forums to verify that the

Re: What's the word on using to comment-out?

2010-02-25 Thread Grant Edwards
On 2010-02-25, Paul Rudin paul.nos...@rudin.co.uk wrote: kj no.em...@please.post writes: I think I remember, early in my learning of Python, coming across the commandment THOU SHALT NOT USE TRIPLE-QUOTES TO COMMENT-OUT LINES OF CODE, or something to that effect. But now I can't find it!

Renaming identifiers debugging

2010-02-25 Thread Luca
Hello, i am trying to develop an application to teach programming to young kids in a similar way as Logo did in the past. I would like to use an embedded Python as underlying language but this raises a problem. The target of my app are very young kids that might be unfamiliar with english, so

Re: taking python enterprise level?...

2010-02-25 Thread Martin P. Hellwig
On 02/25/10 13:58, D'Arcy J.M. Cain wrote: On Thu, 25 Feb 2010 02:26:18 -0800 (PST) cut Our biggest problem was in a network heavy element of the app and that was low level TCP/IP stuff that rather than being Python's problem was something we used Python to fix. cut Out off interest, could

round() function

2010-02-25 Thread Tracubik
hi all, i've this sample code: n = 4.499 str(round(n,2)) '4.5' that's right, but what i want is '4.50' to be displayed instead of '4.5'. Off course i know that 4.5 = 4.50, still i'ld like to have 4.50. How can I solve this? Thanks in advance Nico --

Re: round() function

2010-02-25 Thread Tim Chase
Tracubik wrote: n = 4.499 str(round(n,2)) '4.5' that's right, but what i want is '4.50' to be displayed instead of '4.5'. Off course i know that 4.5 = 4.50, still i'ld like to have 4.50. Use string formatting: %0.2f % round(4.499, 2) '4.50' -tkc --

Re: round() function

2010-02-25 Thread mailing list
On 25.2.2010. 16:39, Tracubik wrote: hi all, i've this sample code: n = 4.499 str(round(n,2)) '4.5' that's right, but what i want is '4.50' to be displayed instead of '4.5'. Off course i know that 4.5 = 4.50, still i'ld like to have 4.50. How can I solve this? Thanks in

Re: round() function

2010-02-25 Thread Stefan Behnel
Tracubik, 25.02.2010 16:39: hi all, i've this sample code: n = 4.499 str(round(n,2)) '4.5' that's right, but what i want is '4.50' to be displayed instead of '4.5'. Off course i know that 4.5 = 4.50, still i'ld like to have 4.50. How can I solve this? Format the number as a string:

Re: What's the word on using to comment-out?

2010-02-25 Thread Michael Rudolf
Am 25.02.2010 16:07, schrieb Grant Edwards: On 2010-02-25, Paul Rudinpaul.nos...@rudin.co.uk wrote: No idea, but it would be nice to have some multiline comment syntax (other than # at the beginning of each line). Particularly one that can be nested. if 0: Seriously, that's what I generally

Can I specify regex group to return float or int instead of string?

2010-02-25 Thread Jeremy
I have a regular expression that searches for some numbers and puts them into a dictionary, i.e. '(?Pinteger\d+)\s+(?Pfloat\d+\.\d+)' Is it possible to have the results of the matches returned as int or float objects instead of strings? Thanks, Jeremy --

Re: Recommended new way for config files

2010-02-25 Thread Nicola Larosa (tekNico)
Peter wrote: There seems to be several strategies to enhance the old ini-style config files with real python code [...] Is there a strategy that should be prefered for new projects ? 5) Use ConfigObj http://www.voidspace.org.uk/python/configobj.html, by Michael Foord and yours truly. It uses

Re: When will Java go mainstream like Python?

2010-02-25 Thread Mel
sjdevn...@yahoo.com wrote: You're right that ref counting in many implementations is more deterministic than other common forms of garbage collection; IMO, Python would be well-served by making the ref-counting semantics it currently has a guaranteed part of the language spec--or at least

Re: round() function

2010-02-25 Thread Michael Rudolf
Am 25.02.2010 16:39, schrieb Tracubik: hi all, i've this sample code: n = 4.499 str(round(n,2)) '4.5' that's right, but what i want is '4.50' to be displayed instead of '4.5'. Off course i know that 4.5 = 4.50, still i'ld like to have 4.50. How can I solve this? Thanks in advance Nico

Re: A more pythonish code

2010-02-25 Thread nn
prasad_chand wrote: Hi, I use python to do simple math problems as a hobby. I have made a program that finds the number of divisors(factors) of a given number. I am hoping to improve my language skills, specifically I would like to re-write the function prime_factors more gracefully.

Re: taking python enterprise level?...

2010-02-25 Thread D'Arcy J.M. Cain
On Thu, 25 Feb 2010 15:29:34 + Martin P. Hellwig martin.hell...@dcuktec.org wrote: On 02/25/10 13:58, D'Arcy J.M. Cain wrote: On Thu, 25 Feb 2010 02:26:18 -0800 (PST) cut Our biggest problem was in a network heavy element of the app and that was low level TCP/IP stuff that rather

Re: Signature-based Function Overloading in Python

2010-02-25 Thread Bruno Desthuilliers
Michael Rudolf a écrit : (snip) (pseudocode - this is *not* python ;) class Machines (Object): @classmethod def shutdown(cls, Machine, emergency=False): try: if Machine is instanceof(Fileservers): if not emergency:

hs.py = run an exec and pipe back the result as a member of a list

2010-02-25 Thread '2+
did this for hascillator01 that i ghc-ed from hascillator01.hs into ./ import popen2 wave = [] for frame in range(890, 1010): wave.append(int(popen2.Popen3('./hascillator01 ' + str(frame)).fromchild.readline())) print wave hascillator01 takes int and returns another int so yes this became a

Re: hs.py = run an exec and pipe back the result as a member of a list

2010-02-25 Thread '2+
oops the code was wrong .. sorry import popen2 wave = [] for frame in range(890, 1010): wave.append(int(popen2.Popen3('./hascillator01 ' + str(frame)).fromchild.readline())) print wave On Fri, Feb 26, 2010 at 1:22 AM, '2+ electriclighthe...@gmail.com wrote: did this for hascillator01 that

Re: Is this secure?

2010-02-25 Thread Robert Kern
On 2010-02-25 09:03 AM, mk wrote: 2. The app will have GUI and it will be locally installed; it's not going to be web app, it will just be online in the sense of downloading data frequently from the net. If you are storing the password instead of making your user remember it, most platforms

Re: Easter Eggs

2010-02-25 Thread Aahz
In article mailman.226.1267105118.4577.python-l...@python.org, mk mrk...@gmail.com wrote: On 2010-02-25 03:04, Gabriel Genellina wrote: Also try: import antigravity Is this Py3 egg? My 2.6 doesn't seem to get it. Maybe 2.7 will have it; 3.0.1 does. -- Aahz (a...@pythoncraft.com) *

Re: Trouble with ftplib uploading to an FTP server

2010-02-25 Thread Sky Larking
On Feb 25, 1:10 am, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Wed, 24 Feb 2010 17:21:58 -0800 (PST), Sky Larking skylarkin...@gmail.com declaimed the following in gmane.comp.python.general: For instance I just ran the script and os.rename() renamed it to: TestMachine.local @

Re: taking python enterprise level?...

2010-02-25 Thread Aahz
In article 5cd38064-34d6-40d3-b3dc-2c853fc86...@i39g2000yqm.googlegroups.com, simn_stv nany...@googlemail.com wrote: i plan to build an application, a network based application that i estimate (and seriously hope) would get as many as 100, 000 hits a day (hehe,...my dad always told me to 'AIM

CGI File Upload Problem with Python 3.1 on IIS 7

2010-02-25 Thread huseyin
I am trying to upload files through cgi script written in python 3.1 on a Windows IIS 7 server. The server time out when I write in usual way that is form=cgi.cgi.FieldStorage() fileitem = form['filename'] fn = os.path.basename(fileitem.filename) open('/tmp/' + fn,

Re: What's the word on using to comment-out?

2010-02-25 Thread Grant Edwards
On 2010-02-25, Michael Rudolf spamfres...@ch3ka.de wrote: Am 25.02.2010 16:07, schrieb Grant Edwards: On 2010-02-25, Paul Rudinpaul.nos...@rudin.co.uk wrote: No idea, but it would be nice to have some multiline comment syntax (other than # at the beginning of each line). Particularly one that

Re: Can I specify regex group to return float or int instead of string?

2010-02-25 Thread Steven D'Aprano
On Thu, 25 Feb 2010 07:48:44 -0800, Jeremy wrote: I have a regular expression that searches for some numbers and puts them into a dictionary, i.e. '(?Pinteger\d+)\s+(?Pfloat\d+\.\d+)' Is it possible to have the results of the matches returned as int or float objects instead of strings?

Re: Renaming identifiers debugging

2010-02-25 Thread Steven D'Aprano
On Thu, 25 Feb 2010 16:26:32 +0100, Luca wrote: Hello, i am trying to develop an application to teach programming to young kids in a similar way as Logo did in the past. I would like to use an embedded Python as underlying language but this raises a problem. The target of my app are very

Re: Why tarfile.TarFile.gzopen is not in the online documentation?

2010-02-25 Thread Lars Gustäbel
On Wed, Feb 24, 2010 at 04:29:18PM -0500, Terry Reedy wrote: On 2/24/2010 5:14 AM, Lars Gustäbel wrote: On Wed, Feb 24, 2010 at 09:37:19AM +0100, Baptiste Lepilleur wrote: I stumbled uppon this and find it somewhat odd: some class methods of TarFile and TarInfo do not appears in either the

Re: Can I specify regex group to return float or int instead of string?

2010-02-25 Thread Jeremy
On Feb 25, 9:41 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Thu, 25 Feb 2010 07:48:44 -0800, Jeremy wrote: I have a regular expression that searches for some numbers and puts them into a dictionary, i.e. '(?Pinteger\d+)\s+(?Pfloat\d+\.\d+)' Is it possible to have

Re: taking python enterprise level?...

2010-02-25 Thread Roy Smith
In article mailman.244.1267114628.4577.python-l...@python.org, D'Arcy J.M. Cain da...@druid.net wrote: The problem had to do with the way TCP/IP works, especially closer to the core. Our provider was collecting data and sending it only after filling a buffer or after a timeout. The timeout

Re: Renaming identifiers debugging

2010-02-25 Thread Luca
Chris Rebert wrote: On Thu, Feb 25, 2010 at 7:26 AM, Luca lu...@despammed.com wrote: Hello, i am trying to develop an application to teach programming to young kids in a similar way as Logo did in the past. I would like to use an embedded Python as underlying language but this raises a problem.

Re: Pedantic pickling error after reload?

2010-02-25 Thread Diez B. Roggisch
Am 25.02.10 18:08, schrieb Robert: After (intended/controlled) reload or similar action on a module/class the pickle/cPickle.dump raises errors like pickle.PicklingError: Can't pickle class 'somemodule.SomeClass': it's not the same object as somemodule.SomeClass Cause in pickle.py (and

Best auto insurance company

2010-02-25 Thread coolboy8
Find the Best auto insurance company here please visit http://autoinsurancerathere.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Why tarfile.TarFile.gzopen is not in the online documentation?

2010-02-25 Thread Terry Reedy
On 2/25/2010 11:51 AM, Lars Gustäbel wrote: On Wed, Feb 24, 2010 at 04:29:18PM -0500, Terry Reedy wrote: On 2/24/2010 5:14 AM, Lars Gustäbel wrote: On Wed, Feb 24, 2010 at 09:37:19AM +0100, Baptiste Lepilleur wrote: I stumbled uppon this and find it somewhat odd: some class methods of TarFile

Re: taking python enterprise level?...

2010-02-25 Thread Martin P. Hellwig
On 02/25/10 16:18, D'Arcy J.M. Cain wrote: cut working around ISP's with braindead network configurations Very interesting, I had a similar kind of problem (a network balancer that doesn't balance small tcp packages too well) and solved it by wrapping the TCP package in UDP. UDP was treated

Re: Renaming identifiers debugging

2010-02-25 Thread Chris Rebert
On Thu, Feb 25, 2010 at 7:26 AM, Luca lu...@despammed.com wrote: Hello, i am trying to develop an application to teach programming to young kids in a similar way as Logo did in the past. I would like to use an embedded Python as underlying language but this raises a problem. The target of my

Re: When will Java go mainstream like Python?

2010-02-25 Thread Wanja Gayk
Am 25.02.2010, 02:05 Uhr, schrieb Lawrence D'Oliveiro l...@geek-central.gen.new_zealand: In message op.u8nfpex8y5e...@laptopwanja, Wanja Gayk wrote: Reference counting is about the worst technique for garbage collection. It avoids the need for garbage collection. It means I can write

Re: Renaming identifiers debugging

2010-02-25 Thread MRAB
Luca wrote: Chris Rebert wrote: On Thu, Feb 25, 2010 at 7:26 AM, Luca lu...@despammed.com wrote: Hello, i am trying to develop an application to teach programming to young kids in a similar way as Logo did in the past. I would like to use an embedded Python as underlying language but this

Re: Artificial Neural Networks recommendation wanted

2010-02-25 Thread Gereon Kaiping
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, - - PyNN (just a builder, requires external simulator) –http://neuralensemble.org/trac/PyNN/ - - Con-x (part of pyro) –http://pyrorobotics.org/?page=Conx - - PyNeurGen (includes genetic algorithms) –http://pyneurgen.sourceforge.net/ - -

Re: Walking lists

2010-02-25 Thread Mensanator
On Feb 25, 7:02 am, Tim Chase python.l...@tim.thechases.com wrote: Python 3 introduced a variable tuple assignment which I suspect[*] would work in this context:    for first, *rest in L: # note the asterisk      print first      for x in rest:        do_stuff(x) [*] not having py3 on

Re: Renaming identifiers debugging

2010-02-25 Thread Diez B. Roggisch
Am 25.02.10 20:27, schrieb Luca: Chris Rebert wrote: On Thu, Feb 25, 2010 at 7:26 AM, Luca lu...@despammed.com wrote: Hello, i am trying to develop an application to teach programming to young kids in a similar way as Logo did in the past. I would like to use an embedded Python as underlying

Re: why (1, 2, 3) [1, 2, 3] is true?

2010-02-25 Thread Terry Reedy
On 2/25/2010 9:21 AM, Richard Thomas wrote: On Feb 25, 2:03 pm, fat bold cyclopfat.bold.cyc...@gmail.com wrote: Both are not equal, so the comparison returns an arbitrary result in Py2. Thanks, Stefan. If I understand you correctly the comparison is not valid. But I wonder if there is any

Re: Can I specify regex group to return float or int instead of string?

2010-02-25 Thread nn
On Feb 25, 12:20 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Thu, 25 Feb 2010 09:00:07 -0800, Jeremy wrote: On Feb 25, 9:41 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Thu, 25 Feb 2010 07:48:44 -0800, Jeremy wrote: I have a regular

  1   2   >