Re: Rats! vararg assignments don't work

2007-05-29 Thread Gary Herron
samwyse wrote: > I'm a relative newbie to Python, so please bear with me. After seeing > how varargs work in parameter lists, like this: > def func(x, *arglist): > and this: > x = func(1, *moreargs) > I thought that I'd try this: > first, *rest = arglist > Needless to say, it didn'

Re: Professional Grant Proposal Writing Workshop (July 2007: University of Montana, Missoula)

2007-05-29 Thread Steve Holden
Anthony Jones wrote: [...] > > At its foundation, this course will address the basics of foundation, > corporation, and government grant research. However, this course will > teach a strategic funding research approach that encourages students to > see research not as something they do before t

Re: RDFXML Parser For "qualified Dublin Core" Database File

2007-05-29 Thread Steve Holden
Brandon McGinty wrote: > Hi All, > > My goal is to be able to read the www.gutenberg.org > rdf catalog, parse it into a python > structure, and pull out data for each record. > > The catalog is a Dublin core RDF/XML catalog, divided into sections for > each book and

Re: Key Listeners

2007-05-29 Thread Gary Herron
Mike wrote: > Are there key listeners for Python? Either built in or third party? > > (As always on forums like this, you're most likely to get answers if you define your terms. A little Goggling informs me that in Java a key listener is a Java term for a component that generates an event when

Re: Key Listeners

2007-05-29 Thread kaens
On 29 May 2007 19:14:33 -0700, Mike <[EMAIL PROTECTED]> wrote: > Are there key listeners for Python? Either built in or third party? > > -- > http://mail.python.org/mailman/listinfo/python-list > I'm pretty sure pygame's got some, don't know about built-ins. -- http://mail.python.org/mailman/list

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-29 Thread Tim Roberts
Frank Swarbrick <[EMAIL PROTECTED]> wrote: > >Then you'd really love COBOL! > >:-) > >Frank >COBOL programmer for 10+ years Hey, did you hear about the object-oriented version of COBOL? They call it "ADD ONE TO COBOL". -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://m

Re: "is" and ==

2007-05-29 Thread BlueJ774
On May 30, 12:57 am, Erik Max Francis <[EMAIL PROTECTED]> wrote: > BlueJ774 wrote: > > Can someone please explain to me the difference between the "is" > > keyword and the == boolean operator. I can't figure it out on my own > > and I can't find any documentation on it. > > > I can't understand wh

Re: "is" and ==

2007-05-29 Thread Erik Max Francis
BlueJ774 wrote: > Can someone please explain to me the difference between the "is" > keyword and the == boolean operator. I can't figure it out on my own > and I can't find any documentation on it. > > I can't understand why this works: > > if text is None: > > and why this always returns

"is" and ==

2007-05-29 Thread BlueJ774
Can someone please explain to me the difference between the "is" keyword and the == boolean operator. I can't figure it out on my own and I can't find any documentation on it. I can't understand why this works: if text is None: and why this always returns false: if message is 'PING':

Re: need advice on building core code for python and PHP

2007-05-29 Thread Graham Dumpleton
On May 30, 11:24 am, digimotif <[EMAIL PROTECTED]> wrote: > On May 24, 5:01 pm, Graham Dumpleton <[EMAIL PROTECTED]> > wrote: > > > > > On May 25, 5:24 am, aspineux <[EMAIL PROTECTED]> wrote: > > > > On 24 mai, 19:33, Szabolcs Nagy <[EMAIL PROTECTED]> wrote: > > > > > > Is there a way I could code

Re: How to print this character u'\u20ac' to DOS terminal

2007-05-29 Thread Martin v. Lo
人言落日是天涯,望极天涯不见家 schrieb: > Who could explain the follow issue ? print u'\u0394' > Δ print u'\u20ac' > Traceback (most recent call last): > File "", line 1, in > UnicodeEncodeError: 'gbk' codec can't encode character u'\u20ac' in > position 0: > illegal multibyte sequence > > My termi

Professional Grant Proposal Writing Workshop (July 2007: University of Montana, Missoula)

2007-05-29 Thread Anthony Jones
The Grant Institute's Grants 101: Professional Grant Proposal Writing Workshop will be held at the University of Montana, Missoula , July 16 - 18, 2007. Interested development professionals, researchers, faculty, and graduate students should register as soon as possible, as demand means that sea

ANN: CaltrainPy 0.1

2007-05-29 Thread Heikki Toivonen
CaltrainPy is a Caltrain (http://caltrain.com/) schedule program written in Python. It uses Tkinter for GUI. Download link and screenshot here: http://www.heikkitoivonen.net/blog/?p=11 The reason I wrote CaltrainPy was because I recently switched from a Palm OS device to a Windows Mobile device,

How to print this character u'\u20ac' to DOS terminal

2007-05-29 Thread 人言落日是天涯,望极天涯不见家
Who could explain the follow issue ? >>> print u'Δ' Δ >>> print u'�' Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'gbk' codec can't encode character u'\x80' in position 0: il legal multibyte sequence >>> or I just put the unicode number >>> print u'\u0394' Δ >>> p

RDFXML Parser For "qualified Dublin Core" Database File

2007-05-29 Thread Brandon McGinty
Hi All, My goal is to be able to read the www.gutenberg.org rdf catalog, parse it into a python structure, and pull out data for each record. The catalog is a Dublin core RDF/XML catalog, divided into sections for each book and details for that book. I have done a ve

Re: itertools.groupby (gauntlet thrown down)

2007-05-29 Thread Steve Howell
> Raymond Hettinger <[EMAIL PROTECTED]> writes: > > The gauntlet has been thrown down. Any creative > thinkers > > up to the challenge? Give me cool recipes. > Twin primes? (Sorry, no code, but there's a good Python example somewhere that returns an iterator that keeps doing the sieve, feed it

Re: itertools.groupby

2007-05-29 Thread Steve Howell
On May 29, 2:34 am, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > The gauntlet has been thrown down. Any creative > thinkers > up to the challenge? Give me cool recipes. > I don't make any claims to coolness, but I can say that I myself would have written the code below with significantly more

Re: Rats! vararg assignments don't work

2007-05-29 Thread George Sakkis
On May 29, 11:33 pm, Matimus <[EMAIL PROTECTED]> wrote: > Your attemtp: > > [code] > first, rest = arglist[0], arglist[1:] > [/code] > > Is the most obvious and probably the most accepted way to do what you > are looking for. As for adding the fucntionality you first suggested, > it isn't likely t

Re: Rats! vararg assignments don't work

2007-05-29 Thread Matimus
Your attemtp: [code] first, rest = arglist[0], arglist[1:] [/code] Is the most obvious and probably the most accepted way to do what you are looking for. As for adding the fucntionality you first suggested, it isn't likely to be implemented. The first step would be to write a PEP though. Remember

Re: itertools.groupby

2007-05-29 Thread Paul Rubin
Raymond Hettinger <[EMAIL PROTECTED]> writes: > The gauntlet has been thrown down. Any creative thinkers > up to the challenge? Give me cool recipes. Here is my version (with different semantics) of the grouper recipe in the existing recipe section: snd = operator.itemgetter(1) # I use thi

Re: itertools.groupby

2007-05-29 Thread George Sakkis
On May 29, 2:34 am, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > If the posters on this thread have developed an interest > in the subject, I would find it useful to hear their > ideas on new and creative ways to use groupby(). The > analogy to UNIX's uniq filter was found only after the > desi

Rats! vararg assignments don't work

2007-05-29 Thread samwyse
I'm a relative newbie to Python, so please bear with me. After seeing how varargs work in parameter lists, like this: def func(x, *arglist): and this: x = func(1, *moreargs) I thought that I'd try this: first, *rest = arglist Needless to say, it didn't work. That leaves me with tw

tag py-compile errors,[develop with Eclipse and pyAnt]

2007-05-29 Thread [EMAIL PROTECTED]
I configured Eclipse according to the paper http://www.ibm.com/developerworks/library/os-ecant/index.html. But, when I build the ant file,it failed with the following message: Could not create task or type of type: py-compile. I hava added pyAntTasks.jar to ${eclipse}/plugins/ org.apache.ant_versi

Key Listeners

2007-05-29 Thread Mike
Are there key listeners for Python? Either built in or third party? -- http://mail.python.org/mailman/listinfo/python-list

Re: need advice on building core code for python and PHP

2007-05-29 Thread digimotif
On May 24, 5:01 pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On May 25, 5:24 am, aspineux <[EMAIL PROTECTED]> wrote: > > > > > On 24 mai, 19:33, Szabolcs Nagy <[EMAIL PROTECTED]> wrote: > > > > > Is there a way I could code the base (core) code in Python and have > > > > PHP call it? I've rea

Re: Speex bindings for python 2.5

2007-05-29 Thread momobear
> I forgot to give the url :http://www.freenet.org.nz/python/pySpeex/ I Couldn't Open the website. -- http://mail.python.org/mailman/listinfo/python-list

Re: updates in sqlite3 do not work

2007-05-29 Thread John Machin
On May 30, 8:43 am, "Stefan Sonnenberg-Carstens" <[EMAIL PROTECTED]> wrote: > Did you try a commit() ? > > SQLite3 works in autocommit mode by default, E IF it worked in auto-commit mode, then the OP wouldn't need to use Connection.commit(-:) The underlying SLQite3 may work in auto-c

Re: SMTPAuthenticationError

2007-05-29 Thread Steve Howell
--- Ramashish Baranwal <[EMAIL PROTECTED]> wrote: > > Are you sure that your SMTP server uses this type > of authentication? > > Some SMTP servers use POP3 followed by SMTP to > authenticate instead. > > > > use telnet to verify, this link might help. > > > > > http://www.computerperformance.co.

Re: Why isn't this query working in python?

2007-05-29 Thread Steve Holden
erikcw wrote: > On May 28, 2:47 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: >> En Mon, 28 May 2007 14:53:57 -0300, Dennis Lee Bieber >> <[EMAIL PROTECTED]> escribió: >> >>> On Sun, 27 May 2007 20:35:28 -0400, Carsten Haese <[EMAIL PROTECTED]> >>> declaimed the following in comp.lang.python

Re: updates in sqlite3 do not work

2007-05-29 Thread kaens
On 5/29/07, Stefan Sonnenberg-Carstens <[EMAIL PROTECTED]> wrote: > Did you try a commit() ? > > SQLite3 works in autocommit mode by default, > so it would help to see your code. > > > On Mi, 30.05.2007, 00:30, Chris Fonnesbeck wrote: > > I have a script set up to perform UPDATE commands on an sqli

Re: 0 == False but [] != False?

2007-05-29 Thread Erik Max Francis
Donn Cave wrote: > "Not that it is of no historical interest" may have been too > hard to follow, my apologies. Yeah, my reading comprehension wasn't up to snuff that night. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y

Re: 0 == False but [] != False?

2007-05-29 Thread Steven D'Aprano
On Tue, 29 May 2007 11:36:07 -0700, Erik Max Francis wrote: > Donn Cave wrote: > >> Not that it is of no historical interest to review all these >> reasonable arguments, but allow me to restore the context quote >> from my follow-up: > > If the counterpoints are of no historical interest, then t

Re: updates in sqlite3 do not work

2007-05-29 Thread Stefan Sonnenberg-Carstens
Did you try a commit() ? SQLite3 works in autocommit mode by default, so it would help to see your code. On Mi, 30.05.2007, 00:30, Chris Fonnesbeck wrote: > I have a script set up to perform UPDATE commands on an sqlite database > using the sqlite3 module. Everything appears to run fine (there a

Re: updates in sqlite3 do not work

2007-05-29 Thread Paul McNett
Chris Fonnesbeck wrote: > I have a script set up to perform UPDATE commands on an sqlite database > using the sqlite3 module. Everything appears to run fine (there are no > error messages), except that none of the UPDATE commands appear to have > actually updated the table. If I run each command

updates in sqlite3 do not work

2007-05-29 Thread Chris Fonnesbeck
I have a script set up to perform UPDATE commands on an sqlite database using the sqlite3 module. Everything appears to run fine (there are no error messages), except that none of the UPDATE commands appear to have actually updated the table. If I run each command on its own in a sqlite session, t

setting environment from shell file in python

2007-05-29 Thread George Trojan
Is there a utility to parse a Bourne shell environment file, such as .bashrc, and set the environmental variables from within a Python script? What I mean is an equivalent to shell dot command. I don't think it would be too difficult to write a shell parser, but if such thing already exists...

Re: Why isn't this query working in python?

2007-05-29 Thread erikcw
On May 28, 2:47 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Mon, 28 May 2007 14:53:57 -0300, Dennis Lee Bieber > <[EMAIL PROTECTED]> escribió: > > > On Sun, 27 May 2007 20:35:28 -0400, Carsten Haese <[EMAIL PROTECTED]> > > declaimed the following in comp.lang.python: > > >> On Sun, 2007

Re: itertools.groupby

2007-05-29 Thread Steve Howell
--- Carsten Haese <[EMAIL PROTECTED]> wrote: > As an aside, while groupby() will indeed often be > used in conjunction > with sorted(), there is a significant class of use > cases where that's > not the case: I use groupby to produce grouped > reports from the results > of an SQL query. In such ca

Re: Periodic tasks.

2007-05-29 Thread Steve Howell
--- vasudevram <[EMAIL PROTECTED]> wrote: > On May 29, 4:39 pm, Steve Holden > <[EMAIL PROTECTED]> wrote: > > > Alternatively, the user could make use of the > already-existing "sched" > > module from the standard library. With a little > threading that would do > > the job fine. > > Yes. Also,

Open Source Developers' Conference 2007 - Brisbane - Call for Papers

2007-05-29 Thread Richard Jones
Call for Papers --- Open Source Developers' Conference 2007 - Brisbane, Australia "Success in Development & Business" OSDC is a grass-roots conference providing Open Source developers with an opportunity to meet, share, learn, and of course show-off. OSDC focuses on Open Source develo

Malformed big5 reading bug

2007-05-29 Thread tsuraan
Python enters some sort of infinite loop when attempting to read data from a malformed file that is big5 encoded (using the codecs library). This behaviour can be observed under Linux and FreeBSD, using Python 2.4 and 2.5. A really simple example illustrating the bug follows: Python 2.4.4 (#1, M

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-29 Thread [EMAIL PROTECTED]
On May 29, 3:22 pm, "Eric S. Johansson" <[EMAIL PROTECTED]> wrote: > Warren Stringer wrote: > > Hi Eric, > > > You make a compelling argument for underscores. I sometimes help a visually > > impaired friend with setting up his computers. > > > I'm wondering about the aural output to you second exam

Re: How to set a class inheritance at instance creation?

2007-05-29 Thread glomde
On 29 Maj, 22:45, Steve Holden <[EMAIL PROTECTED]> wrote: > glomde wrote: > > Hi I wonder if you can set what subclass a class should > > have at instance creation. > > > The problem is that I have something like: > > > class CoreLang(): > > def AssignVar(self, var, value): > > pass >

Re: how to print the GREEK CAPITAL LETTER delta under utf-8 encoding

2007-05-29 Thread Ragnar Ouchterlony
tis 2007-05-29 klockan 16:08 -0300 skrev Gabriel Genellina: > sys.stdout = filewrapper(sys.stdout, 'utf-8') > print u"åäö \N{GREEK CAPITAL LETTER DELTA}" > > > > Useful if you don't want to append .encode() to everything you print out > > that potentially can contain non-ascii letters. >

Re: embeded python progam into visual C++ application crash

2007-05-29 Thread Gabriel Genellina
En Tue, 29 May 2007 15:01:07 -0300, fabien.lyon <[EMAIL PROTECTED]> escribió: > hello, > The C++ application uses a python module which wraps commands set for CVS > management: > checkout, checkin and tag. > We used python2.5.1 and Visual C++ 6.0 2.5.1 is compiled with Visual Studio 2005 - I ho

Re: How to set a class inheritance at instance creation?

2007-05-29 Thread Steve Holden
glomde wrote: > Hi I wonder if you can set what subclass a class should > have at instance creation. > > The problem is that I have something like: > > class CoreLang(): > def AssignVar(self, var, value): > pass > > class Lang1(CoreLang): > def AssignVar(self, var, value): >

Re: 0 == False but [] != False?

2007-05-29 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Erik Max Francis <[EMAIL PROTECTED]> wrote: > Donn Cave wrote: > > > Not that it is of no historical interest to review all these > > reasonable arguments, but allow me to restore the context quote > > from my follow-up: > > If the counterpoints are of no histori

Re: SMTPAuthenticationError

2007-05-29 Thread Ramashish Baranwal
> > > I am trying to send a mail using smtplib. My server requires me to > > authenticate, for this I'm using SMTP.login function. However it > > fails- > > server = smtplib.SMTP(host='mail.domain', port=25) > server.login('username', 'password') > > Traceback (most recent call last): > >

Re: Speex bindings for python 2.5

2007-05-29 Thread JarodEvans
On 29 mai, 21:28, [EMAIL PROTECTED] wrote: > Hello, > > For a personal project, I need to use speex with Python on Win32, but > pyspeex is compiled for python 2.2. > > Could somebody try to compile pyspeex for python 2.5 please ? > > Thanx a lot for your help. I forgot to give the url : http://www

Speex bindings for python 2.5

2007-05-29 Thread JarodEvans
Hello, For a personal project, I need to use speex with Python on Win32, but pyspeex is compiled for python 2.2. Could somebody try to compile pyspeex for python 2.5 please ? Thanx a lot for your help. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-29 Thread Eric S. Johansson
Warren Stringer wrote: > Hi Eric, > > You make a compelling argument for underscores. I sometimes help a visually > impaired friend with setting up his computers. > > I'm wondering about the aural output to you second example: > > link.set_parse_action(emit_link_HTML) > > Does it sound like th

Re: Connection acception with confirmation

2007-05-29 Thread Rob Williscroft
no`name` wrote in news:[EMAIL PROTECTED] in comp.lang.python: > maybe someone have some ideas how to block first stdin in main > function and get stdin from the thread when here is a new connection? > No, but you could instead use a Queue: http://docs.python.org/lib/module-Queue.html

Re: how to print the GREEK CAPITAL LETTER delta under utf-8 encoding

2007-05-29 Thread Gabriel Genellina
En Tue, 29 May 2007 15:16:52 -0300, Ragnar Ouchterlony <[EMAIL PROTECTED]> escribió: > If I for some reason can't open the object myself or needs encoding on > other file-like objects, I think the following wrapper function is of > use (it essentially does what codecs.open() does but takes a fil

Re: Storing tracebacks

2007-05-29 Thread Gabriel Genellina
En Tue, 29 May 2007 15:13:33 -0300, George Sakkis <[EMAIL PROTECTED]> escribió: > On May 29, 1:21 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: >> A traceback contains a linked list of frames, each with its own globals >> and locals and lot of context info. >> I'm not sure that moving a t

Re: wxpython demo error on debian etch

2007-05-29 Thread BartlebyScrivener
On May 29, 1:09 pm, [EMAIL PROTECTED] wrote: > The newer versions of wxPython won't make your Debian crash or > anything. Thanks, mike, i'll try it. rick -- http://mail.python.org/mailman/listinfo/python-list

Re: python unix install, sqlite3

2007-05-29 Thread Simon
On May 29, 7:05 am, vasudevram <[EMAIL PROTECTED]> wrote: > On May 29, 5:52 pm, Simon <[EMAIL PROTECTED]> wrote: > > > > > > > I installed the source code on unix for python 2.5.1. The install went > > mainly okay, except for some failures regarding: > > _ssl, _hashlib, _curses, _curses_panel. > >

Re: 0 == False but [] != False?

2007-05-29 Thread Erik Max Francis
Donn Cave wrote: > Not that it is of no historical interest to review all these > reasonable arguments, but allow me to restore the context quote > from my follow-up: If the counterpoints are of no historical interest, then the original point must be of no historical interest either, since it wa

Re: How to set a class inheritance at instance creation?

2007-05-29 Thread Stargaming
glomde schrieb: > Hi I wonder if you can set what subclass a class should > have at instance creation. > > The problem is that I have something like: > > class CoreLang(): > def AssignVar(self, var, value): > pass > > class Lang1(CoreLang): > def AssignVar(self, var, value): >

Connection acception with confirmation

2007-05-29 Thread no`name`
Hi, i'm new in Python and i'm trying to write some server which can confirm connection from client. Here is a part of code: import sys import threading from socket import * class TelGUI(threading.Thread): def __init__(self): threading.Thread.__init__(self) def ru

Re: how to print the GREEK CAPITAL LETTER delta under utf-8 encoding

2007-05-29 Thread Ragnar Ouchterlony
tis 2007-05-29 klockan 09:05 +0200 skrev "Martin v. Lo"wis": > Yes, when writing to a file, you need to define an encoding, e.g. > > self.file.write(data.encode("utf-8")) > > You can use codecs.open() instead of open(), > so that you can just use self.file.write(data) If I for some reason can't

Re: 0 == False but [] != False?

2007-05-29 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Erik Max Francis <[EMAIL PROTECTED]> wrote: > Donn Cave wrote: > > > Anyone who finds this surprising, might enjoy reading this > > article from the time several years ago when the feature > > was being considered. When you have some time - it's long, > > but int

Re: Tkinter Listbox - Different Text colors in one listbox

2007-05-29 Thread kyosohma
On May 29, 12:02 pm, [EMAIL PROTECTED] wrote: > Hi, > Is it possible to have different items in a listbox in different > colors? Or is it just one color for all items in a listbox? > Thanks > Rahul Looks like it has to be the same color and font: http://www.pythonware.com/library/tkinter/introduct

Re: Storing tracebacks

2007-05-29 Thread George Sakkis
On May 29, 1:21 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 29 May 2007 13:51:09 -0300, George Sakkis > <[EMAIL PROTECTED]> escribió: > > > The traceback module is handy if you want a text representation of the > > traceback, not the actual traceback. The reason I want to store the

Re: wxpython demo error on debian etch

2007-05-29 Thread kyosohma
On May 29, 12:33 pm, BartlebyScrivener <[EMAIL PROTECTED]> wrote: > On May 29, 8:51 am, [EMAIL PROTECTED] wrote: > > > The wxPython > > website details how to get the latest version of wxPython (2.8.4) > > I'm fairly new to Linux, so I probably shouldn't mess with my stable > Etch. > > I'll make do

embeded python progam into visual C++ application crash

2007-05-29 Thread fabien.lyon
hello, The C++ application uses a python module which wraps commands set for CVS management: checkout, checkin and tag. We used python2.5.1 and Visual C++ 6.0 The problem we get is: After a good import and definition of python functions we have a random unhandled exception (from python25.dll) when

Re: multiline regular expression (replace)

2007-05-29 Thread Holger Berger
Hi, yes: import re a=""" I Am Multiline but short anyhow""" b="(I[\s\S]*line)" print re.search(b, a,re.MULTILINE).group(1) gives I Am Multiline Be aware that . matches NO newlines!!! May be this caused your problems? regards Holger Zdenek Maxa wrote: > [EMAIL PROTECTED] wrote:

Re: How to set a class inheritance at instance creation?

2007-05-29 Thread Ramashish Baranwal
On May 29, 8:52 pm, glomde <[EMAIL PROTECTED]> wrote: > Hi I wonder if you can set what subclass a class should > have at instance creation. > > The problem is that I have something like: > > class CoreLang(): > def AssignVar(self, var, value): > pass > > class Lang1(CoreLang): >

Re: How to set a class inheritance at instance creation?

2007-05-29 Thread glomde
On 29 Maj, 19:20, Ramashish Baranwal <[EMAIL PROTECTED]> wrote: > On May 29, 8:52 pm, glomde <[EMAIL PROTECTED]> wrote: > > > > > Hi I wonder if you can set what subclass a class should > > have at instance creation. > > > The problem is that I have something like: > > > class CoreLang(): > > d

Re: How to set a class inheritance at instance creation?

2007-05-29 Thread glomde
On 29 Maj, 19:27, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Why not just have Lang1 and Lang2 inherit from WriteStruct as well? This wont work I think since if add antoher Class: class WriteStruct(): def func1(self); print "Hello2" def Generate(self): self.func1() class

Re: wxpython demo error on debian etch

2007-05-29 Thread BartlebyScrivener
On May 29, 8:51 am, [EMAIL PROTECTED] wrote: > The wxPython > website details how to get the latest version of wxPython (2.8.4) I'm fairly new to Linux, so I probably shouldn't mess with my stable Etch. I'll make do with this version of wxPython or go back to puzzling over Tkinter. Thanks, ric

Re: how to print the GREEK CAPITAL LETTER delta under utf-8 encoding

2007-05-29 Thread Gabriel Genellina
En Tue, 29 May 2007 04:24:15 -0300, 人言落日是天涯,望极天涯不见家 <[EMAIL PROTECTED]> escribió: > On 5月29日, 下午3时05分, "Martin v. Lo"wis" <[EMAIL PROTECTED]> wrote: >> > yes, it could print to the terminal(cmd.exe), but when I write these >> > string to file. I got the follow error: >> >> > File "E:\Tools\fi

Re: How to set a class inheritance at instance creation?

2007-05-29 Thread [EMAIL PROTECTED]
Why not just have Lang1 and Lang2 inherit from WriteStruct as well? On May 29, 8:52 am, glomde <[EMAIL PROTECTED]> wrote: > Hi I wonder if you can set what subclass a class should > have at instance creation. > > The problem is that I have something like: > > class CoreLang(): > def AssignVar(

Re: How to set a class inheritance at instance creation?

2007-05-29 Thread Ramashish Baranwal
On May 29, 8:52 pm, glomde <[EMAIL PROTECTED]> wrote: > Hi I wonder if you can set what subclass a class should > have at instance creation. > > The problem is that I have something like: > > class CoreLang(): > def AssignVar(self, var, value): > pass > > class Lang1(CoreLang): >

Re: Storing tracebacks

2007-05-29 Thread Gabriel Genellina
En Tue, 29 May 2007 13:51:09 -0300, George Sakkis <[EMAIL PROTECTED]> escribió: > The traceback module is handy if you want a text representation of the > traceback, not the actual traceback. The reason I want to store the > actual traceback is to make the exception transparent to the user, > i.

Re: SMTPAuthenticationError

2007-05-29 Thread Larry Bates
Ramashish Baranwal wrote: > Hi, > > I am trying to send a mail using smtplib. My server requires me to > authenticate, for this I'm using SMTP.login function. However it > fails- > server = smtplib.SMTP(host='mail.domain', port=25) server.login('username', 'password') > Traceback (most

Tkinter Listbox - Different Text colors in one listbox

2007-05-29 Thread rahulnag22
Hi, Is it possible to have different items in a listbox in different colors? Or is it just one color for all items in a listbox? Thanks Rahul -- http://mail.python.org/mailman/listinfo/python-list

SMTPAuthenticationError

2007-05-29 Thread Ramashish Baranwal
Hi, I am trying to send a mail using smtplib. My server requires me to authenticate, for this I'm using SMTP.login function. However it fails- >>> server = smtplib.SMTP(host='mail.domain', port=25) >>> server.login('username', 'password') Traceback (most recent call last): File "", line 1, in ?

Re: Storing tracebacks

2007-05-29 Thread George Sakkis
On May 29, 9:46 am, [EMAIL PROTECTED] wrote: > On May 28, 10:46 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > > > > > I'm reading the docs on sys.exc_info() but I can't tell for sure > > whether I'm using it safely to get a snapshot of an exception and > > reraise it later. The use case is a class

Re: Scope - import and globals

2007-05-29 Thread Troels Thomsen
"HMS Surprise" <[EMAIL PROTECTED]> skrev i en meddelelse news:[EMAIL PROTECTED] > > In the file snippet below the value for the global hostName is > determined at runtime. Functions imported from the parent baseClass > file such as logon also need access to this variable but cannot see it > the

Scope - import and globals

2007-05-29 Thread HMS Surprise
In the file snippet below the value for the global hostName is determined at runtime. Functions imported from the parent baseClass file such as logon also need access to this variable but cannot see it the with the implementation I have attempted here. Also, functions in this file and in the imp

Re: Unicode to HTML entities

2007-05-29 Thread Clodoaldo
On May 29, 12:57 pm, "Richard Brodie" <[EMAIL PROTECTED]> wrote: > "Clodoaldo" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > >I was looking for a function to transform a unicode string into > >htmlentities. > >>> u'São Paulo'.encode('ascii', 'xmlcharrefreplace') > > 'São Paulo

Re: Unicode to HTML entities

2007-05-29 Thread Richard Brodie
"Clodoaldo" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I was looking for a function to transform a unicode string into >htmlentities. >>> u'São Paulo'.encode('ascii', 'xmlcharrefreplace') 'São Paulo' -- http://mail.python.org/mailman/listinfo/python-list

How to set a class inheritance at instance creation?

2007-05-29 Thread glomde
Hi I wonder if you can set what subclass a class should have at instance creation. The problem is that I have something like: class CoreLang(): def AssignVar(self, var, value): pass class Lang1(CoreLang): def AssignVar(self, var, value): return var, "=", value class

Unicode to HTML entities

2007-05-29 Thread Clodoaldo
I was looking for a function to transform a unicode string into htmlentities. Not only the usual html escaping thing but all characters. As I didn't find I wrote my own: # -*- coding: utf-8 -*- from htmlentitydefs import codepoint2name def unicode2htmlentities(u): htmlentities = list() f

RE: Using python for a CAD program

2007-05-29 Thread George, Harry G
I haven't followed up. When I last looked, I found the problem space is too large for one person (or project) to do it all. So the job is to glue together lots of good OSS tools -- which is a very pythonic task. The absolute requirement for Knowledge-Based-Engineering is an API which allows a sc

RE: Is PEP-8 a Code or More of a Guideline?

2007-05-29 Thread Warren Stringer
Hi Eric, You make a compelling argument for underscores. I sometimes help a visually impaired friend with setting up his computers. I'm wondering about the aural output to you second example: link.set_parse_action(emit_link_HTML) Does it sound like this: link dot set under parse under action

Re: Seeking author of script which generated HTML pages from pictures of them

2007-05-29 Thread metaperl
I found him! http://programming.reddit.com/info/k9dx/comments -- http://mail.python.org/mailman/listinfo/python-list

ANN: eGenix mxODBC 3.0 Developer Licenses (mxODBC Database Interface)

2007-05-29 Thread eGenix Team: M.-A. Lemburg
eGenix.com mxODBC 3.0 Developer Licenses Available eGenix is pleased to announce the immediate availability of developer licenses for our P

Re: [B,IX] = sort(A,...) - Order for sort()-function

2007-05-29 Thread Maric Michaud
Orlando Döhring a écrit : > ... > A = [ 3 7 5 > 0 4 2 ]; > > # in Python: A = [[3,7,5],[0,4,2]] > > [B,IX] = sort(A,2) > > # sort by rows > > B = > 3 5 7 > 0 2 4 > > IX = > 1 3 2 > 1 3 2 > > # first line: 3 was formerly in the fi

[B,IX] = sort(A,...) - Order for sort()-function

2007-05-29 Thread Orlando Döhring
Dear community, I want to use the sort function to sort a (nested) list. General information can be found below. http://www.python.org/doc/2.4.2/lib/typesseq-mutable.html http://wiki.python.org/moin/HowTo/Sorting http://www.python.org/doc/2.4.4/whatsnew/node12.html I want to solve the follow

RSA SecurID token authentication?

2007-05-29 Thread Chris Shenton
Anyone doing python application authentication using RSA SecurID tokens? We have a Pylons app that needs this. I've written code against RSA's API and found the docs terrible and the libraries painful to use. RSA has a RADIUS server fronting their server so I expect I could use that instead,

Re: Resize image NO PIL!!

2007-05-29 Thread Daniel Nogradi
> I have created an image hosting site and when a user uploads an image, > I want a service to run on the server to create a few thumbnails while > the user does other things. > > My stupid host (pair.com) doesn't have PIL installed and I'm too much > of a stupid newbie to figure out how to get it

ANNOUNCE: SCons 0.97 has been released

2007-05-29 Thread Steven Knight
SCons is a software construction tool (build tool, or make tool) written in Python. It is based on the design which won the Software Carpentry build tool competition in August 2000. Version 0.97 of SCons has been released and is available for download from the SCons web site: http://www

[B,IX] = sort(A,...) - Order for sort()-function

2007-05-29 Thread Orlando Döhring
Dear community, I want to use the sort function to sort a (nested) list. General information can be found below. http://www.python.org/doc/2.4.2/lib/typesseq-mutable.html http://wiki.python.org/moin/HowTo/Sorting http://www.python.org/doc/2.4.4/whatsnew/node12.html I want to solve the following

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-29 Thread Maric Michaud
Steve Howell a écrit : > --- Carsten Haese <[EMAIL PROTECTED]> wrote: > >> On Sun, 2007-05-27 at 07:30 +, OKB (not >> okblacke) wrote: >>> Underscores are harder to type than any >> alphanumeric character. >> >> This is a discussion about underscores versus >> capital letters d

Re: python unix install, sqlite3

2007-05-29 Thread jim-on-linux
On Tuesday 29 May 2007 08:52, Simon wrote: > I installed the source code on unix for python > 2.5.1. The install went mainly okay, except for > some failures regarding: _ssl, _hashlib, > _curses, _curses_panel. > > No errors regarding sqlite3. > However, when I start python and do an import > sqlit

Re: python unix install, sqlite3

2007-05-29 Thread vasudevram
On May 29, 5:52 pm, Simon <[EMAIL PROTECTED]> wrote: > I installed the source code on unix for python 2.5.1. The install went > mainly okay, except for some failures regarding: > _ssl, _hashlib, _curses, _curses_panel. > > No errors regarding sqlite3. > However, when I start python and do an import

Re: Circular imports

2007-05-29 Thread jim-on-linux
On Tuesday 29 May 2007 00:08, Carsten Haese wrote: > On Mon, 28 May 2007 23:46:00 -0400, Ron Provost > wrote > > > [...] python is not happy about my circular > > imports [...] > > A circular import is not a problem in itself. > I'm guessing you're running into a situation > like this: > > Module A

Re: multiline regular expression (replace)

2007-05-29 Thread Gerard Flanagan
On May 29, 11:03 am, Zdenek Maxa <[EMAIL PROTECTED]> wrote: > Hi all, > > I would like to perform regular expression replace (e.g. removing > everything from within tags in a XML file) with multiple-line pattern. > How can I do this? > > where = open("filename").read() > multilinePattern = "^

Re: Periodic tasks.

2007-05-29 Thread vasudevram
On May 29, 4:39 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Alternatively, the user could make use of the already-existing "sched" > module from the standard library. With a little threading that would do > the job fine. > > regards > Steve > -- > Steve Holden+1 571 484 6266 +1 800 4

  1   2   >