xmlrpc username/password failures

2005-02-12 Thread [EMAIL PROTECTED]
Hi, I'm trying to get xmlrpc working with usernames and passwords and having some issues. This is on Linux (WBEL3.0R1). First of all with python 2.2.3 which comes with WBEL the following simple code fails (passwords server names altered to protect the innocent): #!/usr/bin/python import

Re: namespaces module (a.k.a. bunch, struct, generic object, etc.) PEP

2005-02-12 Thread Nick Coghlan
Steven Bethard wrote: Hmmm... This does seem sensible. And sidesteps the issue about suggesting that subclasses use Namespace.update instead of namespaceinstance.update -- the latter just won't work! (This is a Good Thing, IMHO.) Yeah, I thought so too. It also crystallised for me that the

Re: namespaces module (a.k.a. bunch, struct, generic object, etc.) PEP

2005-02-12 Thread Steven Bethard
Nick Coghlan wrote: There *is* a problem with using __getattr__ though - any attribute in the chained namespaces that is shadowed by a class attribute (like 'update') will be picked up from the class, not from the chained namespaces. So we do need to use __getattribute__ to change that lookup

Re: Python UPS / FedEx Shipping Module

2005-02-12 Thread Kartic
Gabriel Cooper said the following on 2/11/2005 2:23 PM: I've made UPS and FedEx shipping rate request modules in python using XML. Is there an interest in putting this on the web? I am interested in it for educational value, if not anything else. Please post the web address from which to

connecting to Sybase/MsSQL from python

