Re: Python / Debian package dependencies

2008-11-20 Thread Steven Samuel Cole
Hey Paul thanks for your reply! :-) 2008/11/21 Paul Boddie <[EMAIL PROTECTED]>: > Are you saying that psycopg2 needs setuptools for the setup.py script > to work? This isn't generally the case (or wasn't), but maybe the > "entry point" is a setuptools thing which would then demand that > software

Re: Problem with writing fast UDP server

2008-11-20 Thread John Nagle
Gabriel Genellina wrote: 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 pa

Re: Tyrton ERP 1.0 released

2008-11-20 Thread CL (Ciu Loeng) Lam
HiCould the trython use the Oracle instead of the default postgresql ? 2008/11/19 erp software <[EMAIL PROTECTED]> > 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

Re: How to run a python app in the background?

2008-11-20 Thread Aaron Brady
On Nov 20, 6:13 pm, [EMAIL PROTECTED] wrote: > 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 modul

Re: Module Structure/Import Design Problem

2008-11-20 Thread Rafe
On Nov 21, 1:39 am, Steve Holden <[EMAIL PROTECTED]> 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 i

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

2008-11-20 Thread Steven D'Aprano
On Wed, 19 Nov 2008 10:05:23 -0800, Dennis Lee Bieber wrote: > Do you really want a "default" argument that changes value depending > upon actions performed in the /surrounding/ scope? And if you do, it is easy to get: default_y = "something" def parrot(x, y=None): if y is None: y =

Re: Module Structure/Import Design Problem

2008-11-20 Thread Rafe
On Nov 21, 2:36 am, Stef Mientki <[EMAIL PROTECTED]> wrote: > >> 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 kee

Re: Programming exercises/challenges

2008-11-20 Thread Edwin
On Nov 20, 6:28 am, [EMAIL PROTECTED] wrote: >     >> 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 separat

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

2008-11-20 Thread Steven D'Aprano
On Thu, 20 Nov 2008 14:22:50 +1300, greg 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

Re: How to run a python app in the background?

