Re: stackoverflow and c.l.py

2011-09-13 Thread Ethan Furman
Steven D'Aprano wrote: On Wed, 14 Sep 2011 02:12 pm Stefan Behnel wrote: Matt Joiner, 14.09.2011 04:23: i'm curious as to what can be done with (and handled better) by adjusting sys.setswitchinterval i've opened a question on SO for this, that people might find of interest: http://stackoverflo

Re: ANN: unpyc3 - a python bytecode decompiler for Python3

2011-09-13 Thread Arnaud Delobelle
On 14 September 2011 06:53, Vincent Vande Vyvre wrote: > > Hi, trying your code, I have had numbers of errors: Hi Vincent, thanks for trying it. >   File "unpyc3.py", line 55, in >     SETUP_WITH, > NameError: name 'SETUP_WITH' is not defined > > commented it > >   File "unpyc3.py", line 58, in

memory error

2011-09-13 Thread questions anon
Hello All, I keep coming across a memory error when processing many netcdf files. I assume it has something to do with how I loop things and maybe need to close things off properly. In the code below I am looping through a bunch of netcdf files (each file is hourly data for one month) and within ea

Re: ANN: unpyc3 - a python bytecode decompiler for Python3

2011-09-13 Thread Vincent Vande Vyvre
Le 13/09/11 22:20, Arnaud Delobelle a écrit : Hi all, Unpyc3 can recreate Python3 source code from code objects, function source code from function objects, and module source code from .pyc files. The current version is able to decompile itself successfully :). It has been t

Re: stackoverflow and c.l.py (was: GIL switch interval)

2011-09-13 Thread Steven D'Aprano
On Wed, 14 Sep 2011 02:12 pm Stefan Behnel wrote: > Matt Joiner, 14.09.2011 04:23: >> i'm curious as to what can be done with (and handled better) by >> adjusting sys.setswitchinterval >> i've opened a question on SO for this, that people might find of >> interest: http://stackoverflow.com[...] >

stackoverflow and c.l.py (was: GIL switch interval)

2011-09-13 Thread Stefan Behnel
Matt Joiner, 14.09.2011 04:23: i'm curious as to what can be done with (and handled better) by adjusting sys.setswitchinterval i've opened a question on SO for this, that people might find of interest: http://stackoverflow.com[...] I wonder why people ask this kind of question on stackoverflow,

Connection reset by peer

