Re: Trying to understand += better

2009-11-22 Thread Lie Ryan
Roy Smith wrote: In article <4b0a01a...@dnews.tpgi.com.au>, Lie Ryan 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') ==> x x.__iadd__(

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 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 of the pro

Re: Trying to understand += better

2009-11-22 Thread Steve Howell
On Nov 22, 9:11 pm, n00m 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 mutate

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: Implementation of Book Organization tool (Python2.[x])

2009-11-22 Thread Steve Howell
On Nov 22, 6:06 pm, "~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

Re: Trying to understand += better

2009-11-22 Thread Steve Howell
On Nov 22, 7:28 pm, Lie Ryan 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 that.

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: 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 m

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') return

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 pre

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

Re: problem manipulating a list belonging to a class

2009-11-22 Thread Steve Howell
On Nov 22, 3:14 pm, Steve Howell 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

Re: problem manipulating a list belonging to a class

2009-11-22 Thread Steve Howell
On Nov 22, 2:50 pm, Marc Leconte 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 >                 pass >  

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 listA=Toto(number=1)

problem with pyqt.. help please...

2009-11-22 Thread Threader Slash
-- Forwarded message -- From: Jebagnana Das 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 installation of pyqt as it is a

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) li

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

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

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 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

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 interpre

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. What

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 handle

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" f

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

2009-11-22 Thread r
On Nov 22, 11:32 am, News123 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 win32com.client

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! :-)

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 wrote: On Wed, Nov 18, 2009 at 6:27 PM, Peng Yu wrote: http://www.python.org/dev/peps/pep-0008/ The above webpage states the following naming convention. Such a variable can be an internal variable in a class. I'm wondering what is

Re: Scripts Only Run In Root

2009-11-22 Thread Victor Subervi
On Sun, Nov 22, 2009 at 1:30 PM, Martijn Arts wrote: > If it's a UNIX server you can use Chown in the command line. Try "man > chown" first to see how it works. > This is strange. I'd tried chown'ing before and was always getting 403 errors. Just to make sure that's what the problem was, I did it

Re: Go versus Brand X

2009-11-22 Thread Aahz
In article <7ms7ctf3k2a7...@mid.individual.net>, Gregory Ewing 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 and used indentation-b

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 t

Re: Scripts Only Run In Root

2009-11-22 Thread geremy condra
On Sun, Nov 22, 2009 at 12:39 PM, Victor Subervi 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 help with less expla

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. Wha

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 onl

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 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 ? -- http://mail.pyth

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

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 win32com

Re: parallel class structures for AST-based objects

2009-11-22 Thread Steve Howell
On Nov 22, 7:55 am, Simon Forman wrote: > On Sun, Nov 22, 2009 at 4:50 AM, Diez B. Roggisch wrote: > > > > > Steve Howell schrieb: > > >> On Nov 21, 4:07 pm, MRAB wrote: > > >>> I don't see the point of EvalNode and PrettyPrintNode. Why don't you > >>> just give Integer, Sum and Product 'eval' a

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..." O

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! :-) -- http://mail.python.o

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 n00m
:-) Of course, by "too" I meant "too", as in "to much" -- http://mail.python.org/mailman/listinfo/python-list

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

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 = random.ex

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,

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 wrote: > Steve Howell schrieb: >> >> On Nov 21, 4:07 pm, MRAB 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

Re: Sorting: too different times. Why?

2009-11-22 Thread Duncan Booth
n00m 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 relations

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 "http://

Re: MySQLdb

2009-11-22 Thread Kill Joy
On 22 Nov, 16:00, Gerald Walker 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 =  int

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 ==

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 neg

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 expressio

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 =

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";. Con

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

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 compar

Re: plotting arrow in python

2009-11-22 Thread rudra
On Nov 22, 6:58 am, Gregory Ewing 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 position (x,

Re: Sorting: too different times. Why?

2009-11-22 Thread Dave Angel
n00m wrote: Any comment: 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 -- http://mail.python.org/mailman/listinfo/python-list

Re: Imitating "tail -f"

2009-11-22 Thread Paul Rudin
Matt Nordhoff 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 >> >> Not much h

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 > What you describe below is similar to various systems that have > been proposed an

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, 一首诗 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.expovaria

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: Sorting: too different times. Why?

2009-11-22 Thread Mark Dickinson
On Nov 22, 9:21 am, n00m 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

Re: Sorting: too different times. Why?

2009-11-22 Thread Duncan Booth
n00m 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 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

Re: Sorting: too different times. Why?

2009-11-22 Thread Chris Rebert
On Sun, Nov 22, 2009 at 2:56 AM, n00m 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 necessary compa

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,

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 Ben Finney
n00m 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__)

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 for

Re: Writing a Carriage Return in Unicode

2009-11-22 Thread Steve Howell
On Nov 21, 11:33 pm, Gregory Ewing 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 you need to output

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

2009-11-22 Thread sturlamolden
On 22 Nov, 04:05, Carl Banks 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 > object: > > vani

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 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 wanted to to with Integer/S

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 ran

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 c

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 waiti