2005-02-12 Thread John Fabiani
Hi, I'm hoping someone on the list has connected to sybase/MsSQL with something that works with DBAPI 2.0 from a linux box (SUSE 9.2) because I can't seem to get it done. I found Object Craft's python code that uses FreeTDS. But I can't get it compiled. The code is looking for sybdb.h (first

Re: newbie question

2005-02-12 Thread John Machin
Dan Perl wrote: [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello All, What is the python equivalent of the following statement? while (n--) Like other posters said, you should give more details with your question. What do you mean by equivalent? The following is

Re: Commerical graphing packages?

2005-02-12 Thread Vincent Wehren
Erik Johnson wrote: I am aware of ChartDirector (http://www.advsofteng.com/ ) which explicitly supports python and seems to be about the right level of sophistication. I don't really know of any other packages in this space, do you? I am seeking feedback and reccomendations from people who

pre-check for string-to-number conversion

2005-02-12 Thread 18k11tm001
I am reading an ASCII data file and converting some of the strings to integers or floats. However, some of the data is corrupted and the conversion doesn't work. I know that I can us exceptions, but they don't seem like the cleanest and simplest solution to me. I would like to simply perform a

Re: Big development in the GUI realm

2005-02-12 Thread Robert Kern
Arich Chanachai wrote: I have never seen a commercial license for a library which stated that you did not have to pay the license fee until you have made that much money in sales from the software which you created, in part, from that library. I would be in favor of such a license, but I

PHP session equivalent?

2005-02-12 Thread Erik Johnson
There are a lot of things about PHP I was not too keen on and hence why my company is primarily doing Python these days, but one thing I was quite impressed with was the ease with which it provided session functionality... ?php session_start(); session_register['my_var'];

Re: exception handling for a function returning several values

2005-02-12 Thread Steven Bethard
[EMAIL PROTECTED] wrote: If a function that normally returns N values raises an exception, what should it return? Depends on what you want to do with the result of the function. N values of None seems reasonable to me, so I would write code such as def foo(x): try: # code setting y and

Re: sre is broken in SuSE 9.2

2005-02-12 Thread Denis S. Otkidach
On Sat, 12 Feb 2005 09:42:41 +0100 Fredrik Lundh [EMAIL PROTECTED] wrote: the relevant part for this thread is *locale-*. if wctype depends on the locale, it cannot be used for generic build. (custom interpreters are an- other thing, but they shouldn't be shipped as python). You are right.

Re: pre-check for string-to-number conversion

2005-02-12 Thread Michael Hoffman
[EMAIL PROTECTED] wrote: I know that I can us exceptions, but they don't seem like the cleanest and simplest solution to me. Stop worrying and learn to love exceptions. :) -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

listerator clonage

2005-02-12 Thread Cyril BAZIN
Hello, I want to build a function which return values which appear two or more times in a list: So, I decided to write a little example which doesn't work: #l = [1, 7, 3, 4, 3, 2, 1] #i = iter(l) #for x in i: #j = iter(i) #for y in j: #if x == y: #print x In thinked

Python in EDA

2005-02-12 Thread vsapre80
Hi, I am new to Python and coming from the EDA/VLSI Design background. I wanted to know if there are some active projects going on EDA modules written in Python. Usually, use of scripting tools in VLSI Design is on a per-project basis and rarely reaches the level of a general framework, mostly

Re: check if object is number

2005-02-12 Thread Michael Hartl
As I mention below, I mistook the function from my utilities file for a Python built-in; here's the implementation: #def isnumber(x): #Is x a number? We say it is if it has an __int__ method. #return hasattr(x, '__int__') -- http://mail.python.org/mailman/listinfo/python-list

[perl-python] 20050211 generating expression by nested loops

2005-02-12 Thread Xah Lee
# -*- coding: utf-8 -*- # Python # David Eppstein of the Geometry Junkyard fame gave this elegant # version for returing all possible pairs from a range of n numbers. def combo2(n): return dict([('%d,%d'%(i+1,j+1),(i+1,j+1)) for j in range(n) for i in range(j)]) print combo2(5) # this

Re: Trouble using telentlib

2005-02-12 Thread Kartic
Nitin Chaumal said the following on 2/11/2005 5:41 PM: I sarched the existing threads but didnt find an answer to this. I am writing simple script which uses telentlib to open a session with a unix machine and run tail -f logfile.txt on one of the logfiles. import telnetlib HOST = 192.X.X.X user =

Re: Python UPS / FedEx Shipping Module

2005-02-12 Thread Peter Hansen
Gabriel Cooper wrote: I've made UPS and FedEx shipping rate request modules in python using XML. Is there an interest in putting this on the web? I'd be interested in at least looking at them, hoping to learn something of value, even if I don't have (or believe I don't have) any current use for

Re: Loading functions from a file during run-time

2005-02-12 Thread Wensheng
if the file you want to include is not txt, but instead py, it should be easy. for example you have fs.py you just - fs=__import__(fs) f=[a for a in dir(fs) if a[0:2]!='__'] #no you have f1(),f2(),f3() as f[0],f[1],f[2] then excute desired function, for example

Re: Alternative to raw_input ?

2005-02-12 Thread Peter Hansen
BOOGIEMAN wrote: On Fri, 11 Feb 2005 18:00:08 +0100, den wrote: Did you try this: import msvcrt msvcrt.getch() Yes, that's what I need. Thank you. BTW, sometimes program continues without me pressing any button, why ? Probably because you had already hit a key earlier, and it was still in the

A REAL money maker. IT WORKS!!!!

2005-02-12 Thread Chris48224
Try this out, it works Turn $10 into $10,000 with PayPal, easy and quick. PLEASE TAKE A MOMENT TO READ THIS INFORMATION. THIS REALLY WORKS!!! I WAS SHOCKED WHEN I SAW HOW MUCH MONEY CAME FLOODING INTO MY PAYPAL ACCOUNT. -Mark 2004 Dear Friend, This is a new program, as you will see. It can

Re: dos box appears when clicking .pyc

2005-02-12 Thread Larry Bates
Change the association for .pyc files to pythonw.exe from python.exe. Larry Bates Philippe C. Martin wrote: Hi, For a few months now, I have been used .pyc script under XP without getting the DOS box. I just re-installed the scripts on another XP box and am now getting the DOS box ! Something to

Re: pre-check for string-to-number conversion

2005-02-12 Thread Steven Bethard
[EMAIL PROTECTED] wrote: I am reading an ASCII data file and converting some of the strings to integers or floats. However, some of the data is corrupted and the conversion doesn't work. I know that I can us exceptions, but they don't seem like the cleanest and simplest solution to me. You should

Your message to RT-Announce awaits moderator approval

2005-02-12 Thread rt-announce-bounces
Your mail to 'RT-Announce' with the subject Delivery by mail Is being held until the list moderator can review it for approval. The reason it is being held: Post by non-member to a members-only list Either the message will get posted to the list, or you will receive notification of

exception handling for a function returning several values

2005-02-12 Thread beliavsky
If a function that normally returns N values raises an exception, what should it return? N values of None seems reasonable to me, so I would write code such as def foo(x): try: # code setting y and z return y,z except: return None,None y,z = foo(x) If I try to use y

Your message to RT-Announce awaits moderator approval

2005-02-12 Thread rt-announce-bounces
Your mail to 'RT-Announce' with the subject Delivery service mail Is being held until the list moderator can review it for approval. The reason it is being held: Post by non-member to a members-only list Either the message will get posted to the list, or you will receive notification

Re: namespaces module (a.k.a. bunch, struct, generic object, etc.) PEP

2005-02-12 Thread Nick Coghlan
Steven Bethard wrote: Should namespace chaining be supported? One suggestion would add a NamespaceChain object to the module:: This does have the advantage of keeping the basic namespace simple. However, it may also be worth having native chaining support in Namespace: I think I prefer the

Re: sre is broken in SuSE 9.2

2005-02-12 Thread Martin v. Löwis
Serge Orlov wrote: To summarize the discussion: either it's a bug in glibc or there is an option to specify modern POSIX locale. POSIX locale consist of characters from the portable character set, unicode is certainly portable. Yes, but U+00E4 is not in the portable character set. The portable

Re: pre-check for string-to-number conversion

2005-02-12 Thread 18k11tm001
Yes, I suppose exceptions are the best way to handle this problem. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: sre is broken in SuSE 9.2

2005-02-12 Thread Serge Orlov
Martin v. Löwis wrote: Serge Orlov wrote: To summarize the discussion: either it's a bug in glibc or there is an option to specify modern POSIX locale. POSIX locale consist of characters from the portable character set, unicode is certainly portable. Yes, but U+00E4 is not in the

Re: check if object is number

2005-02-12 Thread marco
Steven Bethard wrote: Is there a good way to determine if an object is a numeric type? . . . Ideas? Maybe this can help? def isnumber(x): try: return(x == x-0) except: return False print '1:\t', isnumber(1) print '1.25:\t', isnumber(1.25) print '1.0 / 7:\t', isnumber(1.0 /

Re: frozenset() without arguments should return a singleton

2005-02-12 Thread Terry Reedy
Stefan Behnel [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi! frozenset() doesn't behave as the other immutable empty data types in 2.4: . '' is '' True . () is () True I believe the reference manual describes this sort of behavior for immutables as an *optional*

Re: Commerical graphing packages?

2005-02-12 Thread 18k11tm001
Check out GRACE. It's not specifically designed for Python, but I've been using with Python for a couple of years or more. I'm very happy with it, and it's free. It works both interactively and in batch mode. Do a google on GRACE. -- http://mail.python.org/mailman/listinfo/python-list

Re: check if object is number

2005-02-12 Thread Peter Hansen
marco wrote: Steven Bethard wrote: Is there a good way to determine if an object is a numeric type? Maybe this can help? def isnumber(x): try: return(x == x-0) except: return False Not exactly foolproof: def isnumber(x): ... try: return (x == x-0) ... except: return

ANN: pyMinGW support for Python 2.3.5 (final) is available

2005-02-12 Thread A.B., Khalid
This is to inform those interested in compiling Python in MinGW that an updated version of pyMinGW is now available. Get it from here: http://jove.prohosting.com/iwave/ipython/pyMinGW.html Regards Khalid -- http://mail.python.org/mailman/listinfo/python-list

Re: connecting to Sybase/MsSQL from python

2005-02-12 Thread vincent wehren
John Fabiani [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Hi, I'm hoping someone on the list has connected to sybase/MsSQL with something that works with DBAPI 2.0 from a linux box (SUSE 9.2) because I can't seem to get it done. I found Object Craft's python code that

Re: Big development in the GUI realm

2005-02-12 Thread Robert Kern
Jeremy Bowers wrote: On Fri, 11 Feb 2005 14:45:09 -0800, Robert Kern wrote: Until such matters are unequivocally determined in a court that has jurisdiction over you, do you really want to open yourself to legal risk and certain ill-will from the community? Huh? What are you talking about? I'm

dos box appears when clicking .pyc

2005-02-12 Thread Philippe C. Martin
Hi, For a few months now, I have been used .pyc script under XP without getting the DOS box. I just re-installed the scripts on another XP box and am now getting the DOS box ! Something to do with the registry ? Regards, Philippe -- *** Philippe C. Martin

Re: Big development in the GUI realm

2005-02-12 Thread Robert Kern
Jeremy Bowers wrote: On Fri, 11 Feb 2005 18:24:22 +0100, Damjan wrote: What you described is not ok according to the GPL - since you distributed a binary thats derived from GPL software (and you didn't publish it source code under the GPL too). No you didn't. You distributed a binary completely

Hack with os.walk()

2005-02-12 Thread Frans Englich
Hello, Have a look at this recursive function: def walkDirectory( directory, element ): element = element.newChild( None, directory, None ) # automatically appends to parent element.setProp( name, os.path.basename(directory)) for root, dirs, files in os.walk( directory ):

Re: check if object is number

2005-02-12 Thread Steven Bethard
Fredrik Lundh wrote: Steven Bethard wrote: Is there a good way to determine if an object is a numeric type? assert operator.isNumberType(i) Interesting, thanks! If I read the source right, PyNumber_Check (which operator.isNumberType is an alias for) basically just returns True if the object's

Re: exception handling for a function returning several values

2005-02-12 Thread Erik Johnson
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If I try to use y or z inappropriately when they are None, the program will stop. An alternative is to return an error flag in addition to y and z from function foo and check the value of the error flag in the calling program. This

Re: connecting to Sybase/MsSQL from python

2005-02-12 Thread Ed Leafe
On Feb 11, 2005, at 8:12 PM, John Fabiani wrote: So is there a kind sole out there that can help with instructions on what is needed to get python talking to MsSQL. Has anyone ever used this product: http://www.object-craft.com.au/projects/mssql/ Any feedback, positive or negative?

Re: namespaces module (a.k.a. bunch, struct, generic object, etc.) PEP

2005-02-12 Thread Nick Coghlan
Nick Coghlan wrote: Py class NS(namespaces.Namespace): ... x = prop ... Oops - cp error here. This was actually: Py class NS(namespaces.Namespace): ... x = prop ... __x__ = prop ... Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia

Re: check if object is number

2005-02-12 Thread Steven Bethard
John Lenton wrote: On Fri, Feb 11, 2005 at 01:17:55PM -0700, Steven Bethard wrote: George Sakkis wrote: Steven Bethard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is there a good way to determine if an object is a numeric type? In your example, what does your application consider to

Re: namespaces module (a.k.a. bunch, struct, generic object, etc.) PEP

2005-02-12 Thread Steven Bethard
Nick Coghlan wrote: Steven Bethard wrote: ns = Namespace(eggs=1) Namespace.update(ns, [('spam', 2)], ham=3) ns Namespace(eggs=1, ham=3, spam=2) Note that update should be used through the class, not through the instances, to avoid the confusion that might arise if an 'update'

Re: PHP session equivalent?

2005-02-12 Thread Walter Burleigh
Erik Johnson wrote: There are a lot of things about PHP I was not too keen on and hence why my company is primarily doing Python these days, but one thing I was quite impressed with was the ease with which it provided session functionality... Like you I think it is a big plus of PHP

Re: check if object is number

2005-02-12 Thread Steven Bethard
George Sakkis wrote: George Sakkis wrote: Steven Bethard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is there a good way to determine if an object is a numeric type? In your example, what does your application consider to be numeric? Well, here's the basic code: def f(max=None):

Re: check if object is number

2005-02-12 Thread Michael Hartl
Oops, my bad. The utilities file I use gets loaded automatically when I start my interpreter, so I mistook isnumber for a built-in function. A battle-tested isnumber function is defined in Peter Norvig's utils.py (http://aima.cs.berkeley.edu/python/utils.py): #def isnumber(x): #Is x a

Re: Concurrent Python

2005-02-12 Thread Do Re Mi chel La Si Do
Hi ! You can found few ideas here : http://candygram.sourceforge.net @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: check if object is number

2005-02-12 Thread George Sakkis
So what you're saying is that 3 = 3.0 should not be allowed, but 3 = SomeUserDefinedNumericClass(3) is ok, although your program knows nothing a priori about SomeUserDefinedNumericClass. The idea suggested before, try if x+1 fails or not does not get you far; any class that overrides

Re: namespaces module (a.k.a. bunch, struct, generic object, etc.) PEP

2005-02-12 Thread Nick Coghlan
rzed wrote: I would bet that subclassing is *still* going to be common, though, as each of us individually roll our own version to get that one vital feature the standard doesn't cover (for me, it's update with numerous other types) This is certainly what I expect to happen. It's the main

Re: sre is broken in SuSE 9.2

2005-02-12 Thread Serge Orlov
Fredrik Lundh wrote: Serge Orlov wrote: re.compile(ur'\w+', re.U).findall(u'\xb5\xba\xe4\u0430') [u'\xb5\xba\xe4\u0430'] I can't find the strict definition of isalpha, but I believe average C program shouldn't care about the current locale alphabet, so isalpha is a union of all supported

Re: sre is broken in SuSE 9.2

2005-02-12 Thread Serge Orlov
Fredrik Lundh wrote: Serge Orlov wrote: re.compile(ur'\w+', re.U).findall(u'\xb5\xba\xe4\u0430') [u'\xb5\xba\xe4\u0430'] I can't find the strict definition of isalpha, but I believe average C program shouldn't care about the current locale alphabet, so isalpha is a union of all supported

Returned mail: Data format error

2005-02-12 Thread Post Office
The original message was received at Sat, 12 Feb 2005 06:04:57 +0100 from [134.224.55.190] - The following addresses had permanent fatal errors - python-list@python.org *** ** A csatolmány Message.scr I-Worm.Mydoom.R virussal

Re: listerator clonage

2005-02-12 Thread M.E.Farmer
Cyril BAZIN wrote: Hello, I want to build a function which return values which appear two or more times in a list: So, I decided to write a little example which doesn't work: #l = [1, 7, 3, 4, 3, 2, 1] #i = iter(l) #for x in i: #j = iter(i) #for y in j: #if x == y: #

Re: sre is broken in SuSE 9.2

2005-02-12 Thread Fredrik Lundh
Serge Orlov wrote: The wide-character value for each member of the Portable Character Set will equal its value when used as the lone character in an integer character constant. Wide-character codes for other characters are locale- and *implementation-dependent* Emphasis is mine. the

Re: sre is broken in SuSE 9.2

2005-02-12 Thread Denis S. Otkidach
On Fri, 11 Feb 2005 18:49:53 +0100 Fredrik Lundh [EMAIL PROTECTED] wrote: re.compile(ur'\w+', re.U).findall(u'\xb5\xba\xe4\u0430') [u'\xb5\xba\xe4\u0430'] I can't find the strict definition of isalpha, but I believe average C program shouldn't care about the current locale alphabet, so

Re: listerator clonage

2005-02-12 Thread Alan McIntyre
Cyril, Here's some code that (I think) does what you want: l = [1, 7, 3, 4, 3, 2, 1] s, dups = set(), set() for x in i: if x in s: dups.add(x) s.add(x) print dups I'm sure there are more elegant ways to do it, but this seemed to be the most straightforward way I could think of.

Re: ANN: pyMinGW support for Python 2.3.5 (final) is available

2005-02-12 Thread Nick Craig-Wood
A.B., Khalid [EMAIL PROTECTED] wrote: This is to inform those interested in compiling Python in MinGW that an updated version of pyMinGW is now available. Ha anyone tried cross compiling python with mingw? At work we compile our software for lots of platforms (including windows) on a linux

Unittesting for web applications

2005-02-12 Thread Sandip Bhattacharya
Can someone suggest me some good resources for learning how to use unittests for web applications? Do we always have to cook up our own webpage scrapers to test the code? - Sandip -- Sandip Bhattacharya*Puroga Technologies * [EMAIL PROTECTED] Work: http://www.puroga.com *

Re: Concurrent Python

2005-02-12 Thread Michael Sparks
On Fri, 11 Feb 2005, Dominic Fox wrote: ... http://www.codepoetics.com/code/concurrent.py Comments and constructive criticism welcome. For an alternative approach (based on using generators forming a dataflow component system) you might find our project interesting - the core concurrency stuff

Re: Python in EDA

2005-02-12 Thread Michael Sparks
On 11 Feb 2005 [EMAIL PROTECTED] wrote: Hi, I am new to Python and coming from the EDA/VLSI Design background. I wanted to know if there are some active projects going on EDA modules written in Python. You may want to take a look at MyHDL APVM/Oroboro: *

Iterate through dictionary of file objects and file names

2005-02-12 Thread Julian Yap
Hi all, I'm trying to get some ideas on the best way to do this. In this particular coding snippet, I was thinking of creating a dictionary of file objects and file names. These would be optional files that I could open and parse. At the end, I would easily close off the files by iterating

Web interface GUI??

2005-02-12 Thread Luc
I am a newbye. I am looking for a multi-platform user interface solution (windows, linux). Untill now, I used wxPython which worked fine at the beginning (MDK9, Windows NT4). Nevertheless, I was very disapointed when I noticed that my applications did not work with recent linux distributions

Re: Web interface GUI??

2005-02-12 Thread Irmen de Jong
Luc wrote: So I am looking for another solution with a web interface that should work with linux and windows XP. I had a look to zope but was afraid with the complexity and debug difficulties. Are there some other solutions? Yes. A lot: http://www.python.org/moin/WebProgramming I know someone who

Re: ActivePython 2.3.5.236 and ActivePython 2.4.0.244 are available

2005-02-12 Thread mep
Got it. Thanks.I'm just curious.:) Trent Mick [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] mep wrote: ActivePython-2.4.0-243-win32-ix86.msi : 29M ActivePython-2.4.0-244-win32-ix86.msi : 18M What make so much difference of the size of them, which distinct monir version

Re: Unittesting for web applications

2005-02-12 Thread John Roth
I believe there are xUnit clones named Httpunit and Htmlunit, as well as a number of variants. See the huge list of xUnit clones on: http://www.xprogramming.com/ in the downloads section. I don't think any of them are Python based, though. You might also want to look at some of the Htmlunit

Re: Iterate through dictionary of file objects and file names

2005-02-12 Thread Brian Beck
Julian Yap wrote: In this particular coding snippet, I was thinking of creating a dictionary of file objects and file names. These would be optional files that I could open and parse. At the end, I would easily close off the files by iterating through the dictionary. Hi, File objects as keys

Re: PHP session equivalent?

2005-02-12 Thread Reinhold Birkenfeld
Walter Burleigh wrote: Erik Johnson wrote: There are a lot of things about PHP I was not too keen on and hence why my company is primarily doing Python these days, but one thing I was quite impressed with was the ease with which it provided session functionality... Like you I

Re: [EVALUATION] - E01: The Java Failure - May Python Helps?

2005-02-12 Thread Ilias Lazaridis
Ilias Lazaridis wrote: [...] My question is essentially: How many of those constructs are already supported by python (and the surrounding open-source-projects): http://lazaridis.com/case/stack/index.html [...] The Signal/Noise ratio of this thread was very disapointing to me. I've expected

Re: Commerical graphing packages?

2005-02-12 Thread John J. Lee
[EMAIL PROTECTED] writes: Check out GRACE. It's not specifically designed for Python, but I've been using with Python for a couple of years or more. I'm very happy with it, and it's free. It works both interactively and in batch mode. Do a google on GRACE. If you're generating lots of graphs

Re: Testing web applications

2005-02-12 Thread John J. Lee
Josef Meile [EMAIL PROTECTED] writes: I'm looking for frameworks to make testing web applications - i.e. parsing and filling out forms - easier. I found Puffin, which looks good but not very usable in the current state. I know that I once read about other nice frameworks, but could not

[PATCH] Re: frozenset() without arguments should return a singleton

2005-02-12 Thread Stefan Behnel
Terry Reedy schrieb: frozenset() called without arguments (or on empty sequences) should always return a singleton object. If we interpret 'should' as 'preferably by me', ok. It will take some programmer's time to add the special case check and run the test suite, and check in the changes.

Re: Alternative to raw_input ?

2005-02-12 Thread Michael Hoffman
Skip Montanaro wrote: How about modifying it to raw_input(Press ENTER to continue ) You want him to just capitalize ENTER in the current message? -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: Web interface GUI??

2005-02-12 Thread Luc
Irmen de Jong a écrit: Luc wrote: So I am looking for another solution with a web interface that should work with linux and windows XP. I had a look to zope but was afraid with the complexity and debug difficulties. Are there some other solutions? Yes. A lot:

Re: Commerical graphing packages?

2005-02-12 Thread Francis Gadenne
Erik Johnson wrote: I am wanting to generate dynamic graphs for our website and ... I am aware of ChartDirector (http://www.advsofteng.com/ ) which I have used ChartDirector extensively as an activeX (not from python though). We found the API to be well-though and clean. The tool is definitely

Docs. for logging module typo

2005-02-12 Thread Peter Mott
The documentation for SMTPHandler say The toaddrs should be a list of strings without domain names (That's what the mailhost is for). which does not seem to be correct. The toaddr should be a list of strings like '[EMAIL PROTECTED]'. Peter --

Re: Docs. for logging module typo

2005-02-12 Thread Fredrik Lundh
Peter Mott wrote: The documentation for SMTPHandler say The toaddrs should be a list of strings without domain names (That's what the mailhost is for). which does not seem to be correct. The toaddr should be a list of strings like '[EMAIL PROTECTED]'. please report bugs and other issues

Newbie needs help with canvas.create_image !

2005-02-12 Thread Antti Isomursu
Ok, this is my problem: With code below I get a red box with given width and height. When I use that create_image, nothing happens. I only see that same red box. Why is that? The loop.bmp is working fine when I use show() method. win = Toplevel() canvas = Canvas(win, width=100,

Re: a sequence question

2005-02-12 Thread David Isaac
Nick Coghlan [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] A bug report on Sourceforge would help in getting the problem fixed for the 2.5 docs Done. For the 'left-to-right' evaluation thing, that's technically an implementation artifact of the CPython implementation, since the

Re: Newbie needs help with canvas.create_image !

2005-02-12 Thread Fredrik Lundh
Antti Isomursu wrote: With code below I get a red box with given width and height. When I use that create_image, nothing happens. I only see that same red box. Why is that? The loop.bmp is working fine when I use show() method. win = Toplevel() canvas = Canvas(win,

Re: Unittesting for web applications

2005-02-12 Thread Grig Gheorghiu
There's another current thread on c.l.py talking about testing Web applications. Somenone suggested Jython in conjunction with HttpUnit, a combination that worked for me too -- but the name HttpUnit is misleading, since it does functional/black box testing and not unit testing. It beats scraping

Re: is there a safe marshaler?

2005-02-12 Thread Alan Kennedy
[Irmen de Jong] Interestingly enough, I just ran across Flatten: http://sourceforge.net/project/showfiles.php?group_id=82591package_id=91311 ...which aids in serializing/unserializing networked data securely, without having to fear execution of code or the like. Sounds promising! Well, I'm

Message could not be delivered

2005-02-12 Thread Mail Delivery Subsystem
The message could not be delivered *** ** A csatolmány message.zip I-Worm.Mydoom.R virussal fertõzött, ** a csatolmány törölve lett. *** --

Re: exception handling for a function returning several values

2005-02-12 Thread Antoon Pardon
On 2005-02-12, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: If a function that normally returns N values raises an exception, what should it return? Maybe it shouldn't return anything but instead of cathing the exception it should let the caller handle it. N values of None seems reasonable to

SCons build tool speed

2005-02-12 Thread ted
How does the speed of the Scons build tool compare with Ant? Right now with out Ant builds take around an hour. Hoping to speed that up. TIA, Ted -- http://mail.python.org/mailman/listinfo/python-list

Re: is there a safe marshaler?

2005-02-12 Thread Irmen de Jong
Alan Kennedy wrote: [Irmen de Jong] Interestingly enough, I just ran across Flatten: http://sourceforge.net/project/showfiles.php?group_id=82591package_id=91311 ...which aids in serializing/unserializing networked data securely, without having to fear execution of code or the like. Sounds

Re: Newbie needs help with canvas.create_image !

2005-02-12 Thread Arthur
On Sat, 12 Feb 2005 18:24:11 +0100, Fredrik Lundh [EMAIL PROTECTED] wrote: Antti Isomursu wrote: With code below I get a red box with given width and height. When I use that create_image, nothing happens. I only see that same red box. Why is that? The loop.bmp is working fine when I use

Re: ANN: pyMinGW support for Python 2.3.5 (final) is available

2005-02-12 Thread Simon John
[snip] Ha anyone tried cross compiling python with mingw? At work we compile our software for lots of platforms (including windows) on a linux build host. The windows builds are done with a mingw cross compiler. It would be interesting if we could do this with python + extensions also.

Re: Is email package thread safe? (fwd)

2005-02-12 Thread Roman Suzi
On Thu, 10 Feb 2005, Antoon Pardon wrote: Op 2005-02-09, Roman Suzi schreef [EMAIL PROTECTED]: On Wed, 9 Feb 2005, Antoon Pardon wrote: Op 2005-02-09, Roman Suzi schreef [EMAIL PROTECTED]: Just to be sure, is email package of Python 2.3 thread-safe or not (to use, for example, in python-milter?)

Re: ANN: pyMinGW support for Python 2.3.5 (final) is available

2005-02-12 Thread Irmen de Jong
Simon John wrote: Maybe I'll fork out the 100usd for Visual Studio .NET 2003 after all $100? Where? Last time I looked it was closer to $800. --Irmen -- http://mail.python.org/mailman/listinfo/python-list

Re: Python UPS / FedEx Shipping Module

2005-02-12 Thread Tom Willis
Are the modules just accessing the published apis for their webservices? I'm just wondering because I used to work for a logistics mgmt company that paid money to be a strategic partner with FedEx/UPS/Airborn etc so that they could information on how to return rates/print labels/generate

Re: Hack with os.walk()

2005-02-12 Thread Michael Spencer
Frans Englich wrote: Hello, Have a look at this recursive function: def walkDirectory( directory, element ): element = element.newChild( None, directory, None ) # automatically appends to parent element.setProp( name, os.path.basename(directory)) for root, dirs, files in os.walk(

Re: Commerical graphing packages?

2005-02-12 Thread 18k11tm001
If you're generating lots of graphs programatically, eg. on a web server, grace is not what you want. Yes, it has a command language, but IIRC it depends on X11, and windows even pop up as it runs in batch mode. Bleh. I don't understand what you're talking about. I've been using GRACE in batch

Re: Alternative to raw_input ?

2005-02-12 Thread BOOGIEMAN
On Fri, 11 Feb 2005 21:38:47 -0500, Peter Hansen wrote: print prompt while msvcrt.kbhit(): msvcrt.getch() msvcrt.getch() Thanks, it works but without line print prompt and also I'm not sure if I should put this function : def cekaj(): while msvcrt.kbhit(): msvcrt.getch()

tk resource file for geometry?

2005-02-12 Thread Gabriel B.
i'm using almost every widget property from my pyTk programs in the form of resources, like: self.tk.option_add ( *InputClass*background, White ) In the widget creation i have only the Class and the Command attribute, but i'm having to add some tk options to the geometry method, in the case,

For American numbers

2005-02-12 Thread Scott David Daniels
Kind of fun exercise (no good for British English). def units(value, units='bytes'): magnitude = abs(value) if magnitude = 1000: for prefix in ['kilo mega giga tera peta ' 'exa zetta yotta').split(): magnitude /= 1000.

Re: multi threading in multi processor (computer)

2005-02-12 Thread Paul Rubin
John Lenton [EMAIL PROTECTED] writes: and buying more, cheap computers gives you more processing power than buying less, multi-processor computers. The day is coming when even cheap computers have multiple cpu's. See hyperthreading and the coming multi-core P4's, and the finally announced Cell

  1   2   >