2011-09-13 Thread 守株待兔
there is a multi-threads program dowloading data from yahoo,the main structure is as the following(omit something unimportant ) class webdata(object): def __init__(self,name): self.jobs = Queue.Queue() if x in name: self.jobs.put(x) def download(self

GIL switch interval

2011-09-13 Thread Matt Joiner
i'm curious as to what can be done with (and handled better) by adjusting sys.setswitchinterval i've opened a question on SO for this, that people might find of interest: http://stackoverflow.com/questions/7376776/sys-setswitchinterval-in-python-3-2-and-beyond -- http://mail.python.org/mailman/li

Re: PyWart: Itertools module needs attention

2011-09-13 Thread rantingrick
On Sep 13, 10:45 am, Ian Kelly wrote: > Have you looked at the online itertools documentation at all? > > http://docs.python.org/library/itertools.html Yes the online docs are much better. I really like the source code showing the inner workings of the methods. However i always get upset when i

Re: Need some experience

2011-09-13 Thread Tim Hanson
On Tuesday, September 13, 2011 06:12:27 pm Terry Reedy wrote: > >> It's a great idea. We are always looking for volunteers that help the > >> community to reduce the amount of open bugs. The bug tracker at > >> http://bugs.python.org/ even has a category for beginners. You just have > >> to search

Offer various hats including Red Bull Hats on http://www.mlbhatshop.com/

2011-09-13 Thread zhenzhen zhang
Defending MX2 champion Ken is currently leading the MX2 championship while Max Nagl heads to his favourite track of the season looking for points to close the gap on fellow Red Bull Teka KTM Factory Racing team http://www.mlbhatshop.com/ rider Tony Cairoli. by red bull hats. -- http://mail.pytho

Re: Need some experience

2011-09-13 Thread Terry Reedy
It's a great idea. We are always looking for volunteers that help the community to reduce the amount of open bugs. The bug tracker at http://bugs.python.org/ even has a category for beginners. You just have to search for keyword -> easy and you'll get a bunch of low hanging fruits to pick from.

RE: ImportError: cannot import name dns

2011-09-13 Thread Prasad, Ramit
-Original Message- From: python-list-bounces+ramit.prasad=jpmorgan@python.org [mailto:python-list-bounces+ramit.prasad=jpmorgan@python.org] On Behalf Of Jack Bates Sent: Tuesday, September 13, 2011 5:28 PM To: python-list@python.org Subject: ImportError: cannot import name dns Wh

Re: The Usenet newsgroup news:comp.lang.python ...

2011-09-13 Thread Chris Angelico
On Wed, Sep 14, 2011 at 8:53 AM, Prasad, Ramit wrote: > I was wondering since the text seemed like plausible non-spam (to me). > I suspect it was autogenerated from subject lines of recent emails. It'd not be hard to design a template that covers comp.lang.* or even comp.*. ChrisA -- http://mai

RE: The Usenet newsgroup news:comp.lang.python ...

2011-09-13 Thread Prasad, Ramit
>> Mikael Lyngvig accurately summarizes comp.lang.python discussion >No, you're posting spam links. Go away and spend the rest of your >miserable life in a deep hole. I was wondering since the text seemed like plausible non-spam (to me). Ramit Ramit Prasad | JPMorgan Chase Investment Bank | C

Re: The Usenet newsgroup news:comp.lang.python ...

2011-09-13 Thread Ben Finney
mano mano writes: > Mikael Lyngvig accurately summarizes comp.lang.python discussion No, you're posting spam links. Go away and spend the rest of your miserable life in a deep hole. -- \ “If society were bound to invent technologies which could only | `\ be used entirely within the l

Re: Need some experience

2011-09-13 Thread Ben Finney
Tim Hanson writes: > On Tuesday, September 13, 2011 02:36:52 pm Christian Heimes wrote: > > We are always looking for volunteers that help the community to > > reduce the amount of open bugs. The bug tracker at > > http://bugs.python.org/ even has a category for beginners. You just > > have to se

ImportError: cannot import name dns

2011-09-13 Thread Jack Bates
Why is the following ImportError raised? $ ./test Traceback (most recent call last): File "./test", line 3, in from foo import dns File "/home/jablko/foo/dns.py", line 1, in from foo import udp File "/home/jablko/foo/udp.py", line 1, in from foo import dns ImportError: cannot

Re: Need some experience

2011-09-13 Thread Tim Hanson
On Tuesday, September 13, 2011 02:36:52 pm Christian Heimes wrote: > Am 13.09.2011 22:52, schrieb Tim Hanson: > > That's not a bad idea. From the past I know that bug fixing is a great > > way to learn a language. If you know a specific site to key in on, feel > > free to send me there. Otherwis

Re: Need some experience

2011-09-13 Thread Christian Heimes
Am 13.09.2011 22:52, schrieb Tim Hanson: > That's not a bad idea. From the past I know that bug fixing is a great way > to > learn a language. If you know a specific site to key in on, feel free to > send > me there. Otherwise I'll poke around the Python site and find it. It's a great idea.

Re: Need some experience

2011-09-13 Thread Tim Hanson
On Tuesday, September 13, 2011 01:37:05 pm Thomas Jollans wrote: > On 13/09/11 22:25, Tim Hanson wrote: > > I have been a desktop Linux user for better than eleven years, as a > > hobby. Back when we still did most of our computing on desktops I even > > set up a rudimentary server setup in my home

Re: Need some experience

2011-09-13 Thread Tim Hanson
On Tuesday, September 13, 2011 01:37:05 pm Thomas Jollans wrote: > On 13/09/11 22:25, Tim Hanson wrote: > > I have been a desktop Linux user for better than eleven years, as a > > hobby. Back when we still did most of our computing on desktops I even > > set up a rudimentary server setup in my home

Re: Need some experience

2011-09-13 Thread Thomas Jollans
On 13/09/11 22:25, Tim Hanson wrote: > I have been a desktop Linux user for better than eleven years, as a hobby. > Back when we still did most of our computing on desktops I even set up a > rudimentary server setup in my home. Nothing fancy or anything, but I was > proud of it and of the fact

Need some experience

2011-09-13 Thread Tim Hanson
I have been a desktop Linux user for better than eleven years, as a hobby. Back when we still did most of our computing on desktops I even set up a rudimentary server setup in my home. Nothing fancy or anything, but I was proud of it and of the fact that it was built Microsoft free. I have no

ANN: unpyc3 - a python bytecode decompiler for Python3

2011-09-13 Thread Arnaud Delobelle
Hi all, Unpyc3 can recreate Python3 source code from code objects, function source code from function objects, and module source code from .pyc files. The current version is able to decompile itself successfully :). It has been tested with Python3.2 only. It currently reconstructs most of Python

Re: Invoke a superclass method from a subclass constructor

2011-09-13 Thread Kayode Odeyemi
On Tue, Sep 13, 2011 at 8:31 PM, Dave Angel wrote: > I suspect you're just confused by things the interactive session is > printing out, which are not part of the language, and work a bit > differently. You are right. This is where I missed it. The command interface requires a print command, as

