Re: Possible bug in Tkinter for Python 2.6

2008-11-20 Thread Eric Brunel
On Wed, 19 Nov 2008 18:51:03 +0100, Terry Reedy [EMAIL PROTECTED] wrote: Anton Vredegoor wrote: On Wed, 19 Nov 2008 10:57:53 +0100 Eric Brunel [EMAIL PROTECTED] wrote: I'm trying out Python 2.6 and I found what might be a bug in the Tkinter module. How can I report it? maybe here:

Re: Python / Debian package dependencies

2008-11-20 Thread Stephane Bulot
Hi Steven, This is a normal behaviour for dpkg. If there is a failing dependancy, dpkg will not install dependancies, it will notify only and will not install the package. Dependancies installations are managed by the front-end to dpkg (aptitude or apt). This is not a python issue that you are

Hooking windowsmessages with python

2008-11-20 Thread Kevin Osthoff
Hi! I'm trying to set a message hook with python to catch WM_DROPFILES. The guiframework is Tkinter. Here a code snippet: hwnd = eval(self.wm_frame()) win32gui.DragAcceptFiles(hwnd,1) wnd = win32ui.CreateWindowFromHandle(hwnd) wnd.HookMessage(self.test,w32con.WM_DROPFILES) def

Re: Module Structure/Import Design Problem

2008-11-20 Thread Rafe
On Nov 20, 2:06 pm, Arnaud Delobelle [EMAIL PROTECTED] wrote: Rafe [EMAIL PROTECTED] writes: Hi, I am in a situation where I feel I am being forced to abandon a clean module structure in favor of a large single module. If anyone can save my sanity here I would be forever grateful. My

Re: Programming exercises/challenges

