pyspread 0.0.12a released

2009-11-22 Thread Martin Manns
Pyspread is getting close to the first Beta. This new release should work with Windows as well as with Linux. About - Pyspread is a cross-platform Python spreadsheet application. It is based on and written in the programming language Python. Instead of spreadsheet formulas, Python

Python Ireland's Christmas meetup

2009-11-22 Thread Vicky Lee
Hi All, When: Wed 9th Dec, 18:30 Where: Bull and Castle, Christchurch, D2 What: - Food will be provided, please RSVPhttps://spreadsheets.google.com/viewform?formkey=dDlHTk9WcGhpWFZPekFhdTRWb1EwakE6MAby 6th Dec so we can ensure that we have enough platters. - Raffle with prizes thanks to O'Reilly

yappi v0.3

2009-11-22 Thread k3xji
Hi, yappi(yet another python profiler) is a Python Profiler with multithreading support. This is the last beta version with some major changes and bugfixes: v0.3 Changes - [+] yappi did not compile out of box on VS2008. Fix the compile issues. (Thanks to Kevin Watters) [+] tidy up stat

Re: ANN: PyGUI Mailing List

2009-11-22 Thread Gregory Ewing
Terry Reedy wrote: Having it mirrored to news.gmane,org, if you have not yet, like other python.org lists, would make it easier to follow or join. Perhaps it will happen automatically, I do not know. I don't think it's automatic. I've submitted a request to gmane to have it added and I'm

Re: Imitating tail -f

2009-11-22 Thread Wolodja Wentland
On Sun, Nov 22, 2009 at 03:43 +0100, Ivan Voras wrote: I'm trying to simply imitate what tail -f does, i.e. read a file, wait until it's appended to and process the new data, but apparently I'm missing something. [..] Any advice? Have a look at [1], which mimics tail -f perfectly. It comes

Sorting: too different times. Why?

2009-11-22 Thread n00m
Any comment: class Vector: def __init__(self, x, y): self.x = x self.y = y def __cmp__(self, v): if self.x v.x and self.y v.y: return -1 return 0 def v_cmp(v1, v2): if v1.x v2.x and v1.y v2.y: return -1 return 0 from random

Re: parallel class structures for AST-based objects

2009-11-22 Thread Diez B. Roggisch
Steve Howell schrieb: On Nov 21, 4:07 pm, MRAB pyt...@mrabarnett.plus.com wrote: I don't see the point of EvalNode and PrettyPrintNode. Why don't you just give Integer, Sum and Product 'eval' and 'pprint' methods? That's a good question, and it's the crux of my design dilemma. If ALL I ever

Re: How do I create a vanilla object in C?

2009-11-22 Thread sturlamolden
On 22 Nov, 04:05, Carl Banks pavlovevide...@gmail.com wrote: name = PyString_FromString(vanilla); bases = PyTuple_New(0); dict = PyDict_New(); vanilla_type = PyObject_CallObject(         PyType_Type,name,bases,dict,0); Then call the vanilla type (however you create it) to get a vanilla

Re: Writing a Carriage Return in Unicode

2009-11-22 Thread Steve Howell
On Nov 21, 11:33 pm, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Steve Howell wrote: If you are going to couple character sets to their legacy physical implementations, you should also have a special extra character to dot your i's and cross your t's. No, no, no. For that device

yappi v0.3

2009-11-22 Thread k3xji
Hi, yappi(yet another python profiler) is a Python Profiler with multithreading support. This is the last beta version with some major changes and bugfixes: v0.3 Changes - [+] yappi did not compile out of box on VS2008. Fix the compile issues. (Thanks to Kevin Watters) [+] tidy up stat

Re: Sorting: too different times. Why?