Re: Invoke a superclass method from a subclass constructor

2011-09-13 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Kayode Odeyemi wrote: When an instance of a class is created, all codes within that instance block should be executed. That's my understanding of OOP. I don't understand this phrasing at all. Could you show a specific example of something that does not execute code

Re: How do I automate the removal of all non-ascii characters from my code?

2011-09-13 Thread Vlastimil Brom
2011/9/13 Alec Taylor : > Hmm, nothing mentioned so far works for me... > > Here's a very small test case: > python -u "Convert to Creole.py" >  File "Convert to Creole.py", line 1 > SyntaxError: Non-ASCII character '\xe2' in file Convert to Creole.py > on line 1, but no encoding declared; see

Re: Invoke a superclass method from a subclass constructor

2011-09-13 Thread Ian Kelly
On Tue, Sep 13, 2011 at 10:56 AM, Kayode Odeyemi wrote: class B(A): > ...     def __init__(self, module): > ...             self.module = A.log(self, module) > ...             print self.module # printing here is completely unnecessary > in a good OOP language > ... c = B('system') > log

Re: Invoke a superclass method from a subclass constructor

2011-09-13 Thread Kayode Odeyemi
On Tue, Sep 13, 2011 at 5:46 PM, Prasad, Ramit wrote: > >You should be passed super the current class you want the super class of, > not the type of the super class. So it should be: > > >super(*B*, self).log('system') # Notice that it passed class B > > ** ** > > Ugh, apologies for the po

RE: Invoke a superclass method from a subclass constructor

2011-09-13 Thread Prasad, Ramit
>You should be passed super the current class you want the super class of, not >the type of the super class. So it should be: >super(B, self).log('system') # Notice that it passed class B Ugh, apologies for the poor English; my tea has not kicked in. That first line would be more understandable

RE: Invoke a superclass method from a subclass constructor

2011-09-13 Thread Prasad, Ramit
Written by Kayode Odeyemi Well, I did try using super(), but I got this: >>> class B(A): ... def __init__(self, module): ... super(A, self).log('system') ... >>> c = B('module') = You should be passed super the current class you want t

Re: PyWart: Itertools module needs attention

2011-09-13 Thread Ian Kelly
On Mon, Sep 12, 2011 at 4:04 PM, rantingrick wrote: > > > #                          Quote                           # > > # The itertools module is great HOWEVER i believe mos

Re: How do I automate the removal of all non-ascii characters from my code?

2011-09-13 Thread Jussi Piitulainen
Alec Taylor writes: > Hmm, nothing mentioned so far works for me... > > Here's a very small test case: > > >>> python -u "Convert to Creole.py" > File "Convert to Creole.py", line 1 > SyntaxError: Non-ASCII character '\xe2' in file Convert to Creole.py > on line 1, but no encoding declared; se

Re: How do I automate the removal of all non-ascii characters from my code?

2011-09-13 Thread Alec Taylor
Hmm, nothing mentioned so far works for me... Here's a very small test case: >>> python -u "Convert to Creole.py" File "Convert to Creole.py", line 1 SyntaxError: Non-ASCII character '\xe2' in file Convert to Creole.py on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263

Re: send string to input of another process

2011-09-13 Thread Kushal Kumaran
On 13 Sep 2011 17:53, "Alex Naumov" wrote: > > Hello everybody, > > I'm looking for some solution, maybe someone of you can help me. > > I call another process via os.system("process") and it waits for some input. I have to write a comment (for example, like using svn or git), and after that to cl

ACCU conference call for proposals

2011-09-13 Thread Jon Jagger
ACCU is a non-profit organisation run by software enthusiasts for software enthusiasts. ACCU warmly invites you to propose a session for this leading software development conference. Call for Proposals - ACCU 2012 April 24-28, 2012. Barcelo Oxford Hotel, Oxford, UK Submission website: https://ww

Re: PC locks up with list operations

2011-09-13 Thread Carl Banks
On Wednesday, August 31, 2011 5:49:24 AM UTC-7, Benjamin Kaplan wrote: > 32-bit or 64-bit Python? A 32-bit program will crash once memory hits > 2GB. A 64-bit program will just keep consuming RAM until your computer > starts thrashing. The problem isn't your program using more RAM than > you have,

Re: How do I automate the removal of all non-ascii characters from my code?

2011-09-13 Thread Vlastimil Brom
2011/9/13 ron : > > Depending on the load, you can do something like: > > "".join([x for x in string if ord(x) < 128]) > > It's worked great for me in cleaning input on webapps where there's a > lot of copy/paste from varied sources. > -- > http://mail.python.org/mailman/listinfo/python-list > Well

The Usenet newsgroup news:comp.lang.python ...

