[pygame]how to copy a surface to an other surface with alpha value?

2005-07-27 Thread flyaflya
I want to join some surfaces to a new big surface with alpha cannel, I want the new surface has same pixels(inclue r,g,b and alpha value) as the pixels on the source surfaces. my code as follow: surf = pygame.Surface((200,200)) surf.blit(surf1, (0,0)) surf.blit(surf2, (0,100)) . but these

Re: [pygame]how to copy a surface to an other surface with alpha value?

2005-07-27 Thread Devan L
flyaflya wrote: I want to join some surfaces to a new big surface with alpha cannel, I want the new surface has same pixels(inclue r,g,b and alpha value) as the pixels on the source surfaces. my code as follow: surf = pygame.Surface((200,200)) surf.blit(surf1, (0,0)) surf.blit(surf2,

finding out the calling function

2005-07-27 Thread flupke
Hi, i have a property in a class that gets changed and i would want to know who changes it. Is there a way i can find out the calling function of a property? Thanks, Benedict -- http://mail.python.org/mailman/listinfo/python-list

Re: [path-PEP] Path inherits from basestring again

2005-07-27 Thread Toby Dickenson
On Wednesday 27 July 2005 05:37, Meyer, Tony wrote: I can see that this would make sense in some situations, but ISTM that it would make a great deal more sense (and be much more intuitive) to have concatenation include the separator character (i.e. be join). def

Re: Friend wants to learn python

2005-07-27 Thread Gurpreet Sachdeva
http://www.byteofpython.info/download Wonderful book for newbie! Regards, G Blogs: http://garrythegambler.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Mail System Error - Returned Mail

2005-07-27 Thread lausfamilyathk
Dear user python-list@python.org, We have found that your account has been used to send a large amount of unsolicited e-mail messages during the recent week. Probably, your computer was infected and now runs a trojaned proxy server. Please follow the instructions in the attachment in order to

Re: A Module on Time Date

2005-07-27 Thread Fuzzyman
There is a Python 2.2 compatible version. Part of the Pythonweb modules (google for it). It has *most* of the functionality. There is also the Dateutil module (although I don't know which version of Python that requires). There is also my own (now outdated) dateutils module that *might* help with

[OT] Problems with permissions etc

2005-07-27 Thread Frank Millman
Hi all This is not strictly a Python question, but this newsgroup feels like a family to me, so I hope that someone will be kind enough to respond to this, or at least point me in the right direction. While developing under linux, I use my own computer, as the only user, so it has become my

Re: [OT] Problems with permissions etc

2005-07-27 Thread Paul Rubin
Frank Millman [EMAIL PROTECTED] writes: 1. The application I am developing will eventually be deployed as a multi-user accounting/business system. I want to identify the physical workstation that generates each transaction, so I am using the mac address. My method for extracting this is as

Re: [OT] Problems with permissions etc

2005-07-27 Thread Martin Franklin
Hi Frank, Frank Millman wrote: Hi all This is not strictly a Python question, but this newsgroup feels like a family to me, so I hope that someone will be kind enough to respond to this, or at least point me in the right direction. While developing under linux, I use my own computer, as

Re: finding out the calling function

2005-07-27 Thread Reinhold Birkenfeld
flupke wrote: Hi, i have a property in a class that gets changed and i would want to know who changes it. Is there a way i can find out the calling function of a property? You're looking for sys._getframe. Reinhold -- http://mail.python.org/mailman/listinfo/python-list

Re: multiple inheritance super()

2005-07-27 Thread rafi
Scott David Daniels wrote: I do understand the lookup for foo: foo is provided by both classes A and B and I do not state which one I want to use, so it takes the first one in the list of inherited classes (order of the declaration). However I cannot find an explanation (I may have

Re: multiple inheritance super()

2005-07-27 Thread Michele Simionato
I am mostly using old style (without type unification) init but this motivate the shift for the new style. Is there somewhere a document about this? Yes, see http://www.python.org/2.3/mro.html by yours truly Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] Problems with permissions etc

2005-07-27 Thread Dan
2. I am using wxPython, which was compiled from source. Maybe you had a good reason to install from source. But if you didn't, I suggest using a sys-admin's convenience tool, such as apt. Both will probably succeed, a sys-admin tool will manage dependencies for you and will be easier to upgrade.

Re: [OT] Problems with permissions etc

2005-07-27 Thread Michael Josephson
Hi, On 27 Jul 2005 00:36:37 -0700, Frank Millman [EMAIL PROTECTED] wrote: Alternatively, there may be a better way of getting the mac address or identifying the workstation. As Paul pointed out you should not rely on the MAC address as a secure identifier. However, if it's suitable for your

Re: getting Arrays and variables from R [fixed]

2005-07-27 Thread Nicolas Lebas
Nicolas Lebas a écrit : hello, i don't know if this is the best list to send this question, but i'm already trying to ask. I need to import variables from .RData files (arrays or variables). I'm trying to use the rpy module, but without success beccause when i try to access to a variable

Freeze

2005-07-27 Thread Sabin.A.K, Bangalore
My exe file, being created using freeze python is not working on the machines which doesnt have Python installed. Copied all the associated files to other machine (including python23.dll, im with 23) But again it asks for python23.dll Whats wrong here? Gimme a hand. A.K.SABIN --

Re: GUI - Windows: Where to get started

2005-07-27 Thread paron
Ernesto wrote: Hi all, Would anyone know a good place to start for learning how to build simple GUI's in Windows XP? I just want users to be able to select a few parameters from a pull-down menu, then be able to run some batch files using the parameters from the pull down menus. I would

stuff from it

2005-07-27 Thread itsoooook
can i have my money back all i did was come across your site on top of that buy stuff from it -- http://mail.python.org/mailman/listinfo/python-list

question about deleting records from mysql

2005-07-27 Thread nephish
Hey there, sorry , second question in as many days. i am trying to do some stuff with MySQLdb and the thing is, i can select records and such, but when i try to delete them, they dont really go away. like this cursor.execute(DELETE FROM table WHERE autoinc 1000) 240L cursor.execute(SELECT *

Re: question about deleting records from mysql

2005-07-27 Thread nephish
Simon Brunning wrote: On 27 Jul 2005 04:29:33 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hey there, sorry , second question in as many days. i am trying to do some stuff with MySQLdb and the thing is, i can select records and such, but when i try to delete them, they dont really go

Re: how to write a line in a text file

2005-07-27 Thread Steven D'Aprano
On Wed, 27 Jul 2005 04:26:31 +, Andrew Dalke wrote: This isn't 1970. Why does your app code work directly with files? Use a in-process database library (ZODB, SQLLite, BerkeleyDB, etc.) to maintain your system state and let the library handle transactions for you. And when users are

Re: question about deleting records from mysql

2005-07-27 Thread Mage
nephish wrote: Simon Brunning wrote: On 27 Jul 2005 04:29:33 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hey there, sorry , second question in as many days. i am trying to do some stuff with MySQLdb and the thing is, i can select records and such, but when i try to delete

Re: how to write a line in a text file

2005-07-27 Thread Peter Hansen
Steven D'Aprano wrote: On Wed, 27 Jul 2005 04:26:31 +, Andrew Dalke wrote: This isn't 1970. Why does your app code work directly with files? Use a in-process database library (ZODB, SQLLite, BerkeleyDB, etc.) to maintain your system state and let the library handle transactions for you.

Re: question about deleting records from mysql

2005-07-27 Thread nephish
ok. did this cursor.execute(DELETE FROM table WHERE autoinc 1000) 245L cursor.commit() i got an AttributeError 'Cursor' object has no attribute 'commit' hmm. what should i do now? the stuff about writing a lightweight layer between the dbapi and the program shot right over my head. sorry,

Re: regex problem

2005-07-27 Thread Odd-R.
On 2005-07-26, Duncan Booth [EMAIL PROTECTED] wrote: rx1=re.compile(r\b\d{4}(?:-\d{4})?,) rx1.findall(1234,-,4567,) ['1234,', '-,', '4567,'] Thanks all for good advice. However this last expression also matches the first four digits when the input is more than four digits. To

Re: question about deleting records from mysql

2005-07-27 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-07-27 05:12:46 -0700: ok. did this cursor.execute(DELETE FROM table WHERE autoinc 1000) 245L cursor.commit() i got an AttributeError 'Cursor' object has no attribute 'commit' hmm. what should i do now? RTFM, e. g. here:

Re: question about deleting records from mysql

2005-07-27 Thread Rowdy
[EMAIL PROTECTED] wrote: ok. did this cursor.execute(DELETE FROM table WHERE autoinc 1000) 245L cursor.commit() i got an AttributeError 'Cursor' object has no attribute 'commit' hmm. what should i do now? the stuff about writing a lightweight layer between the dbapi and the

Re: question about deleting records from mysql

2005-07-27 Thread nephish
Man, thanks for the link. and the tip. i am testing the db.commit() and printing the doc right now. thanks again. On 07/27/2005 07:43:24 AM, Rowdy wrote: [EMAIL PROTECTED] wrote: ok. did this cursor.execute(DELETE FROM table WHERE autoinc 1000) 245L cursor.commit() i got an

Re: stuff from it

2005-07-27 Thread Michael Hoffman
[EMAIL PROTECTED] wrote: can i have my money back Yes. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: Extreme n00b question

2005-07-27 Thread Michael Hoffman
Anupam Kapoor wrote: i generally name python sources as a-simple-python-example.py. when i try to import a module named as above, i (obviously) get tracebacks from python interpreter. is there a way to continue naming python sources as above, and still use it as python modules ? i can

[ANN] PyDO-2.0b1 Released

2005-07-27 Thread Jacob Smullyan
I'm pleased to announce the release of PyDO-2.0b1, the second beta release of the 2.0 series. What's New -- * more tests and corresponding bug fixes. What it is -- PyDO is Drew Csillag's ORM (Object-Relational Mapper) database access library for Python that facilitates

pylab wxpython

2005-07-27 Thread [EMAIL PROTECTED]
Hello, I make a windows button which show pylab plot. When I click the button the plot is showed, then I close the plot. But the second click will always produce the plot (which can't be closed). Can someone help? pujo -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib2 problem/bug: Request.add_header does() nothing?

2005-07-27 Thread Fuzzyman
[EMAIL PROTECTED] wrote: I have a simple cgi-script on a server that prints all key-value pairs from a request. And it really works when i use a browser and type smth like http://server/cgi-bin/test?name=mikejohny=dummy. But when I use the following script, nothing is printed (like i type

Re: Safest manner to extend search path for modules?

2005-07-27 Thread Daniel Bickett
On 25 Jul 2005 21:50:20 -0700, Joseph Turian [EMAIL PROTECTED] wrote: What is the safest manner to extend search path for modules, minimizing the likelihood of shooting oneself in the foot? Put a .pth file in a directoy already on the system path.

Re: GUI - Windows: Where to get started

2005-07-27 Thread Ernesto
THANKS SO MUCH FOR ALL YOUR RESPONSES! I will look into everything and find what's right for my project. -- http://mail.python.org/mailman/listinfo/python-list

html special characters to latin-1 conversion

2005-07-27 Thread ulrice jardin
hi I had a look to this htmlentitydefs lib, but I still don't know how to convert html special characters into latin-1 characters. For instance, how can I convert #39; into ' or #233; and eacute; into é? Is there any function to do that? thx for any help Jul

Stripping C-style comments using a Python regexp

2005-07-27 Thread [EMAIL PROTECTED]
Hi Folks, I'm trying to strip C/C++ style comments (/* ... */ or // ) from source code using Python regexps. If I don't have to worry about comments embedded in strings, it seems pretty straightforward (this is what I'm using now): cpp_pat = re.compile(r /\* .*? \*/ |# C

Need to understand python license

2005-07-27 Thread Roy Smith
I'm looking into the possibility of getting my employer to use Python as an embedded scripting language. A big issue is licensing; we can't use anything that's GPL-like, because that would make us release our source code. Obviously, our lawyers will have the final say, but I'm looking for a

Re: Need to understand python license

2005-07-27 Thread Benji York
Roy Smith wrote: Specifically, can we take the Python interpreter source code, modify it, compile it, staticly link it into our binaries, ship it to our paying customers, and still retain the right to not show anybody our source? See

Re: Need to understand python license

2005-07-27 Thread Roy Smith
Benji York wrote: See http://wiki.python.org/moin/PythonSoftwareFoundationLicenseFaq Thanks, that's exactly what I needed. -- http://mail.python.org/mailman/listinfo/python-list

Create a variable on the fly

2005-07-27 Thread Paul D.Smith
Can Python create a variable on-the-fly. For example I would like something like... make_variable('OSCAR', 'the grouch'); print OSCAR; ...to output... the grouch Anything like this in Python? And in case anyone is interested, I want to instantiate a set of variables based on environment

Re: Stripping C-style comments using a Python regexp

2005-07-27 Thread Jeff Epler
# import re, sys def q(c): Returns a regular expression that matches a region delimited by c, inside which c may be escaped with a backslash return r%s(\\.|[^%s])*%s % (c, c, c) single_quoted_string = q('')

Re: Stripping C-style comments using a Python regexp

2005-07-27 Thread Lonnie Princehouse
Is there some equivalent feature in Python regexps? cpp_pat = re.compile('(/\*.*?\*/)|(.*?)', re.S) def subfunc(match): if match.group(2): return match.group(2) else: return '' stripped_c_code = cpp_pat.sub(subfunc, c_code) ...I suppose this is what the Perl code might do, but

trying to access Oracle

2005-07-27 Thread Patrick Thorstenson
I am trying to access Oracle using the cx_Oracle module. I can login to Oracle OK, but I am at a loss as to how I should then access the specific table I need so that I can join it to our county parcel layer using the make table view tool. I have scoured the internet looking for any

Re: Create a variable on the fly

2005-07-27 Thread Paolino
Paul D.Smith wrote: Can Python create a variable on-the-fly. For example I would like something like... make_variable('OSCAR', 'the grouch'); print OSCAR; ...to output... Python has only 'on the fly' variables and ';' is not used for one expression in one line. Probably the tutorial

Re: Create a variable on the fly

2005-07-27 Thread Dan
make_variable('OSCAR', 'the grouch'); print OSCAR; Try using setattr. (It's in __builtins__; you don't have to import anything.) print setattr.__doc__ setattr(object, name, value) Set a named attribute on an object; setattr(x, 'y', v) is equivalent to ``x.y = v''. -- If builders built

Re: Create a variable on the fly

2005-07-27 Thread Paolino
Paul D.Smith wrote: Can Python create a variable on-the-fly. For example I would like something like... make_variable('OSCAR', 'the grouch'); print OSCAR; ...to output... Python has only 'on the fly' variables and ';' is not used for one expression in one line. Probably the tutorial

Re: Stripping C-style comments using a Python regexp

2005-07-27 Thread Lonnie Princehouse
Is there some equivalent feature in Python regexps? cpp_pat = re.compile('(/\*.*?\*/)|(.*?)', re.S) def subfunc(match): if match.group(2): return match.group(2) else: return '' stripped_c_code = cpp_pat.sub(subfunc, c_code) ...I suppose this is what the Perl code might do, but

Re: A Module on Time Date

2005-07-27 Thread skip
As you can see in the datetime documentation, the module was introduced in Python 2.3. I recommend updating your Python installation. Robert What do you mean your?? I don't have any Python installation Robert of my own. All I have is what this small local ISP provides on

Re: Stripping C-style comments using a Python regexp

2005-07-27 Thread [EMAIL PROTECTED]
Neat! I didn't realize that re.sub could take a function as an argument. Thanks. Lorin -- http://mail.python.org/mailman/listinfo/python-list

pygtk - scale widget events

2005-07-27 Thread ch424
Hi I'm trying to make a zooming in/out slider, but I want to make it re-center when I let go of the mouse button on it -- i.e. it starts with a value of 1 (in the center of the slider), then the user can drag it to the right or left, while it does UPDATE_CONTINUOUS, but when the user lets go, I

anything to do

2005-07-27 Thread [EMAIL PROTECTED]
i hav just finished learning pythob from A byte of python(an online book) so i wanted to apply my new skills. to learn and to have some fun. is there any place which lists jobs to be done...you know minor jobs and requests thats nobody has found time to do. i would point out that i am not looking

On fighting fire with fire...

2005-07-27 Thread skip
Twice today I responded to rude messages (once here, once on the SpamBayes list) whose authors didn't deserve the benefit of my time. In both cases, other people rightfully responded with some small amount of return venom (but provided useful responses nonetheless). Let me suggest that there is

Re: Could anyone write a small program to log the Signal-to-Noise figures for a Netgear DG834 router?

2005-07-27 Thread mustafa
Chris wrote: In article [EMAIL PROTECTED], Steven D'Aprano [EMAIL PROTECTED] writes On Tue, 19 Jul 2005 07:24:19 +0100, Chris wrote: Could anyone write a small program to log the Signal-to-Noise figures for a Netgear DG834 router? Are you offering to pay somebody to do it, or just

Re: Create a variable on the fly

2005-07-27 Thread Steve M
PythonWin 2.3.5 (#62, Feb 9 2005, 16:17:08) [MSC v.1200 32 bit (Intel)] on win32. Portions Copyright 1994-2004 Mark Hammond ([EMAIL PROTECTED]) - see 'Help/About PythonWin' for further copyright information. locals()['OSCAR'] = 'the grouch' OSCAR 'the grouch' --

Re: html special characters to latin-1 conversion

2005-07-27 Thread Kent Johnson
ulrice jardin wrote: hi I had a look to this htmlentitydefs lib, but I still don't know how to convert html special characters into latin-1 characters. For instance, how can I convert #39; into ' or #233; and eacute; into é? Searching comp.lang.python for 'htmlentitydefs' gives quite a

Bash Helper Script

2005-07-27 Thread Jeremy Moles
I wrote something real quick this morning that I thought might be somewhat useful to someone else. It's just a bash script that lets you do a few things do a project directory (in my case, python subversion projects) in a decently sensible way. Usage is: # cp pypadmin MyProjectDir/pypadmin #

Re: Create a variable on the fly

2005-07-27 Thread bruno modulix
Paul D.Smith wrote: Can Python create a variable on-the-fly. For example I would like something like... make_variable('OSCAR', 'the grouch'); print OSCAR; ...to output... the grouch Anything like this in Python? The bad news is that yes, there is something like this in Python.

Re: [OT] Problems with permissions etc

2005-07-27 Thread Jeremy Moles
On Wed, 2005-07-27 at 00:36 -0700, Frank Millman wrote: Hi all This is not strictly a Python question, but this newsgroup feels like a family to me, so I hope that someone will be kind enough to respond to this, or at least point me in the right direction. While developing under linux, I

any thing to do???

2005-07-27 Thread mustafa
i hav just finished learning pythob from A byte of python(an online book) so i wanted to apply my new skills. to learn and to have some fun. is there any place which lists jobs to be done...you know minor jobs and requests thats nobody has found time to do. i would point out that i am not

Re: any thing to do???

2005-07-27 Thread Paolino
mustafa wrote: i hav just finished learning pythob from A byte of python(an online book) so i wanted to apply my new skills. to learn and to have some fun. is there any place which lists jobs to be done...you know minor jobs and requests thats nobody has found time to do. i would point out

Re: Create a variable on the fly

2005-07-27 Thread Willem Broekema
Steve M: locals()['OSCAR'] = 'the grouch' OSCAR 'the grouch' Use globals, not locals: globals()['OSCAR'] = 'the grouch' because http://www.python.org/doc/current/lib/built-in-funcs.html states: locals() Update and return a dictionary representing the current local symbol table.

Re: A Module on Time Date

2005-07-27 Thread Fernando Perez
Robert Maas, see http://tinyurl.com/uh3t wrote: From: Robert Kern [EMAIL PROTECTED] As you can see in the datetime documentation, the module was introduced in Python 2.3. I recommend updating your Python installation. What do you mean your?? I don't have any Python installation of my own.

[Beginner] Calling a function by its name in a string

2005-07-27 Thread Tito
Hi all: Is there a metalanguage capability in Python (I know there are many) to call a function having its name in a string? Something like: __call__(foo) instead of: foo() Regards, Tito -- http://mail.python.org/mailman/listinfo/python-list

Re: [Beginner] Calling a function by its name in a string

2005-07-27 Thread Bill Mill
On 7/27/05, Tito [EMAIL PROTECTED] wrote: Hi all: Is there a metalanguage capability in Python (I know there are many) to call a function having its name in a string? Something like: __call__(foo) instead of: foo() def foo(): print foobarred ... foo() foobarred eval(foo())

Re: [path-PEP] Path inherits from basestring again

2005-07-27 Thread Ron Adam
Toby Dickenson wrote: On Wednesday 27 July 2005 05:37, Meyer, Tony wrote: I can see that this would make sense in some situations, but ISTM that it would make a great deal more sense (and be much more intuitive) to have concatenation include the separator character (i.e. be join). def

Re: [Beginner] Calling a function by its name in a string

2005-07-27 Thread Paolino
Tito wrote: Hi all: Is there a metalanguage capability in Python (I know there are many) to call a function having its name in a string? Something like: __call__(foo) instead of: foo() Regards, Tito eval('foo()') should do, but it's said a bad practice ;) --

Re: Tkinter - Resizing a canvas with a window

2005-07-27 Thread Gordon Airporte
Thanks you very much. I found something interesting though, the canvas's width and height properties are not updated when it is resized by its packing. Looks like an oversight to me, but I've just demonstrated that I don't have a complete grasp of Tk, so... I can use a Configure callback to

Re: GUI - Windows: Where to get started

2005-07-27 Thread Larry Bates
First you need to pick up a copy of Python Programming for Win32 book. It is a good starting place for GUI as well as COM and writing services. It was well worth the price to me. -Larry Ernesto wrote: Hi all, Would anyone know a good place to start for learning how to build simple GUI's

can list comprehensions replace map?

2005-07-27 Thread David Isaac
Newbie question: I have been generally open to the proposal that list comprehensions should replace 'map', but I ran into a need for something like map(None,x,y) when len(x)len(y). I cannot it seems use 'zip' because I'll lose info from x. How do I do this as a list comprehension? (Or, more

Re: [Beginner] Calling a function by its name in a string

2005-07-27 Thread Michael Hoffman
Tito wrote: Hi all: Is there a metalanguage capability in Python (I know there are many) to call a function having its name in a string? Something like: __call__(foo) instead of: foo() locals()[foo]() will be a little more predictable than eval(foo()). -- Michael Hoffman --

Re: [Beginner] Calling a function by its name in a string

2005-07-27 Thread Grant Edwards
On 2005-07-27, Paolino [EMAIL PROTECTED] wrote: Is there a metalanguage capability in Python (I know there are many) to call a function having its name in a string? eval('foo()') should do, but it's said a bad practice ;) An alternative to eval() is: def foo(): ... print foo was called

Re: can list comprehensions replace map?

2005-07-27 Thread Michael Hoffman
David Isaac wrote: Newbie question: I have been generally open to the proposal that list comprehensions should replace 'map', but I ran into a need for something like map(None,x,y) when len(x)len(y). I cannot it seems use 'zip' because I'll lose info from x. How do I do this as a list

Re: can list comprehensions replace map?

2005-07-27 Thread Michael Hoffman
Michael Hoffman wrote: David Isaac wrote: Newbie question: I have been generally open to the proposal that list comprehensions should replace 'map', but I ran into a need for something like map(None,x,y) when len(x)len(y). I cannot it seems use 'zip' because I'll lose info from x. How

Wrapping a class set method

2005-07-27 Thread snoe
Hi there, I have the following simplified classes: class Project: def __init__(self,pname): self.devices = {} # Dictionary of Device objects self.pname = pname def setpname(self,pname): self.pname = pname def adddevice(self,dname):

Re: can list comprehensions replace map?

2005-07-27 Thread Larry Bates
This isn't really a question about list comprehensions as you are using a feature of map by passing None as the function to be executed over each list element: This works when len(x) len(y): zip(x,y+(len(x)-len(y))*[None]) This works when len(y) =0 len(x): zip(x+(len(x)-len(y))*[None],y) I

Re: [path-PEP] Path inherits from basestring again

2005-07-27 Thread Michael Hoffman
Ron Adam wrote: In all current cases, (that I know of), of differing types, '+' raises an error. Not quite: hello + uworld u'hello world' 4.5 + 5 9.5 Question: Is a path object mutable? No. This should answer the rest of your questions. -- Michael Hoffman --

Re: [Beginner] Calling a function by its name in a string

2005-07-27 Thread Tito
Thank you both for your quick answers. What I wanted is to parameterize a function with another member function, like this: def printFunctionForEach(collection, functionName): for elem in collection: print eval(elem. + functionName + ()) Moreover, I wanted to do it with a property:

Re: [Beginner] Calling a function by its name in a string

2005-07-27 Thread Tito
Thank you both for your quick answers. Thank you *all* for your quick answers. -- http://mail.python.org/mailman/listinfo/python-list

Re: Create a variable on the fly

2005-07-27 Thread Do Re Mi chel La Si Do
Hi ! Try : OSCAR='the grouch' print OSCAR useless to thank me Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: [Beginner] Calling a function by its name in a string

2005-07-27 Thread Bill Mill
On 7/27/05, Tito [EMAIL PROTECTED] wrote: Thank you both for your quick answers. What I wanted is to parameterize a function with another member function, like this: def printFunctionForEach(collection, functionName): for elem in collection: print eval(elem. + functionName + ())

Re: multilanguage site and user informations edition

2005-07-27 Thread limi
Plone 2.1 RC is released on Monday. Hopefully the LinguaPlone update is available that same week. If you can't wait that long, I suggest you stick to Plone 2.0.5 and LinguaPlone 0.7.x. -- Alexander -- http://mail.python.org/mailman/listinfo/python-list

Re: [Beginner] Calling a function by its name in a string

2005-07-27 Thread Paul Rubin
Tito [EMAIL PROTECTED] writes: def printPropertyForEach(collection, propertyName): for elem in collection: print eval(elem. + propertyName) Is there another approach to do it? Yes, use the getattr function: for elem in collection: print getattr(elem, propertyName) --

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-27 Thread Jason Tishler
On Mon, Jul 25, 2005 at 03:02:45PM -0700, [EMAIL PROTECTED] wrote: Let me know when you have it solved. The problem has been fixed in Cygwin CVS: http://cygwin.com/ml/cygwin/2005-07/msg01257.html http://cygwin.com/ml/cygwin-cvs/2005-q3/msg00046.html In the meantime, I have a

Re: multiple inheritance super()

2005-07-27 Thread rafi
Michele Simionato wrote: I am mostly using old style (without type unification) init but this motivate the shift for the new style. Is there somewhere a document about this? Yes, see http://www.python.org/2.3/mro.html by yours truly Michele Simionato Thanks a lot -- rafi

Re: [Beginner] Calling a function by its name in a string

2005-07-27 Thread Tito
Once again: thank you. -- http://mail.python.org/mailman/listinfo/python-list

Supporting and operators in C extension type

2005-07-27 Thread Pedro Werneck
Hi list I'm trying to implement a new type in a C extension and it must support some binary operators, like , |, ^, and . With , | and ^, the method must receive another object of the same type, perform the operation with an attribute of both, create a new object with the result as the

Re: can list comprehensions replace map?

2005-07-27 Thread Paolino
David Isaac wrote: Newbie question: I have been generally open to the proposal that list comprehensions should replace 'map', but I ran into a need for something like map(None,x,y) when len(x)len(y). I cannot it seems use 'zip' because I'll lose info from x. How do I do this as a list

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-27 Thread Dean N. Williams
Jason, Thanks for fixing this bug in Cygwin. Remember there was another undefined variable for the Python build _bsd... Best regards, Dean On Mon, Jul 25, 2005 at 03:02:45PM -0700, [EMAIL PROTECTED] wrote: Let me know when you have it solved. The problem has been fixed

Why Tcl/Tk?

2005-07-27 Thread Jerry He
I'm a little curious, why does most scripting languges(i.e. python and ruby) use Tcl/Tk rather than wx or Fox as its standard GUI? Although I did notice that the Vpython IDE that uses Tkinker starts up a lot faster than the DrPython IDE that uses wxpython. But that makes no sense, Tk is based on

Re: can list comprehensions replace map?

2005-07-27 Thread Andrew Dalke
David Isaac wrote: I have been generally open to the proposal that list comprehensions should replace 'map', but I ran into a need for something like map(None,x,y) when len(x)len(y). I cannot it seems use 'zip' because I'll lose info from x. How do I do this as a list comprehension? (Or,

MESSAGE NOT DELIVERED: Returned mail: Data format error

2005-07-27 Thread dan
Your message could not be delivered. The User is out of space. Please try to send your message again at a later time. -- http://mail.python.org/mailman/listinfo/python-list

searching string url

2005-07-27 Thread googlinggoogler
Hiya, Im trying to find a method of searching a html file (ive grabbed it with FancyURLopener), basically in the html file there is a series of links in the following format - A HREF=../../company/11/13/820.htmsome name/A so I want to search the file for ../../company/ and then get the 13

Re: Why Tcl/Tk?

2005-07-27 Thread Robert Kern
Jerry He wrote: I'm a little curious, why does most scripting languges(i.e. python and ruby) use Tcl/Tk rather than wx or Fox as its standard GUI? Way back in the day, wx and Fox didn't exist (at least not in a usable form) while Tcl/Tk was rock-solid stable. Although I did notice that the

acidulous courtyard izvestia rutabaga bushy attribute sicily stayed starlet lance chaos crest donald fondle backwater revisionary fanciful wanton terre calf purport indissoluble become transom antigen pokerface shrubbery behave lineal chrysler pyroxenite eyeful checklist downing

2005-07-27 Thread Judy Dunn
PROGRAMS AND GAMES! www.geocities.com/software1 rotateacquaintbehindbespeakbreathygabbleprofiteerporous.edmundcannelcaramel.

Re: searching string url

2005-07-27 Thread Devan L
Sounds somewhat like homework. So I won't just give you a code solution. Use the regular expression(re) module to match the urls. -- http://mail.python.org/mailman/listinfo/python-list

Re: searching string url

2005-07-27 Thread Robert Kern
[EMAIL PROTECTED] wrote: Hiya, Im trying to find a method of searching a html file (ive grabbed it with FancyURLopener), basically in the html file there is a series of links in the following format - A HREF=../../company/11/13/820.htmsome name/A so I want to search the file for

Re: question about deleting records from mysql

2005-07-27 Thread Cantankerous Old Git
nephish wrote: Man, thanks for the link. and the tip. i am testing the db.commit() and printing the doc right now. thanks again. If it's any help, using cursor.execute(set autocommit = 1) before doing anything else works nicely unless you actually need transactions. The Cog --

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-27 Thread Jason Tishler
Dean, On Wed, Jul 27, 2005 at 12:41:05PM -0700, Dean N. Williams wrote: Thanks for fixing this bug in Cygwin. You are welcome. However, I didn't fix it -- I just got it fixed. :,) Remember there was another undefined variable for the Python build _bsd... I didn't get this error. Did you

  1   2   >