2009-11-22 Thread Ben Finney
n00m n...@narod.ru writes: Any comment: I get similar output. What were you expecting to happen? Did you have any questions? -- \“The right to search for truth implies also a duty; one must | `\ not conceal any part of what one has recognized to be true.” | _o__)

Re: Sorting: too different times. Why?

2009-11-22 Thread n00m
I was expecting the 1st method would be *slower* than the 2nd one :-) Or at least equal... Just random (intuitive) expectations -- http://mail.python.org/mailman/listinfo/python-list

Re: Sorting: too different times. Why?

2009-11-22 Thread Steven D'Aprano
In the subject line, you write too different times. You actually want two, the number, not too as in too many, too much. Lots of native English speakers get this wrong too :) On Sun, 22 Nov 2009 01:21:42 -0800, n00m wrote: Any comment: class Vector: def __init__(self, x, y):

Re: Sorting: too different times. Why?

2009-11-22 Thread Chris Rebert
On Sun, Nov 22, 2009 at 2:56 AM, n00m n...@narod.ru wrote: I was expecting the 1st method would be *slower* than the 2nd one :-) Or at least equal... Just random (intuitive) expectations The second method repeatedly looks up left_item.__class__.__cmp__ (i.e. Vector.__cmp__) when doing the

Re: Sorting: too different times. Why?

2009-11-22 Thread Diez B. Roggisch
n00m schrieb: Any comment: class Vector: def __init__(self, x, y): self.x = x self.y = y def __cmp__(self, v): if self.x v.x and self.y v.y: return -1 return 0 def v_cmp(v1, v2): if v1.x v2.x and v1.y v2.y: return -1

Re: Sorting: too different times. Why?

2009-11-22 Thread Duncan Booth
n00m n...@narod.ru wrote: Any comment: class Vector: def __init__(self, x, y): self.x = x self.y = y def __cmp__(self, v): if self.x v.x and self.y v.y: return -1 return 0 def v_cmp(v1, v2): if v1.x v2.x and v1.y v2.y:

Re: Sorting: too different times. Why?

2009-11-22 Thread Mark Dickinson
On Nov 22, 9:21 am, n00m n...@narod.ru wrote: Any comment: class Vector:     def __init__(self, x, y):         self.x = x         self.y = y     def __cmp__(self, v):         if self.x v.x and self.y v.y:             return -1         return 0 def v_cmp(v1, v2):     if v1.x v2.x

Why Python allows comparison of a callable and a number?

2009-11-22 Thread 一首诗
I used python to write an assignment last week, here is a code snippet # def departTime(): ''' Calculate the time to depart a packet. ''' if(random.random 0.8): t = random.expovariate(1.0 / 2.5) else: t = random.expovariate(1.0

Re: Why Python allows comparison of a callable and a number?

2009-11-22 Thread Chris Rebert
On Sun, Nov 22, 2009 at 4:03 AM, 一首诗 newpt...@gmail.com wrote: I used python to write an assignment last week, here is a code snippet # def departTime():    '''    Calculate the time to depart a packet.    '''    if(random.random 0.8):        t =

No-syntax Web-programming-IDE (was: Does turtle graphics have the wrong associations?)

2009-11-22 Thread Robert Maas, http://tinyurl.com/uh3t
My proposed no-syntax IDE *also* gets rid of the need to bother with any programming-language syntax. I've been proposing it for years, but nobody has shown any interest From: Terry Reedy tjre...@udel.edu What you describe below is similar to various systems that have been proposed and

Re: Imitating tail -f

2009-11-22 Thread Paul Rudin
Matt Nordhoff mnordh...@mattnordhoff.com writes: Jason Sewall wrote: FWIW, GNU tail on Linux uses inotify for tail -f: http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/tail.c The wikipedia page for inotify lists several python bindings: http://en.wikipedia.org/wiki/Inotify

Re: Sorting: too different times. Why?

2009-11-22 Thread Dave Angel
n00m wrote: Any comment: snip def v_cmp(v1, v2): if v1.x v2.x and v1.y v2.y: return -1 return 0 The second part of the compound if is backwards. So if this is headed for production code, it better get fixed. DaveA --

Re: plotting arrow in python

2009-11-22 Thread rudra
On Nov 22, 6:58 am, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: rudra wrote: 0.0 0.0 0.1 0.0 0.1 0.1 0.1 0.0 0.5 like that! the first two column are coordinate and 3rd one is magnitude of moment (say: x y,m)!! so what i want to do is draw an arrow of magnitude(m) in the

Re: Sorting: too different times. Why?

2009-11-22 Thread n00m
Do you get the same magnitude difference if you make Vector a new-style class? Yes (I mean No): new-style's much faster And now it's elephants instead of vectors. Def: an elephant is smarter than another one IIF its size is strictly less but its IQ is strictly greater I.e. you can't compare

Re: Sorting: too different times. Why?

2009-11-22 Thread n00m
The second part of the compound if is backwards.  So if this is headed for production code, it better get fixed. DaveA Not sure I'm understanding your remark. -- http://mail.python.org/mailman/listinfo/python-list

python regex negative lookahead assertions problems

2009-11-22 Thread Jelle Smet
Hi List, I'm trying to match lines in python using the re module. The end goal is to have a regex which enables me to skip lines which have ok and warning in it. But for some reason I can't get negative lookaheads working, the way it's explained in http://docs.python.org/library/re.html;.

MySQLdb

2009-11-22 Thread Kill Joy
Hi all. I have a mod_python script with two query: cursor = db.cursor() sql = 'SELECT * FROM users where username=\'' + username +'\'' cursor.execute(sql) result = cursor.fetchall() num = int(cursor.rowcount) if num == 0 : sql2 =

pyspread 0.0.12a released

2009-11-22 Thread Martin Manns
Pyspread is getting close to the first Beta. This new release should work with Windows as well as with Linux. About - Pyspread is a cross-platform Python spreadsheet application. It is based on and written in the programming language Python. Instead of spreadsheet formulas, Python

Re: python regex negative lookahead assertions problems

2009-11-22 Thread Tim Chase
import re line='2009-11-22 12:15:441 lmqkjsfmlqshvquhsudfhqf qlsfh qsduidfhqlsiufh qlsiuf qldsfhqlsifhqlius dfh warning qlsfj lqshf lqsuhf lqksjfhqisudfh qiusdfhq iusfh' re.match('.*(?!warning)',line) _sre.SRE_Match object at 0xb75b1598 I would expect that this would NOT match as it's a

Re: MySQLdb

2009-11-22 Thread Gerald Walker
Kill Joy wrote: Hi all. I have a mod_python script with two query: cursor = db.cursor() sql = 'SELECT * FROM users where username=\'' + username +'\'' cursor.execute(sql) result = cursor.fetchall() num = int(cursor.rowcount) if num == 0 :

Re: MySQLdb

2009-11-22 Thread Kill Joy
On 22 Nov, 16:00, Gerald Walker geraldwalk...@gmail.com wrote: Kill Joy wrote: Hi all. I have a mod_python script with two query:    cursor = db.cursor()    sql = 'SELECT * FROM users where username=\'' + username +'\''    cursor.execute(sql)    result = cursor.fetchall()    num

Re: python regex negative lookahead assertions problems

2009-11-22 Thread Helmut Jarausch
On 11/22/09 14:58, Jelle Smet wrote: Hi List, I'm trying to match lines in python using the re module. The end goal is to have a regex which enables me to skip lines which have ok and warning in it. But for some reason I can't get negative lookaheads working, the way it's explained in

Re: Sorting: too different times. Why?

2009-11-22 Thread Duncan Booth
n00m n...@narod.ru wrote: And now it's elephants instead of vectors. Def: an elephant is smarter than another one IIF its size is strictly less but its IQ is strictly greater I.e. you can't compare (2, 8) to (20, 50) or let count them as equally smart elephants. and that still isn't a

Re: parallel class structures for AST-based objects

2009-11-22 Thread Simon Forman
On Sun, Nov 22, 2009 at 4:50 AM, Diez B. Roggisch de...@nospam.web.de wrote: Steve Howell schrieb: On Nov 21, 4:07 pm, MRAB pyt...@mrabarnett.plus.com wrote: I don't see the point of EvalNode and PrettyPrintNode. Why don't you just give Integer, Sum and Product 'eval' and 'pprint' methods?

Re: Sorting: too different times. Why?

2009-11-22 Thread MRAB
Steven D'Aprano wrote: In the subject line, you write too different times. You actually want two, the number, not too as in too many, too much. Lots of native English speakers get this wrong too :) [snip] It could mean that the times are not just different, they're _too_ different, ie a lot

Re: Why Python allows comparison of a callable and a number?

2009-11-22 Thread MRAB
一首诗 wrote: I used python to write an assignment last week, here is a code snippet # def departTime(): ''' Calculate the time to depart a packet. ''' if(random.random 0.8): t = random.expovariate(1.0 / 2.5) else: t =

Re: Sorting: too different times. Why?

2009-11-22 Thread n00m
Here meaningful order is: if elephant a[i] is smarter than elephant a[j] then i must be strictly less than j Of course, to the same effect we could sort them simply by sizes, but then time of sorting would increase by ~ 2 times -- due to decreasing of number of equally smart things. But here it

Re: Sorting: too different times. Why?

2009-11-22 Thread n00m
:-) Of course, by too I meant too, as in to much -- http://mail.python.org/mailman/listinfo/python-list

Re: python regex negative lookahead assertions problems

2009-11-22 Thread MRAB
Tim Chase wrote: import re line='2009-11-22 12:15:441 lmqkjsfmlqshvquhsudfhqf qlsfh qsduidfhqlsiufh qlsiuf qldsfhqlsifhqlius dfh warning qlsfj lqshf lqsuhf lqksjfhqisudfh qiusdfhq iusfh' re.match('.*(?!warning)',line) _sre.SRE_Match object at 0xb75b1598 I would expect that this would NOT

Re: Sorting: too different times. Why?

2009-11-22 Thread MRAB
n00m wrote: :-) Of course, by too I meant too, as in to much Although it's OK in English to say too much x or too many x, it's somewhat unnatural to say too different xs; it would have to be the xs are too different. Nobody said English was logical! :-) --

Re: Sorting: too different times. Why?

2009-11-22 Thread n00m
it's somewhat unnatural to say too different xs Aha. Thanks. PS For years I thought that song's title No Woman No Cry by Bob Marley means No Woman -- No Cry. As if a man got rid of his woman and stopped crying, out of her bad behaviour etc. It turned out to mean No, woman,.. no cry... Or take

Re: parallel class structures for AST-based objects

2009-11-22 Thread Steve Howell
On Nov 22, 7:55 am, Simon Forman sajmik...@gmail.com wrote: On Sun, Nov 22, 2009 at 4:50 AM, Diez B. Roggisch de...@nospam.web.de wrote: Steve Howell schrieb: On Nov 21, 4:07 pm, MRAB pyt...@mrabarnett.plus.com wrote: I don't see the point of EvalNode and PrettyPrintNode. Why don't you

scanning under windows WIA with custom settings (dpi / etc )

2009-11-22 Thread News123
Hi, I'm trying to scan a document from a python 2.6 script without user interaction. I found a code snippet, that allows me to scan under Vista, but that doesn't allow me to select the dpi / color mode / etc. The snippet uses win32com.client # # script start import

Scripts Only Run In Root

2009-11-22 Thread Victor Subervi
Hi; I can only run my python scripts on my server if they are owned by root. How do I change that? TIA, Victor -- http://mail.python.org/mailman/listinfo/python-list

Re: Sorting: too different times. Why?

2009-11-22 Thread Lie Ryan
n00m wrote: The second part of the compound if is backwards. So if this is headed for production code, it better get fixed. DaveA Not sure I'm understanding your remark. Maybe he meant, that this: if v1.x v2.x and v1.y v2.y should be: if v1.x v2.x and v1.y v2.y ? --

TypeError: an integer is required

2009-11-22 Thread Lutfi Oduncuoglu
Hello, I am a newbie on oython and I am taking the error at subject my code is below, I am trying to develop a qgis plugin and lines begin with # is the thing that I tried. Thus sys.stdout gives the type error. When I comment that line it turns an error like below. What may be the problem? thanks

Re: Sorting: too different times. Why?

2009-11-22 Thread Dave Angel
n00m wrote: The second part of the compound if is backwards. So if this is headed for production code, it better get fixed. DaveA Not sure I'm understanding your remark. Well, others in the thread have observed the same thing, so maybe it doesn't matter. But the quoted code had

Re: TypeError: an integer is required

2009-11-22 Thread MRAB
Lutfi Oduncuoglu wrote: Hello, I am a newbie on oython and I am taking the error at subject my code is below, I am trying to develop a qgis plugin and lines begin with # is the thing that I tried. Thus sys.stdout gives the type error. When I comment that line it turns an error like below.

Re: Scripts Only Run In Root

2009-11-22 Thread geremy condra
On Sun, Nov 22, 2009 at 12:39 PM, Victor Subervi victorsube...@gmail.com wrote: Hi; I can only run my python scripts on my server if they are owned by root. How do I change that? TIA, Victor Almost certainly going to need more information. On that note, you are probably going to get better

Re: Split class across multiple files

2009-11-22 Thread Lie Ryan
eric.frederich wrote: I have a class which holds a connection to a server and a bunch of services. In this class I have methods that need to work with that connection and services. Right now there are about 50 methods some of which can be quite long. From an organizational standpoint, I'd like

Re: Go versus Brand X

2009-11-22 Thread Aahz
In article 7ms7ctf3k2a7...@mid.individual.net, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: However, Go's designers seem to favour using the absolute minimum number of characters they can get away with. Although if they *really* wanted that, they would have dropped most of the semicolons

Re: What is the naming convention for accessor of a 'private' variable?

2009-11-22 Thread Lie Ryan
Peng Yu wrote: On Wed, Nov 18, 2009 at 8:47 PM, Chris Rebert c...@rebertia.com wrote: On Wed, Nov 18, 2009 at 6:27 PM, Peng Yu pengyu...@gmail.com wrote: http://www.python.org/dev/peps/pep-0008/ The above webpage states the following naming convention. Such a variable can be an internal

Re: Sorting: too different times. Why?

2009-11-22 Thread Mel
MRAB wrote: n00m wrote: :-) Of course, by too I meant too, as in to much Although it's OK in English to say too much x or too many x, it's somewhat unnatural to say too different xs; it would have to be the xs are too different. Nobody said English was logical! :-) Now that James

Re: scanning under windows WIA with custom settings (dpi / etc )

2009-11-22 Thread r
On Nov 22, 11:32 am, News123 news...@free.fr wrote: Hi, I'm trying to scan a document from a python 2.6 script without user interaction. I found a code snippet, that allows me to scan under Vista, but that doesn't allow me to select the dpi / color mode / etc. The snippet uses

Re: Imitating tail -f

2009-11-22 Thread Nobody
On Sun, 22 Nov 2009 03:43:31 +0100, Ivan Voras wrote: The problem is: poll() always returns that the fd is ready (without waiting), but read() always returns an empty string. Actually, it doesn't matter if I turn O_NDELAY on or off. select() does the same. Regular files are always ready for

xmlrpc idea for getting around the GIL

2009-11-22 Thread Patrick Stinson
Has anyone every tried wrapping the CPython lib into a daemon with an RPC mechanism in order to move the GIL out of the process? I have multiple audio threads, each of which use the python interpreter but don't have to interact with each other and can might as well use a separate interpreter

Re: TypeError: an integer is required

2009-11-22 Thread Dave Angel
Lutfi Oduncuoglu wrote: Hello, I am a newbie on oython and I am taking the error at subject my code is below, I am trying to develop a qgis plugin and lines begin with # is the thing that I tried. Thus sys.stdout gives the type error. When I comment that line it turns an error like below.

Re: xmlrpc idea for getting around the GIL

2009-11-22 Thread Daniel Fetchinson
Has anyone every tried wrapping the CPython lib into a daemon with an RPC mechanism in order to move the GIL out of the process? I have multiple audio threads, each of which use the python interpreter but don't have to interact with each other and can might as well use a separate interpreter

Re: Sorting: too different times. Why?

2009-11-22 Thread Steven D'Aprano
On Sun, 22 Nov 2009 15:08:28 +, Duncan Booth wrote: n00m n...@narod.ru wrote: And now it's elephants instead of vectors. Def: an elephant is smarter than another one IIF its size is strictly less but its IQ is strictly greater I.e. you can't compare (2, 8) to (20, 50) or let count

Re: xmlrpc idea for getting around the GIL

2009-11-22 Thread Diez B. Roggisch
Daniel Fetchinson schrieb: Has anyone every tried wrapping the CPython lib into a daemon with an RPC mechanism in order to move the GIL out of the process? I have multiple audio threads, each of which use the python interpreter but don't have to interact with each other and can might as well use

creating pipelines in python

2009-11-22 Thread per
hi all, i am looking for a python package to make it easier to create a pipeline of scripts (all in python). what i do right now is have a set of scripts that produce certain files as output, and i simply have a master script that checks at each stage whether the output of the previous script

problem manipulating a list belonging to a class

2009-11-22 Thread Marc Leconte
Dear all, I have a problem with the following code (ubuntu 8.04, Python 2.5.2): class Toto(object): def __init__(self, number, mylist=[]): self.number=number self.mylist=mylist pass pass listA=Toto(number=1) listB=Toto(number=2)

problem with pyqt.. help please...

2009-11-22 Thread Threader Slash
-- Forwarded message -- From: Jebagnana Das jebagnana...@gmail.com To: python-list@python.org Date: Sat, 21 Nov 2009 19:17:56 +0530 Subject: problem with pyqt.. help please... Hi friends, I've recently changed to ubuntu 9.04.. I've not had any problem with the

Re: problem manipulating a list belonging to a class

2009-11-22 Thread Diez B. Roggisch
Marc Leconte schrieb: Dear all, I have a problem with the following code (ubuntu 8.04, Python 2.5.2): class Toto(object): def __init__(self, number, mylist=[]): self.number=number self.mylist=mylist pass pass

Re: problem manipulating a list belonging to a class

2009-11-22 Thread Steve Howell
On Nov 22, 2:50 pm, Marc Leconte marcg...@free.fr wrote: Dear all, I have a problem with the following code (ubuntu 8.04, Python 2.5.2): class Toto(object):         def __init__(self, number, mylist=[])                 self.number=number                 self.mylist=mylist                

Re: problem manipulating a list belonging to a class

2009-11-22 Thread Steve Howell
On Nov 22, 3:14 pm, Steve Howell showel...@yahoo.com wrote: Explanations of why you need to write it that will follow... I knew this had to be written up somewhere... http://www.ferg.org/projects/python_gotchas.html#contents_item_6 -- http://mail.python.org/mailman/listinfo/python-list

Implementation of Book Organization tool (Python2.[x])

2009-11-22 Thread ~km
Hi together, I'm a python-proficient newbie and want to tackle a program with Python 2.x, which basically organizes all my digital books (*.pdf, *.chm, etc..) and to give them specific labels, such as: Author - string Read - boolean Last Opened: - string and so on.. Now my question is: Is it a

Re: creating pipelines in python

2009-11-22 Thread Lie Ryan
per wrote: hi all, i am looking for a python package to make it easier to create a pipeline of scripts (all in python). what i do right now is have a set of scripts that produce certain files as output, and i simply have a master script that checks at each stage whether the output of the

Re: Trying to understand += better

2009-11-22 Thread Lie Ryan
Roy Smith wrote: If I've got an object foo, and I execute: foo.bar += baz exactly what happens if foo does not have a 'bar' attribute? It's pretty clear that foo.__getattr__('bar') gets called first, but it's a little murky after that. Assume for the moment that foo.__getattr__ ('bar')

Re: Implementation of Book Organization tool (Python2.[x])

2009-11-22 Thread Lie Ryan
~km wrote: Hi together, I'm a python-proficient newbie and want to tackle a program with Python 2.x, which basically organizes all my digital books (*.pdf, *.chm, etc..) and to give them specific labels, such as: Author - string Read - boolean Last Opened: - string and so on.. Now my question

Re: problem manipulating a list belonging to a class

2009-11-22 Thread Lie Ryan
Marc Leconte wrote: class Toto(object): def __init__(self, number, mylist=[]): self.number=number self.mylist=mylist pass pass Why are you using pass to end your blocks? -- http://mail.python.org/mailman/listinfo/python-list

Re: Trying to understand += better

2009-11-22 Thread Steve Howell
On Nov 22, 7:28 pm, Lie Ryan lie.1...@gmail.com wrote: Roy Smith wrote: If I've got an object foo, and I execute: foo.bar += baz exactly what happens if foo does not have a 'bar' attribute?  It's pretty clear that foo.__getattr__('bar') gets called first, but it's a little murky after

Re: Implementation of Book Organization tool (Python2.[x])

2009-11-22 Thread Steve Howell
On Nov 22, 6:06 pm, ~km knny.m...@gmail.com wrote: Hi together, I'm a python-proficient newbie and want to tackle a program with Python 2.x, which basically organizes all my digital books (*.pdf, *.chm, etc..) and to give them specific labels, such as: Author - string Read - boolean Last

Amoeba OS and Python

2009-11-22 Thread Александр Бежашвили
As I know, Python has been started for Amoeba OS. Did anybody try Python with it? What about speed? Python is so slow for big projects and I try to find a way to accelerate it. -- http://mail.python.org/mailman/listinfo/python-list

Re: Trying to understand += better

2009-11-22 Thread Steve Howell
On Nov 22, 9:11 pm, n00m n...@narod.ru wrote: The first statement is creating a whole new list; Yes but *imo* not quite exactly so. We can't think of 2 lists as of absolutely independent things. [...] You are correct that two lists can both have the same mutable object as items, and if you

Re: xmlrpc idea for getting around the GIL

2009-11-22 Thread Patrick Stinson
that's right. I cannot make CPython calls from my original C-based threads. On Sun, Nov 22, 2009 at 3:15 PM, Diez B. Roggisch de...@nospam.web.de wrote: Daniel Fetchinson schrieb: Has anyone every tried wrapping the CPython lib into a daemon with an RPC mechanism in order to move the GIL out

Re: Trying to understand += better

2009-11-22 Thread Lie Ryan
Roy Smith wrote: In article 4b0a01a...@dnews.tpgi.com.au, Lie Ryan lie.1...@gmail.com wrote: The semantic of the in-place operator is something like: x += y becomes x = x.__iadd__(y) thus foo.bar += baz becomes foo.bar = foo.bar.__iadd__(baz) So the call sequence is, foo.__getattr__('bar')

[issue7374] Property accessor/getter called twice

2009-11-22 Thread Michal Liddle
New submission from Michal Liddle mich...@liddle.net.nz: The following snippet demonstrates the problem: - class Test(object): def get(self): print get def set(self, v): print set test = property(get, set) t = Test() t.test t.test

[issue7374] Property accessor/getter called twice

2009-11-22 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Tried your snippet with both py2.5 and py2.6. It works as expected (one get and one set). -- nosy: +rhettinger resolution: - works for me status: open - closed ___ Python tracker

[issue7173] Cython compiler run crashes CPython 3.1.1 and 3.2

2009-11-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I don't reproduce the problem on Windows. But the class NodeTypeWriter is not even used at all; did I miss something? The test builds a python extension and runs it, successfully it seems. -- nosy: +amaury.forgeotdarc

[issue7374] Property accessor/getter called twice

2009-11-22 Thread Michal Liddle
Michal Liddle mich...@liddle.net.nz added the comment: Right you are. Looks like its actually an IPython specific behaviour here (didn't think to check that in the first place, sorry). -- ___ Python tracker rep...@bugs.python.org

[issue7173] Cython compiler run crashes CPython 3.1.1 and 3.2

2009-11-22 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: The patch is supposed to apply near the end of the class TreeAssertVisitor at the end of the file Cython/TestUtils.py, not in the class NodeTypeWriter. And the test doesn't run (or even import) the extension, it just builds it.

[issue6454] Add example keyword argument to optparse constructor

2009-11-22 Thread Greg Ward
Greg Ward g...@gerg.ca added the comment: but I feel there is a better and more general solution - just provide some minimal formatting for description: treat empty line as paragraph separator. Then I would be able to add example or anything else to the description formatting it as necessary

[issue5007] urllib2 HTTPS connection failure (BadStatusLine Exception)

2009-11-22 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: This bug is not reproducible in trunk, py3k and is not reproducible in py26 releases too. I tried to hunt down if any changes in the code-line from py2.5 to py2.6 had effect on the behavior mention (BadStatusLine) , but don't see any. I am

[issue7375] 2to3 - does not translate urllib2 to urllib.request correctly for function/method argument

2009-11-22 Thread Senthil Kumaran
New submission from Senthil Kumaran orsent...@gmail.com: 2.x code: import urllib2 opener = urllib2.build_opener(urllib2.HTTPHandler(debuglevel=1)) 2to3 on this would result in: import urllib.request, urllib.error, urllib.parse opener =

[issue7375] 2to3 - does not translate urllib2 to urllib.request correctly for function/method argument

2009-11-22 Thread Senthil Kumaran
Changes by Senthil Kumaran orsent...@gmail.com: -- components: +2to3 (2.x to 3.0 conversion tool) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7375 ___

[issue7173] Cython compiler run crashes CPython 3.1.1 and 3.2

2009-11-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Sorry, my mistake. Now the prints are there, but the test run without error: Running tests against Cython 0.12.rc1 Python 3.2a0 (py3k, Nov 22 2009, 12:04:23) [MSC v.1500 32 bit (Intel)] HERE1 (None, None, None) HERE2 HERE1 (None, None,

[issue7369] Fibonacci example does not include 0; section 4.6

2009-11-22 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: tjreedy: The reporter's suggestion seems fine. Prepending a 0 does not seem to be a good idea. -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7369

[issue7376] FAIL: Doctest: __main__.DebugRunner

2009-11-22 Thread flox
New submission from flox la...@yahoo.fr: Running on Debian Lenny, with Python 3.1. The Python 2.5 version is OK. ~ $ python3 --version Python 3.1.1+ ~ $ python3 -m doctest F.. == FAIL: Doctest: __main__.DebugRunner

[issue7377] Slight difference: math.floor returns an Integral

2009-11-22 Thread flox
New submission from flox la...@yahoo.fr: The last code snippet on section 25.2.3.2 How are Docstring Examples Recognized? does not output the expected result. http://docs.python.org/dev/py3k/library/doctest.html#how-are-docstring-examples-recognized Documentation example: assert Easy!

[issue6123] tarfile: opening an empty tar file fails

2009-11-22 Thread Lars Gustäbel
Lars Gustäbel l...@gustaebel.de added the comment: I have checked in a fix for this problem: trunk (r76443) and py3k (r76444). Thank you very much for your report. Sorry that it took that long to get it fixed. -- resolution: - accepted status: open - closed

[issue7173] Cython compiler run crashes CPython 3.1.1 and 3.2

2009-11-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I reproduce the crash on Linux. Some debug prints showed that the failing exception object is tp_clear'ed, because it belongs to a reference cycle. Now if it is cleared it should not be reachable... --

[issue7369] Fibonacci example does not include 0; section 4.6

2009-11-22 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Senthil: look again. The OP's suggestion *is* to prepend a 0 to the current 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 I just specified the delta between current and suggested, should someone decide to make the change. That said, def

[issue7375] 2to3 - does not translate urllib2 to urllib.request correctly for function/method argument

2009-11-22 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Fixed in r76447. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7375 ___

[issue7369] Fibonacci example does not include 0; section 4.6

2009-11-22 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: Terry: Oh, sorry. Now I get what you meant by Prepend O to output line. That is, Output line from the fib, as part of the patch. The changes need to be done at 3 places. Section 3.2, twice in Section 4.6. --

[issue7373] Use PyModule_AddIntMacro() in Modules/gcmodule.c

2009-11-22 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- resolution: - works for me status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7373 ___

[issue1169193] Handle ungzipped man pages in rpm builds correctly

2009-11-22 Thread Dave Malcolm
Changes by Dave Malcolm dmalc...@redhat.com: -- nosy: +dmalcolm ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1169193 ___ ___ Python-bugs-list

[issue7376] FAIL: Doctest: __main__.DebugRunner

2009-11-22 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Apparently this was introduced with r51625 : r51625 | guido.van.rossum | 2006-08-26 16:37:44 -0400 (Sat, 26 Aug 2006) | 4 lines Inspired by SF patch #860326, make the exception formatting by traceback.py be closer to the

[issue444582] Finding programs in PATH, addition to os

2009-11-22 Thread Brian Curtin
Brian Curtin cur...@acm.org added the comment: Here is a patch against r76432 which implements a which generator function in shutil that yields full file paths where the searched file exists on the PATH. Includes doc change and a test. It is pretty similar to what edemaine had suggested. This