2008-11-20 Thread Steve Holden
Aaron Brady wrote: > On Nov 20, 6:13 pm, [EMAIL PROTECTED] wrote: >> 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 (curr

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

2008-11-20 Thread Rafe
On Nov 21, 6:41 am, Stef Mientki <[EMAIL PROTECTED]> wrote: > Christian Heimes wrote: > > thanks Christian, > > cheers, > Stef OT: Just to pass along some great advice I got recently. Read PEP008. It contains guidelines for formatting your code. - Rafe -- http://mail.python.org/mailman/listinfo/p

Re: Module Structure/Import Design Problem

2008-11-20 Thread Steve Holden
Rafe wrote: > On Nov 21, 1:39 am, Steve Holden <[EMAIL PROTECTED]> 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. >>> M

Re: sorting list of complex numbers

2008-11-20 Thread Steven D'Aprano
On Wed, 19 Nov 2008 18:39:27 -0800, Paul Rubin wrote: > Terry Reedy <[EMAIL PROTECTED]> writes: >> >> Do your tuple destructuring in the first statement in your body and >> >> nothing will break. > > Why get rid of a useful feature that unclutters code? Unfortunately, the people who find it usef

Re: Problem with writing fast UDP server

2008-11-20 Thread Jean-Paul Calderone
On Fri, 21 Nov 2008 00:20:49 -0200, Gabriel Genellina <[EMAIL PROTECTED]> wrote: 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

Sending username password to a webpage

2008-11-20 Thread KDawg44
Hi, Is there a way to essentially simulate populating a text box and calling a submit button on a webpage? I want to write an app that gets a users information from a website and then uses that to get information from another site. The first site requires a log in. Thanks for any advice that ge

Re: Module Structure/Import Design Problem

2008-11-20 Thread Gabriel Genellina
En Thu, 20 Nov 2008 17:36:11 -0200, Stef Mientki <[EMAIL PROTECTED]> escribió: 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 t

Re: Sending username password to a webpage

2008-11-20 Thread Chris Rebert
On Thu, Nov 20, 2008 at 7:52 PM, KDawg44 <[EMAIL PROTECTED]> wrote: > Hi, > > Is there a way to essentially simulate populating a text box and > calling a submit button on a webpage? I want to write an app that > gets a users information from a website and then uses that to get > information from

Re: function parameter scope python 2.5.2

2008-11-20 Thread Rafe
On Nov 21, 6:31 am, J Kenneth King <[EMAIL PROTECTED]> wrote: > 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: >

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

2008-11-20 Thread Steven D'Aprano
On Thu, 20 Nov 2008 11:12:56 +1000, James Mills wrote: > DON'T USE eval! If you're going to make a sweeping generalization like that, at least offer some alternatives, and explain why eval should be avoided. Otherwise your advice is just cargo-cult programming. eval is not inherently bad, it d

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

2008-11-20 Thread Steven D'Aprano
On Wed, 19 Nov 2008 11:26:54 -0800, George Sakkis wrote: > On Nov 19, 1:05 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > >> On Wed, 19 Nov 2008 05:41:57 -0800 (PST), Rick Giuly >> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: >> >> >> >> > (By "better" I mean that over man

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

2008-11-20 Thread Steven D'Aprano
On Wed, 19 Nov 2008 11:20:05 -0500, Terry Reedy wrote: >> It is useful and convenient to have "null values" like None, but it >> isn't useful to say that None is not a value. > > I never said that. But you've been defending the views of somebody who did. If you're going to play Devil's Advoca

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

2008-11-20 Thread John Nagle
Steven D'Aprano wrote: On Thu, 20 Nov 2008 14:22:50 +1300, greg 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

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

2008-11-20 Thread Steven D'Aprano
On Thu, 20 Nov 2008 04:42:24 -0800, Aaron Brady wrote: > 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

Re: F2PY: Access Fortran module data from multiple python module

2008-11-20 Thread Gabriel Genellina
En Wed, 19 Nov 2008 20:06:37 -0200, Yann Vonder <[EMAIL PROTECTED]> escribió: Here is a description of what I am trying to implement using F2PY: I have created two python extension modules using F2PY. The first extension module (say fsubr1.so) contains a Fortran module (say "tmod") and a su

Re: GzipFile as a Context manager

2008-11-20 Thread Gabriel Genellina
En Wed, 19 Nov 2008 17:04:22 -0200, Mikolai Fajer <[EMAIL PROTECTED]> escribió: Is there a reason that the gzip.GzipFile class does not have __enter__ and __exit__ methods that mimic those of the file object? I expected the following to work but it doesn't: import gzip with gzip.open('temp.g

Re: Programming exercises/challenges

2008-11-20 Thread skip
>> I am constantly amazed at work that people open a separate emacs for >> each file they want to edit.  Most of them seem not to even know that >> find-file exists. Edwin> Come on mate... it's already a bit hard to post in a non-native Edwin> language. As a beginner in Python

Re: function parameter scope python 2.5.2

2008-11-20 Thread Steven D'Aprano
On Thu, 20 Nov 2008 18:31:12 -0500, J Kenneth King wrote: > Of course I expected that recursive_func() would receive a copy of > weird_obj.words but it appears to happily modify the object. I am curious why you thought that. What made you think Python should/did make a copy of weird_obj.words wh

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

2008-11-20 Thread Steven D'Aprano
On Fri, 21 Nov 2008 03:32:25 +, Steven D'Aprano wrote: >> Rather it seems to me that the essence of the idea they had in mind is >> that call-by-value is equivalent to assignment. > > You've just *assumed* that assignment in Algol 60 doesn't involving > copying. Based on the very little I kno

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

2008-11-20 Thread alex23
On Nov 21, 10:07 am, Aaron Brady <[EMAIL PROTECTED]> wrote: > Why, I would expect the interpreter to define the functions when it > first hits the def, that is, at the point of definition. Then why are you arguing that the parameters should be re-defined at the point of calling? -- http://mail.py

Re: Problem with writing fast UDP server

2008-11-20 Thread Greg Copeland
On Nov 20, 9:03 am, 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

how to run afile with an argument from python IDLE editor

2008-11-20 Thread Seid Mohammed
hi all, I have a problem. when i run a file "python xxx.py " from a comand line, it just work. But the DOS command line do not support unicode and I want to run it just from the IDLE editor. i can run by pressing F5, but without an argument anybody can hint me how to run with an argument just i

Re: Sending username password to a webpage

2008-11-20 Thread r0g
KDawg44 wrote: > Hi, > > Is there a way to essentially simulate populating a text box and > calling a submit button on a webpage? I want to write an app that > gets a users information from a website and then uses that to get > information from another site. The first site requires a log in. >

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

2008-11-20 Thread Arnaud Delobelle
Christian Heimes <[EMAIL PROTECTED]> writes: > 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 ( param

Re: function parameter scope python 2.5.2

2008-11-20 Thread Arnaud Delobelle
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 SomeObjec

capacitor

2008-11-20 Thread anju
A capacitor is an electrical/electronic device that can store energy in the electric field between a pair of conductors (called "plates"). The process of storing energy in the capacitor is known as "charging", and involves electric charges of equal magnitude, but opposite polarity, building up on e

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

2008-11-20 Thread Chris Rebert
On Thu, Nov 20, 2008 at 9:26 PM, alex23 <[EMAIL PROTECTED]> wrote: > On Nov 21, 10:07 am, Aaron Brady <[EMAIL PROTECTED]> wrote: >> Why, I would expect the interpreter to define the functions when it >> first hits the def, that is, at the point of definition. > > Then why are you arguing that the p

how to run python file from the python IDLE editor

2008-11-20 Thread Seid Mohammed
hi all, I have a problem. when i run a file "python xxx.py " from a comand line, it just work. But the DOS command line do not support unicode and I want to run it just from the IDLE editor. i can run by pressing F5, but without an argument anybody can hint me how to run with an argument just i

<    1   2