2008-11-20 Thread Edwin
On Nov 20, 12:39 am, Arnaud Delobelle [EMAIL PROTECTED] wrote: Edwin [EMAIL PROTECTED] writes: [...] a diary manager compatible with my Emacs diary file (sometimes I don't want to open Emacs for a quick note) You mean that you sometimes don't have emacs open? -- Arnaud heh... I

Ip format

2008-11-20 Thread luca72
Hello i have this ip 1578568204 how socket function i can have the ip dotted-quad string? i have try socket.inet_aton get no error but only this ^ETB FF Thanks luca -- http://mail.python.org/mailman/listinfo/python-list

Re: Ip format

2008-11-20 Thread Tim Chase
Hello i have this ip 1578568204 how socket function i can have the ip dotted-quad string? i have try socket.inet_aton get no error but only this ^ETB FF I've got the following program I threw together for one of my junior developers: from sys import argv, exit if len(argv) 2:

strange permission issue with nosetests

2008-11-20 Thread Mr . SpOOn
Hi, I'm trying the nose testing package. I've just started reading the tutorial and I had a problem with the first simple example. This is the test: def test_b(): assert 'b' == 'b' In the same directory I gave the command nosetests and it runs the test. Then I try with nosetests -v, but it

Re: credit kredite oesterreich ratenkredite online kredit ohne schufa in blitzkredite

2008-11-20 Thread [EMAIL PROTECTED]
On Nov 12, 2:06 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: credit kredite oesterreich ratenkredite online kredit ohne schufa in blitzkredite + + + + +++ GUENSTIGE KREDITE ONLINE +++ KREDITE IM INTERNET OHNE SCHUFA +++ + http://www.fme.gov.ng/forum/forum_posts.asp?TID=4785PN=1

teen home made p0rn

2008-11-20 Thread fernandena
http://sambuko.freetzi.com/old.htm homemade lesbian p0rn,homemade p0rn pics -- http://mail.python.org/mailman/listinfo/python-list

Re: strange permission issue with nosetests

2008-11-20 Thread Ben Finney
Mr.SpOOn [EMAIL PROTECTED] writes: Searching on google I found this: http://www.siafoo.net/article/61 He had the same issue and said to change permission of the file to 664. I tried and it worked. Is that normal? Why does it happen? If a file is meant to be run as a command or program,

Re: Hooking windowsmessages with python

2008-11-20 Thread Aaron Brady
On Nov 20, 3:52 am, Kevin Osthoff [EMAIL PROTECTED] wrote: Hi! I'm trying to set a message hook with python to catch WM_DROPFILES. The guiframework is Tkinter. Here a code snippet: hwnd = eval(self.wm_frame()) win32gui.DragAcceptFiles(hwnd,1) wnd = win32ui.CreateWindowFromHandle(hwnd)

Re: Optional parameter object re-used when instantiating multiple objects

2008-11-20 Thread Aaron Brady
On Nov 19, 7:58 pm, alex23 [EMAIL PROTECTED] wrote: On Nov 20, 10:14 am, Aaron Brady [EMAIL PROTECTED] wrote: If you had a menu in a browser interface that had the items, say, 'Stop' and 'Reload', what would you expect to happen if you clicked on them? If you had a keyword called 'def',

Re: strange permission issue with nosetests

2008-11-20 Thread Mr . SpOOn
On Thu, Nov 20, 2008 at 13:34, Ben Finney [EMAIL PROTECTED] wrote: Mr.SpOOn [EMAIL PROTECTED] writes: Searching on google I found this: http://www.siafoo.net/article/61 He had the same issue and said to change permission of the file to 664. Unit test modules, which are primarily meant to be

Re: Programming exercises/challenges

2008-11-20 Thread skip
a diary manager compatible with my Emacs diary file (sometimes I don't want to open Emacs for a quick note) Arnaud You mean that you sometimes don't have emacs open? I am constantly amazed at work that people open a separate emacs for each file they want to edit. Most of them

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-20 Thread Aaron Brady
On Nov 19, 7:22 pm, greg [EMAIL PROTECTED] wrote: Antoon Pardon wrote: You are changing your argument. In a follow up you made the point that call by value should be as it was intended by the writers of the algol 60 report. No, I was countering the argument that call by value is short

Can't find Python Library packages in Ubuntu (Debian)

2008-11-20 Thread Jerzy Jalocha N
I'm new in this list (and to Python), so I'd like to start saying hello to everyone first. I am really enjoying this new language! I am trying to use the standard tests (like test_list.py or test_dict.py) from the standard library (Python2.5), but they aren't available on a standard Ubuntu Hardy

Re: strange permission issue with nosetests

2008-11-20 Thread Ben Finney
Mr.SpOOn [EMAIL PROTECTED] writes: Mmm it seems strange to me. I mean, there isn't any reference to this on the site. How would one imagine he needs to change permission? And it is strange that the first time I didn't need to change anything. This seems now to have moved to be more about the

imported method from module evaluates to None in some cases

2008-11-20 Thread Andrew
Hi: I'm having a problem in some zope (2.10) code (HTTPResponse.py) where a method that gets imported somehow evaluates to None in certain cases which causes a TypeError exception to be raised (eg: TypeError: 'NoneType' object is not callable). The code excerpt is below where the exception is

Re: Can't find Python Library packages in Ubuntu (Debian)

2008-11-20 Thread Diez B. Roggisch
Jerzy Jalocha N wrote: I'm new in this list (and to Python), so I'd like to start saying hello to everyone first. I am really enjoying this new language! I am trying to use the standard tests (like test_list.py or test_dict.py) from the standard library (Python2.5), but they aren't

Re: imported method from module evaluates to None in some cases

2008-11-20 Thread Hrvoje Niksic
Andrew [EMAIL PROTECTED] writes: I'm having a problem in some zope (2.10) code (HTTPResponse.py) where a method that gets imported somehow evaluates to None in certain cases which causes a TypeError exception to be raised (eg: TypeError: 'NoneType' object is not callable). The code excerpt is

Re: Hooking windowsmessages with python

2008-11-20 Thread Mike Driscoll
On Nov 20, 3:52 am, Kevin Osthoff [EMAIL PROTECTED] wrote: Hi! I'm trying to set a message hook with python to catch WM_DROPFILES. The guiframework is Tkinter. Here a code snippet: hwnd = eval(self.wm_frame()) win32gui.DragAcceptFiles(hwnd,1) wnd = win32ui.CreateWindowFromHandle(hwnd)

Problem with writing fast UDP server

2008-11-20 Thread Krzysztof Retel
Hi guys, I am struggling writing fast UDP server. It has to handle around 1 UDP packets per second. I started building that with non blocking socket and threads. Unfortunately my approach does not work at all. I wrote a simple case test: client and server. The client sends 2200 packets within

C extension type gives type error in power operator

2008-11-20 Thread Paul Moore
I'm trying to implement an extension type with a power operator. The operator is unusual in that I want to allow my objects to be raised to an integer power: p = Pattern() p3 = p ** 3 I've implemented the code for a nb_power slot, it converts the other argument to a C long using

Air Force1 and Air Jordan shoes PAYPAL wholesale

2008-11-20 Thread air force1 shoes
Air Force1 and Air Jordan shoes PAYPAL wholesale www.z-a-z-a.com air force1 shoes. air force1 high shoes. air force1 light shoes . we are professional produce air force1 and jordan shoes supplier ,carry PAYPAL.main air force1-25th AF1-high AF1-low .air jordan 1-14,air jordan 23,air force 1jordan

Re: Problem with writing fast UDP server

2008-11-20 Thread Hrvoje Niksic
Krzysztof Retel [EMAIL PROTECTED] writes: But the server only handles 700 -- 870 packets, when it is non- blocking, and only 670 – 700 received with blocking sockets. What are your other threads doing? Have you tried the same code without any threading? --

Re: imported method from module evaluates to None in some cases

2008-11-20 Thread Andrew
On Nov 20, 6:53 am, Hrvoje Niksic [EMAIL PROTECTED] wrote: Andrew [EMAIL PROTECTED] writes: I'm having a problem in some zope (2.10) code (HTTPResponse.py) where a method that gets imported somehow evaluates to None in certain cases which causes a TypeError exception to be raised (eg:

Re: Air Force1 and Air Jordan shoes PAYPAL wholesale

2008-11-20 Thread Pierre-Alain Dorange
air force1 shoes [EMAIL PROTECTED] wrote: air force1 shoes. air force1 high shoes. air force1 light shoes File stdin, line 1 air force1 shoes. air force1 high shoes. air force1 light shoes ^ SyntaxError: invalid syntax -- Pierre-Alain Dorange Ce message est sous licence

Re: Hooking windowsmessages with python

2008-11-20 Thread Kevin Osthof
Mike Driscoll schrieb: I recommend re-posting to the PyWin32 mailing list where the creators of this package lurk. They'll probably be able to give you some advice: http://mail.python.org/mailman/listinfo/python-win32 Ok. I will try this. Mike --

Re: strange permission issue with nosetests

2008-11-20 Thread Roel Schroeven
Mr.SpOOn schreef: On Thu, Nov 20, 2008 at 13:34, Ben Finney [EMAIL PROTECTED] wrote: Mr.SpOOn [EMAIL PROTECTED] writes: Searching on google I found this: http://www.siafoo.net/article/61 He had the same issue and said to change permission of the file to 664. Unit test modules, which are

Re: Hooking windowsmessages with python

2008-11-20 Thread Kevin Osthof
Aaron Brady wrote: I've done some hooks in C. If no one has a simpler way, I can help you build a DLL to do it, and call it from Python. Thx for the offer but i will try to do it in python first. ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: C extension type gives type error in power operator

2008-11-20 Thread Thomas Heller
Paul Moore schrieb: I'm trying to implement an extension type with a power operator. The operator is unusual in that I want to allow my objects to be raised to an integer power: p = Pattern() p3 = p ** 3 I've implemented the code for a nb_power slot, it converts the other argument

Re: Problem with writing fast UDP server

2008-11-20 Thread Krzysztof Retel
On Nov 20, 3:34 pm, Hrvoje Niksic [EMAIL PROTECTED] wrote: Krzysztof Retel [EMAIL PROTECTED] writes: But the server only handles 700 -- 870 packets, when it is non- blocking, and only 670 – 700 received with blocking sockets. What are your other threads doing?  Have you tried the same code

Re: Getting fractional part from a float without using string operations

2008-11-20 Thread James Harris
On 20 Nov, 06:01, srinivasan srinivas [EMAIL PROTECTED] wrote: Yes it works for most of the cases. But it doesn't for the following case: str(abs(int(1234567.89)-1234567.89)) '0.88999898' Well, that is 0.89 or about as near to it as the calculation can represent. Like other numbers

Nokia N96 16GB -GSM- Cell Phone (Unlocked) Quad Band

2008-11-20 Thread windchen1214
7*24 hour On-line service: MSN/Email:[EMAIL PROTECTED] Our website: http://www.elec-bestseller.cn Operating Frequency * WCDMA2100/900 (HSDPA) / EGSM900, GSM850/1800/1900 MHz (EGPRS) * Automatic switching between bands and modes * DVB-H Class C, 470-750 MHz Dimensions * Volume:

Re: C extension type gives type error in power operator

2008-11-20 Thread Paul Moore
On 20 Nov, 15:43, Thomas Heller [EMAIL PROTECTED] wrote: Paul Moore schrieb: However, when I try to use the operator, I get the following error: TypeError: unsupported operand type(s) for ** or pow(): '_ppeg.Pattern' and 'int' Try to set Py_TPFLAGS_CHECKTYPES in your extension type (in

Re: Problem with writing fast UDP server

2008-11-20 Thread bieffe62
On 20 Nov, 16:03, Krzysztof Retel [EMAIL PROTECTED] wrote: Hi guys, I am struggling writing fast UDP server. It has to handle around 1 UDP packets per second. I started building that with non blocking socket and threads. Unfortunately my approach does not work at all. I wrote a simple

Re: redirecting stdout/err to mysql table

2008-11-20 Thread Nebur
I've had a similar requiredment and made a small tool for direct logging into databases (see: http://sourceforge.net/projects/rrlog/ ) It's origins are somewhat older than the Python 2.3 standard logging framework, so it can be used without that (but can also be simply integrated with it.) It

Re: Ip format

2008-11-20 Thread luca72
Many thanks for your help I have also find the correct socket function: ip 1578568204 ip = socket.inet_aton(ip) ip_dot = socket.inet_ntoa(ip) Thanks Luca On 20 Nov, 12:36, Tim Chase [EMAIL PROTECTED] wrote: Hello i have this ip 1578568204 how socket function i can have the ip dotted-quad

Re: Problem with writing fast UDP server

2008-11-20 Thread Krzysztof Retel
On Nov 20, 4:00 pm, [EMAIL PROTECTED] wrote: On 20 Nov, 16:03, Krzysztof Retel [EMAIL PROTECTED] wrote: Hi guys, I am struggling writing fast UDP server. It has to handle around 1 UDP packets per second. I started building that with non blocking socket and threads. Unfortunately

Re: how to acces the block inside of a context manager as sourcecode

2008-11-20 Thread Daniel
Hi Aaron, the dataStore combines both the printing and analysis (it will create a report). Unfortunately the end of the block already needs to be known in __enter__, as the report starts to print during the measurement. I decided to do it the following way: __enter__ gets the start line number

Re: Python / Debian package dependencies

2008-11-20 Thread Paul Boddie
On 20 Nov, 02:14, Steven Samuel Cole [EMAIL PROTECTED] wrote: I am trying to build a debian package for my python modules using stdeb and dpkg-buildpackage. The package building itself works, I also managed to have an entry point created and I can use my python modules on the Ubuntu virtual

Re: More elegant way to try running a function X times?

2008-11-20 Thread Boris Borcic
Tim Chase wrote: success = None for i in range(5): #Try to fetch public IP success = CheckIP() if success: break if not success: print Exiting. sys.exit() Though a bit of an abuse, you can use if not any(CheckIP() for _ in range(5)): print Exiting

Re: More elegant way to try running a function X times?

2008-11-20 Thread Tim Chase
success = None for i in range(5): #Try to fetch public IP success = CheckIP() if success: break if not success: print Exiting. sys.exit() Though a bit of an abuse, you can use if not any(CheckIP() for _ in range(5)): print Exiting sys.exit() I don't see

Re: Module Structure/Import Design Problem

2008-11-20 Thread Stef Mientki
Rafe wrote: Hi, I am in a situation where I feel I am being forced to abandon a clean module structure in favor of a large single module. If anyone can save my sanity here I would be forever grateful. My problem is that classes in several modules share a common base class which needs to

Re: More elegant way to try running a function X times?

2008-11-20 Thread Steve Holden
Gilles Ganault wrote: Hello As a newbie, it's pretty likely that there's a smarter way to do this, so I'd like to check with the experts: I need to try calling a function 5 times. If successful, move on; If not, print an error message, and exit the program: = success = None for

Re: More elegant way to try running a function X times?

2008-11-20 Thread Banibrata Dutta
On Thu, Nov 20, 2008 at 11:58 PM, Steve Holden [EMAIL PROTECTED] wrote: Gilles Ganault wrote: Hello As a newbie, it's pretty likely that there's a smarter way to do this, so I'd like to check with the experts: I need to try calling a function 5 times. If successful, move on; If

Re: Module Structure/Import Design Problem

2008-11-20 Thread Steve Holden
Rafe wrote: Hi, I am in a situation where I feel I am being forced to abandon a clean module structure in favor of a large single module. If anyone can save my sanity here I would be forever grateful. My problem is that classes in several modules share a common base class which needs to

Re: Module Structure/Import Design Problem

2008-11-20 Thread Steve Holden
Stef Mientki wrote: Rafe wrote: Hi, I am in a situation where I feel I am being forced to abandon a clean module structure in favor of a large single module. If anyone can save my sanity here I would be forever grateful. My problem is that classes in several modules share a common base

SOAPpy SyntaxError

2008-11-20 Thread [EMAIL PROTECTED]
Hello, I'm going through the SOAP Web Services portion of Mark Pilgrim's tutorial and I'm getting this error when trying to build: python setup.py build Traceback (most recent call last): File setup.py, line 8, in module from SOAPpy.version import __version__ File

Re: Python image library issue: domain users cannot save files?

2008-11-20 Thread [EMAIL PROTECTED]
I have no problem with the python builtin open which we use dayly. Thanks for the hints. Best, V On Nov 19, 5:56 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Wed, 19 Nov 2008 13:43:07 -0200, [EMAIL PROTECTED]   [EMAIL PROTECTED] escribió: Has anyone try to use PIL in a windows domain

Re: Memory error due to the huge/huge input file size

2008-11-20 Thread tejsupra
On Nov 10, 4:47 pm, [EMAIL PROTECTED] wrote: Hello Everyone, I need to read a .csv file which has a size of 2.26 GB . And I wrote a Python script , where I need to read this file. And my Computer has 2 GB RAM Please see the code as follows: This program has been developed to retrieve all

Re: Using eval, or something like it...

2008-11-20 Thread Scott David Daniels
r0g wrote: John Machin wrote: You mention variables of a class but you then proceed to poke at an instance of the class Check out setattr (and getattr) in the docs. The former i.e. the variables of an instance of a class. Thanks :-) Careful here. Your wording seems to indicate you

Re: Module Structure/Import Design Problem

2008-11-20 Thread Stef Mientki
I'm not an expert, I even don't fully understand your problem, but having struggled with imports in the past, I've a solution now, which seems to work quit well. That's not very helpful, is it? Were you planning to keep the solution secret? sorry slip of the keyboard ;-)

Fwd: Problem with writing a long line in a text file

2008-11-20 Thread Mohsen Akbari
--- I use notepad to view my txt file. It appears that way in this tool. --- Here is the output of the debug lines that you mentioned: print *line*.find('\n') -1 print len(*line*) 1528 print repr(line)

Re: Fwd: Problem with writing a long line in a text file

2008-11-20 Thread Steve Holden
Mohsen Akbari wrote: Dear guys, I'm a newbie in python and I have this problem with the code that I'm writing. There is a very long line which I wish to output it to a text file.But when I do this, in the output file, the result appears in two lines. I thought maybe that's because the

Re: help with comparison

2008-11-20 Thread tekion
On Nov 19, 11:36 pm, George Sakkis [EMAIL PROTECTED] wrote: On Nov 19, 10:21 pm,tekion[EMAIL PROTECTED] wrote: Hi, Could some one take a look at the below code snipet which keep failing: import optparse p = optparse.OptionParser(description=script to do stuff, prog=myscript.py,

Re: More elegant way to try running a function X times?

2008-11-20 Thread Boris Borcic
Tim Chase wrote: success = None for i in range(5): #Try to fetch public IP success = CheckIP() if success: break if not success: print Exiting. sys.exit() Though a bit of an abuse, you can use if not any(CheckIP() for _ in range(5)): print Exiting

Python 3 __cmp__ semantic change?

2008-11-20 Thread Johannes Bauer
Hello group, I'm porting some code of mine to Python 3. One class has the __cmp__ operator overloaded, but comparison doesn't seem to work anymore with that: Traceback (most recent call last): File ./parse, line 25, in module print(x y) TypeError: unorderable types: IP() IP() Was there

Re: spam update

2008-11-20 Thread News123
Hi, Grant Edwards wrote: . . . It does penalizes legitimate users who post from Google Groups. They've made the choice to use the same posting conduit as spammers, and presumably they know the consequences. Hmm I made the chooice to use google groups because sometimes I like to write /

Re: Python 3 __cmp__ semantic change?

2008-11-20 Thread Inyeol . Lee
On Nov 20, 1:18 pm, Johannes Bauer [EMAIL PROTECTED] wrote: Hello group, I'm porting some code of mine to Python 3. One class has the __cmp__ operator overloaded, but comparison doesn't seem to work anymore with that: Traceback (most recent call last):   File ./parse, line 25, in module    

Re: Fwd: Problem with writing a long line in a text file

2008-11-20 Thread Matthew Barnett
Steve Holden wrote: Mohsen Akbari wrote: Dear guys, I'm a newbie in python and I have this problem with the code that I'm writing. There is a very long line which I wish to output it to a text file.But when I do this, in the output file, the result appears in two lines. I thought maybe that's

Re: Python 3 __cmp__ semantic change?

2008-11-20 Thread Johannes Bauer
[EMAIL PROTECTED] schrieb: On Nov 20, 1:18 pm, Johannes Bauer [EMAIL PROTECTED] wrote: Hello group, I'm porting some code of mine to Python 3. One class has the __cmp__ operator overloaded, but comparison doesn't seem to work anymore with that: Traceback (most recent call last): File

Re: Python 3 __cmp__ semantic change?

2008-11-20 Thread Christian Heimes
Johannes Bauer wrote: Hello group, I'm porting some code of mine to Python 3. One class has the __cmp__ operator overloaded, but comparison doesn't seem to work anymore with that: __cmp__ is gone Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: spam update

2008-11-20 Thread Grant Edwards
On 2008-11-20, News123 [EMAIL PROTECTED] wrote: I didn't know aboug gmane. The UI isn't as fancy as Google's, but it's a way of separating yourself from the spammers. Finding a solution which doesn't penalize gmail users is still a good idea I think. Of course. One problem is that Google

Re: Python 3 __cmp__ semantic change?

2008-11-20 Thread Steve Holden
Johannes Bauer wrote: [EMAIL PROTECTED] schrieb: On Nov 20, 1:18 pm, Johannes Bauer [EMAIL PROTECTED] wrote: Hello group, I'm porting some code of mine to Python 3. One class has the __cmp__ operator overloaded, but comparison doesn't seem to work anymore with that: Traceback (most recent

Re: Air Force1 and Air Jordan shoes PAYPAL wholesale

2008-11-20 Thread r0g
Pierre-Alain Dorange wrote: air force1 shoes [EMAIL PROTECTED] wrote: air force1 shoes. air force1 high shoes. air force1 light shoes File stdin, line 1 air force1 shoes. air force1 high shoes. air force1 light shoes ^ SyntaxError: invalid syntax LOL! X0D --

Tools for using virtual environments and PEP 370

2008-11-20 Thread Дамјан Георгиевски
Python 2.6 implemented PEP 370: Per-user site-packages Directory[1] Now, are there any tools I could use to create and activate virtual environments like workingenv, virtualenv etc. but that will use PYTHONUSERBASE instead of hard-linking the python program. [1]

Re: Programming exercises/challenges

2008-11-20 Thread r0g
Edwin wrote: On Nov 18, 6:39 pm, [EMAIL PROTECTED] wrote: Hi guys, I'm learning Python by teaching myself, and after going through several tutorials I feel like I've learned the basics. Since I'm not taking a class or anything, I've been doing challenges/programs to reinforce the material

Re: Python 3 __cmp__ semantic change?

2008-11-20 Thread Ben Finney
Steve Holden [EMAIL PROTECTED] writes: You will observe that __cmp__ no longer appears in the index: http://docs.python.org/dev/3.0/genindex-_.html I searched in vain for an official description of this changed behaviour. Where can we find an official description of how comparisons are

Re: Python 3 __cmp__ semantic change?

2008-11-20 Thread Steve Holden
Ben Finney wrote: Steve Holden [EMAIL PROTECTED] writes: You will observe that __cmp__ no longer appears in the index: http://docs.python.org/dev/3.0/genindex-_.html I searched in vain for an official description of this changed behaviour. Where can we find an official description of how

Re: Python 3 __cmp__ semantic change?

2008-11-20 Thread Terry Reedy
Ben Finney wrote: Steve Holden [EMAIL PROTECTED] writes: You will observe that __cmp__ no longer appears in the index: http://docs.python.org/dev/3.0/genindex-_.html I searched in vain for an official description of this changed behaviour. Where can we find an official description of how

Re: Python 3 __cmp__ semantic change?

2008-11-20 Thread Christian Heimes
Terry Reedy wrote: I was going to say look in What's New, but the __cmp__ removal is missing. So I filed http://bugs.python.org/issue4372 The whatsnew section of Python 3.0 is still empty. Guido didn't had time to write it. http://bugs.python.org/issue2306 --

How to get the class instance of a passed method ?

2008-11-20 Thread Stef Mientki
hello, if I pass a class method to a function, is it possible to determine the class instance in that function ? class test ( object ) : def My_Method ( self ) : return 22 def do_something ( parameter ) : # here I want to determine My_Instance My_Instance = test () do something (

How to get the class instance of a passed method ?

2008-11-20 Thread Stef Mientki
hello, if I pass a class method to a function, is it possible to determine the class instance in that function ? class test ( object ) : def My_Method ( self ) : return 22 def do_something ( parameter ) : # here I want to determine My_Instance My_Instance = test () do something (

function parameter scope python 2.5.2

2008-11-20 Thread J Kenneth King
I recently encountered some interesting behaviour that looks like a bug to me, but I can't find the appropriate reference to any specifications to clarify whether it is a bug. Here's the example code to demonstrate the issue: class SomeObject(object): def __init__(self): self.words

Re: How to get the class instance of a passed method ?

2008-11-20 Thread Christian Heimes
Stef Mientki wrote: hello, if I pass a class method to a function, is it possible to determine the class instance in that function ? class test ( object ) : def My_Method ( self ) : return 22 def do_something ( parameter ) : # here I want to determine My_Instance My_Instance = test ()

Re: function parameter scope python 2.5.2

2008-11-20 Thread J Kenneth King
J Kenneth King [EMAIL PROTECTED] writes: I recently encountered some interesting behaviour that looks like a bug to me, but I can't find the appropriate reference to any specifications to clarify whether it is a bug. Here's the example code to demonstrate the issue: class

Re: How to get the class instance of a passed method ?

2008-11-20 Thread Stef Mientki
Christian Heimes wrote: thanks Christian, cheers, Stef -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3 __cmp__ semantic change?

2008-11-20 Thread Johannes Bauer
Steve Holden schrieb: If it's not present then it would be worth reporting it as a 3.0 bug - there's still time to get it in, as the release isn't due until early December. Seems it was removed on purpose - I'm sure there was a good reason for that, but may I ask why? Instead of the sleek

Re: function parameter scope python 2.5.2

2008-11-20 Thread alex23
On Nov 21, 9:40 am, J Kenneth King [EMAIL PROTECTED] wrote: Of course, providing a shallow (or deep as necessary) copy makes it work, I'm curious as to why the value passed as a parameter to a function outside the class is passed a reference rather than a copy. You're passing neither a

Re: Python 3 __cmp__ semantic change?

2008-11-20 Thread Terry Reedy
Christian Heimes wrote: Terry Reedy wrote: I was going to say look in What's New, but the __cmp__ removal is missing. So I filed http://bugs.python.org/issue4372 The whatsnew section of Python 3.0 is still empty. Guido didn't had time to write it. http://bugs.python.org/issue2306 What's

Re: Using eval, or something like it...

2008-11-20 Thread r0g
Scott David Daniels wrote: r0g wrote: John Machin wrote: You mention variables of a class but you then proceed to poke at an instance of the class Check out setattr (and getattr) in the docs. The former i.e. the variables of an instance of a class. Thanks :-) Careful here. Your

Re: Optional parameter object re-used when instantiating multiple objects

2008-11-20 Thread alex23
On Nov 20, 10:42 pm, Aaron Brady [EMAIL PROTECTED] wrote: At first, I would expect it to define them at compile-time.  Then, when I learned there was no such thing, I would expect it to define them at execute-time.  What does that have to do with evaluating a default argument? It has

Re: Python 3 __cmp__ semantic change?

2008-11-20 Thread skip
Johannes Seems it was removed on purpose - I'm sure there was a good Johannes reason for that, but may I ask why? Start here: http://www.mail-archive.com/[EMAIL PROTECTED]/msg11474.html Also, a comment to this blog post suggests creating a CmpMixin:

Re: Optional parameter object re-used when instantiating multiple objects

2008-11-20 Thread Aaron Brady
On Nov 20, 5:54 pm, alex23 [EMAIL PROTECTED] wrote: On Nov 20, 10:42 pm, Aaron Brady [EMAIL PROTECTED] wrote: At first, I would expect it to define them at compile-time.  Then, when I learned there was no such thing, I would expect it to define them at execute-time.  What does that have to

How to run a python app in the background?

2008-11-20 Thread kevintylr
I'm a beginning programmer writing a tiny app with a TkInter GUI. Desired functionality: When the user enters a time interval, I want the windows to disappear, and the program to lie dormant until the scheduled time (currently using sched module), when it would pop up another window and execute a

Re: Python 3 __cmp__ semantic change?

2008-11-20 Thread Terry Reedy
Johannes Bauer wrote: Steve Holden schrieb: If it's not present then it would be worth reporting it as a 3.0 bug - there's still time to get it in, as the release isn't due until early December. Seems it was removed on purpose - I'm sure there was a good reason for that, but may I ask why?

Searching for Regular Expressions in a string WITH overlap

2008-11-20 Thread Ben
I apologize in advance for the newbie question. I'm trying to figure out a way to find all of the occurrences of a regular expression in a string including the overlapping ones. For example, given the string 123456789 I'd like to use the RE ((2)|(4))[0-9]{3} to get the following matches: 2345

Re: function parameter scope python 2.5.2

2008-11-20 Thread George Sakkis
On Nov 20, 6:40 pm, J Kenneth King [EMAIL PROTECTED] wrote: J Kenneth King [EMAIL PROTECTED] writes: I recently encountered some interesting behaviour that looks like a bug to me, but I can't find the appropriate reference to any specifications to clarify whether it is a bug. Here's

Re: Python 3 __cmp__ semantic change?

2008-11-20 Thread George Sakkis
On Nov 20, 6:58 pm, [EMAIL PROTECTED] wrote:     Johannes Seems it was removed on purpose - I'm sure there was a good     Johannes reason for that, but may I ask why? Start here:     http://www.mail-archive.com/[EMAIL PROTECTED]/msg11474.html Also, a comment to this blog post suggests

Re: Searching for Regular Expressions in a string WITH overlap

2008-11-20 Thread Matimus
On Nov 20, 4:31 pm, Ben [EMAIL PROTECTED] wrote: I apologize in advance for the newbie question.  I'm trying to figure out a way to find all of the occurrences of a regular expression in a string including the overlapping ones. For example, given the string 123456789 I'd like to use the RE

Re: Using eval, or something like it...

2008-11-20 Thread Chris Rebert
On Thu, Nov 20, 2008 at 3:54 PM, r0g [EMAIL PROTECTED] wrote: Scott David Daniels wrote: r0g wrote: John Machin wrote: You mention variables of a class but you then proceed to poke at an instance of the class Check out setattr (and getattr) in the docs. The former i.e. the

Re: Test if list contains another list

2008-11-20 Thread str1442
Ali wrote: Its funny, I just visited this problem last week. http://dulceetutile.blogspot.com/2008/11/strange-looking-python- statement_17.html ./Ali -- http://mail.python.org/mailman/listinfo/python-list That use of reduce is nice, but you better use all() / any(). --

Re: Tyrton ERP 1.0 released

2008-11-20 Thread erp software
On Nov 18, 3:26 pm, Hartmut Goebel [EMAIL PROTECTED] wrote: On behalf of the Tryton team I'm proud to announce Tryton 1.0, an Open Source application platform and ERP. It provides modularity, scalability and security. This is the first release of Tryton, a fork of OpenERP (formally known as

Re: Using eval, or something like it...

2008-11-20 Thread Scott David Daniels
r0g wrote: ... A class is like a template which combines a complex data type (made from a combination of other data types) and the methods that operate on that data type. You generally don't work with classes directly but you make instances of them, each instance has it's own internal state and

Re: Using eval, or something like it...

2008-11-20 Thread George Sakkis
On Nov 20, 6:54 pm, r0g [EMAIL PROTECTED] wrote: It would seem from this setattr function that the proper term for these is 'attributes'. That for many years I have considered pretty much any named thing that may vary a 'variable' might be at the root of the problem here as it's a very

Re: SOAPpy SyntaxError

2008-11-20 Thread Jon-Pierre Gentil
[EMAIL PROTECTED] wrote: I'm going through the SOAP Web Services portion of Mark Pilgrim's tutorial and I'm getting this error when trying to build: File /Users/username/Desktop/SOAPpy-0.12.0/SOAPpy/Client.py, line 46 from __future__ import nested_scopes SyntaxError: from __future__

Re: Problem with writing fast UDP server

2008-11-20 Thread Gabriel Genellina
En Thu, 20 Nov 2008 14:24:20 -0200, Krzysztof Retel [EMAIL PROTECTED] escribió: On Nov 20, 4:00 pm, [EMAIL PROTECTED] wrote: On 20 Nov, 16:03, Krzysztof Retel [EMAIL PROTECTED] wrote: I am struggling writing fast UDP server. It has to handle around 1 UDP packets per second. I started

Re: Python / Debian package dependencies

2008-11-20 Thread Steven Samuel Cole
Hi Stephane, thanks for your reply! :-) I do not get any notification or warning or whatever from dpkg, all output I get when running # sudo dpkg -i python-package name_0.0.1-4927-1_all.deb is Selecting previously deselected package python-package name. (Reading database ... 15026

  1   2   3   >