2011-09-13 Thread mano mano
Mikael Lyngvig accurately summarizes comp.lang.python discussion of the technical merits of Tkinter, wxPython, and Python-bound JPI. Malcolm Tredinnick ... http://123maza.com/48/doll789/ -- http://mail.python.org/mailman/listinfo/python-list

Re: problem:import csv data

2011-09-13 Thread Miki Tebeka
.separator (and .import) are not SQL commands but "sqlite3" commands. You can get the same effect with the following code: with open('/tmp/data.csv') as fo: reader = csv.reader(fo) cur.executemany('INSERT INTO quote VALUES (?, ?, ?, ?, ?, ?, ?)'), reader) HTH -- Miki Tebeka

Re: How do I automate the removal of all non-ascii characters from my code?

2011-09-13 Thread ron
On Sep 12, 4:49 am, Steven D'Aprano wrote: > On Mon, 12 Sep 2011 06:43 pm Stefan Behnel wrote: > > > I'm not sure what you are trying to say with the above code, but if it's > > the code that fails for you with the exception you posted, I would guess > > that the problem is in the "[more stuff her

send string to input of another process

2011-09-13 Thread Alex Naumov
Hello everybody, I'm looking for some solution, maybe someone of you can help me. I call another process via os.system("process") and it waits for some input. I have to write a comment (for example, like using svn or git), and after that to close input (for example, like ":wq" using vim). How can

problem:import csv data

2011-09-13 Thread 守株待兔
import sqlite3 con = sqlite3.connect('/home/stock.db') cur = con.cursor() cur.execute('''CREATE TABLE quote (ticker TEXT,date TEXT, popen TEXT, high TEXT, low TEXT,vol TEXT,adjclose TEXT);''') i=/tmp/data.csv cur.execute('.separator "," ') cur.execute('.import %s quote' % i) con.commit() cur.

Re: Should a beginner do some coding excises? How can I find the sources?

2011-09-13 Thread sillyou su
On Sep 13, 1:14 pm, memilanuk wrote: > On 09/12/2011 09:20 PM, sillyou su wrote: > > > I'm reading "Learning Python"( Chinese version). Before I go through > > the whole book, I want to do some excises matching each charter. > > Any tips? Any better advice? > > For the code examples, have you trie

Re: How do I automate the removal of all non-ascii characters from my code?

2011-09-13 Thread jmfauth
On 13 sep, 10:15, Steven D'Aprano wrote: The intrinsic coding of the characters is one thing, The usage of bytes stream supposed to represent a text is one another thing, jmf -- http://mail.python.org/mailman/listinfo/python-list

Michael Jordan 23.

2011-09-13 Thread fashion t shirts seller
In addition to the expression of this athletes foot propulsion technology that they run very fast from the other major areas, including Air Jordan 2009, satin sheets and the rear panel of nba basketball shoes, said middle layer blown-glass is a unique movement in each shoes. The silk is inspired by

Re: How do I automate the removal of all non-ascii characters from my code?

2011-09-13 Thread Steven D'Aprano
On Tue, 13 Sep 2011 05:49 pm jmfauth wrote: > On 12 sep, 23:39, "Rhodri James" wrote: > > >> Now read what Steven wrote again.  The issue is that the program contains >> characters that are syntactically illegal.  The "engine" can be perfectly >> correctly translating a character as a smart quo

Re: How do I automate the removal of all non-ascii characters from my code?

2011-09-13 Thread jmfauth
On 12 sep, 23:39, "Rhodri James" wrote: > Now read what Steven wrote again.  The issue is that the program contains   > characters that are syntactically illegal.  The "engine" can be perfectly   > correctly translating a character as a smart quote or a non breaking space   > or an e-umlaut or w

Re: Easiest framework to develop simple interactive web site in python?

2011-09-13 Thread limodou
On Tue, Sep 13, 2011 at 3:30 PM, John Reid wrote: > On 12/09/11 19:37, Stefaan Himpe wrote: >> >> The simplest one to learn is web2py http://www.web2py.com >> No configuration needed, just unpack and get started. >> It also has very good documentation and tons of little examples to get >> things d

Re: Easiest framework to develop simple interactive web site in python?

2011-09-13 Thread John Reid
On 12/09/11 19:37, Stefaan Himpe wrote: The simplest one to learn is web2py http://www.web2py.com No configuration needed, just unpack and get started. It also has very good documentation and tons of little examples to get things done. The other options you mentioned are good too :) OK I've h

Re: using python in web applications

2011-09-13 Thread alex23
On Sep 10, 1:54 pm, "Littlefield, Tyler" wrote: > I'm not feeling particularly masochistic, so I do not want to develop > this project in PHP; essentially I'm looking to build a web-based MMO. Google have been promoting the use of appengine along with HTML5 & JS to produce games. One advantage of