ANN: webstring 0.5

2007-01-05 Thread L. C. Rees
webstring is a template engine for programmers whose favorite template language is Python. webstring can be used to generate any text output from a template with the additional advantages of advanced XML and HTML templating using the lxml and cElementTree libraries. webstring includes a

PyCon 2007 Funding Available

2007-01-05 Thread David Goodger
The Python Software Foundation has allocated some funds to help people attend PyCon 2007. If you'd like to come to PyCon but can't afford it, maybe the PSF can help you. The funding can cover any or all of: * Your registration for PyCon * Your hotel room at the conference hotel * Your flight or

Re: C/C++, Perl, etc. to Python converter

2007-01-05 Thread Paddy
mm wrote: Is there a Perl to Python converter? Or in general: a XY to Python converter? Is see, that Python is much better then Perl anyway. But for beginners, they whant to konw how is this done with Python etc. Sure, there are some docus out there in the internet. But a converter? Try

Problem installing MySQLdb/1.2.1_p2 with Python/2.4.1 and MySQL/5.0.18

2007-01-05 Thread Sean O'Donnell
Hi, I can't seem to get MySQLdb/1.2.1p2 to install on Slackware/10.2, with Python/2.4.1, and MySQL/5.0.18. The following command: $ python setup.py build 2 setup.err returns the following errors: http://pastebin.com/851624 Any suggestions? Thanks! Sean --

Re: C/C++, Perl, etc. to Python converter

2007-01-05 Thread Diez B. Roggisch
It is definitely _not_ possible. There are so many design decisions that are differing based on what a language offers - e.g. generators, garbage collection, precise control over memory layout and so on. Inter-language translators have been written. There's usually a performance

checking one's type

2007-01-05 Thread belinda thom
Hi, I've been using the following hack to determine if a type is acceptable and I suspect there is a better way to do it: e.g. if type(s) == type() : print okay, i'm happy you're a string If anyone knows a better way, I'm all ears. Thanks, --b --

Re: Problem installing MySQLdb/1.2.1_p2 with Python/2.4.1 and MySQL/5.0.18

2007-01-05 Thread Diez B. Roggisch
Sean O'Donnell schrieb: Hi, I can't seem to get MySQLdb/1.2.1p2 to install on Slackware/10.2, with Python/2.4.1, and MySQL/5.0.18. The following command: $ python setup.py build 2 setup.err returns the following errors: http://pastebin.com/851624 Any suggestions? Install the

Re: Anyone persuaded by merits of Lisp vs Python?

2007-01-05 Thread Ant
Hi all, On Dec 28 2006, 4:51 pm, Paddy3118 [EMAIL PROTECTED] wrote: This month there was/is a 1000+ long thread called: merits of Lisp vs Python In comp.lang.lisp. If you followed even parts of the thread, AND previously used only one of the languages AND (and this is the crucial bit),

PyType_IsSubtype ()

2007-01-05 Thread Sheldon
Hi, Can anyone tell me what this error mean: #0 0x4008376e in PyType_IsSubtype () from /usr/lib/libpython2.3.so.1.0 The core file backtrace can be found below. I am using Numeric and Python2.3 on a Linux OS. Any help is appreciated! * Core was generated by

Re: Problem installing MySQLdb/1.2.1_p2 with Python/2.4.1 and MySQL/5.0.18

2007-01-05 Thread Sean O'Donnell
Diez B. Roggisch wrote: Sean O'Donnell schrieb: Hi, I can't seem to get MySQLdb/1.2.1p2 to install on Slackware/10.2, with Python/2.4.1, and MySQL/5.0.18. The following command: $ python setup.py build 2 setup.err returns the following errors: http://pastebin.com/851624 Any

Re: checking one's type

2007-01-05 Thread Gabriel Genellina
At Friday 5/1/2007 05:40, belinda thom wrote: I've been using the following hack to determine if a type is acceptable and I suspect there is a better way to do it: This has been discussed today under the thread Set type?, and a few days ago as type classobj not defined. -- Gabriel

Re: checking one's type

2007-01-05 Thread belinda thom
thanks :-) On Jan 5, 2007, at 1:05 AM, Gabriel Genellina wrote: At Friday 5/1/2007 05:40, belinda thom wrote: I've been using the following hack to determine if a type is acceptable and I suspect there is a better way to do it: This has been discussed today under the thread Set type?, and

Re: checking one's type

2007-01-05 Thread Ben Artin
In article [EMAIL PROTECTED], belinda thom [EMAIL PROTECTED] wrote: I've been using the following hack to determine if a type is acceptable and I suspect there is a better way to do it: e.g. if type(s) == type() : print okay, i'm happy you're a string If anyone knows a better

Re: When argparse will be in the python standard installation

2007-01-05 Thread Martin v. Löwis
Steven Bethard schrieb: * alias ArgumentParser to OptionParser * alias add_argument to add_option * alias Values to Namespace * alias OptionError and OptionValueError to ArgumentError * alias add_help= keyword argument of ArgumentParser to add_help_option= * alias namespace= keyword argument

Re: PyType_IsSubtype ()

2007-01-05 Thread Martin v. Löwis
Sheldon schrieb: Can anyone tell me what this error mean: #0 0x4008376e in PyType_IsSubtype () from /usr/lib/libpython2.3.so.1.0 It's not an error. It is just a frame from the backtrace. To understand the crash better, one would need to see more frames from the backtrace. Ideally, one would

Re: checking one's type

2007-01-05 Thread Martin v. Löwis
belinda thom schrieb: I've been using the following hack to determine if a type is acceptable and I suspect there is a better way to do it: e.g. if type(s) == type() : print okay, i'm happy you're a string If anyone knows a better way, I'm all ears. There are several way to improve

Memoization in Python

2007-01-05 Thread Alec Mihailovs
Following Antti Karttunen suggestion, I wrote the following simple decorator for creating functions with cache (something like 'option remember' in Maple). Just wanted to share it: def function_with_cache(f): def new_f(*args): if args in new_f.cache: return new_f.cache[args]

Re: checking one's type

2007-01-05 Thread Fredrik Lundh
belinda thom wrote: I've been using the following hack to determine if a type is acceptable and I suspect there is a better way to do it: e.g. if type(s) == type() : print okay, i'm happy you're a string If anyone knows a better way, I'm all ears.

where to find wx package

2007-01-05 Thread siggi
Hi all, a newbie question: I have a program gui03A.py using wxPython, importing it such: from wxPython.wx import * The program works, but I get the warning message: gui03A.py:4: DeprecationWarning: The wxPython compatibility package is no longer automatically generated or activly maintained.

Re: where to find wx package

2007-01-05 Thread Robert Kern
siggi wrote: Hi all, a newbie question: I have a program gui03A.py using wxPython, importing it such: from wxPython.wx import * The program works, but I get the warning message: gui03A.py:4: DeprecationWarning: The wxPython compatibility package is no longer automatically generated

Re: where to find wx package

2007-01-05 Thread Rob Williscroft
siggi wrote in news:[EMAIL PROTECTED] in comp.lang.python: Hi all, a newbie question: I have a program gui03A.py using wxPython, importing it such: from wxPython.wx import * The program works, but I get the warning message: gui03A.py:4: DeprecationWarning: The wxPython

Re: code optimization (calc PI) / New Algorithme for PI

2007-01-05 Thread Nick Craig-Wood
Michael M. [EMAIL PROTECTED] wrote: Yes, this gmpy sounds good for calc things like that. But not available on my machine. ImportError: No module named gmpy Sorry, I should have said - you'll need to download that from http://gmpy.sourceforge.net/ Anyway, thanks for posting. This gmpy

wxWindows off-screen?

2007-01-05 Thread Ivan Voras
Is it possible to draw a widget or a window in an off-screen buffer? What I'm trying to do is capture rendered HTML to a bitmap (in other words, something like html2bitmap) by using wxWindows' HTML widget. If anyone has a different way of doing it, I'd be glad to hear it... --

Re: Memoization in Python

2007-01-05 Thread Gabriel Genellina
At Friday 5/1/2007 06:50, Alec Mihailovs wrote: Following Antti Karttunen suggestion, I wrote the following simple decorator for creating functions with cache (something like 'option remember' in Maple). Just wanted to share it: Nice. There is already a memoize decorator in the Python wiki:

Using sax libxml2 html parser

2007-01-05 Thread cesar . ortiz
Hi all, I have created an example using libxml2 based in the code that appears in http://xmlsoft.org/python.html. My example processes an enough amount of html files to see that the memory consumption rises till the process ends (I check it with the 'top' command). I don´t know if I am

Re: PyType_IsSubtype ()

2007-01-05 Thread Sheldon
Martin v. Löwis skrev: Sheldon schrieb: Can anyone tell me what this error mean: #0 0x4008376e in PyType_IsSubtype () from /usr/lib/libpython2.3.so.1.0 It's not an error. It is just a frame from the backtrace. To understand the crash better, one would need to see more frames from the

!MAKE MONEY USING PAYPAL- IT WORKS!

2007-01-05 Thread Unique Merchandise Outlet
Hello, I wonder if you can help me out..I received an extrememly obnoxious e-mail from someone who told me this is a SCAM and, not a LEGAL way to make money, and that Paypal, even has a policy against it. Every forum you read this in, where people are posting this same opportunity, I have

Calculating Download Rate

2007-01-05 Thread placid
Hi all, I want be able to work the download rate for downloading HTML pages using the urllib.urlopen(url). The way i thought i would do this is start a timer (or log the current time) just before calling this function and the stopping the timer (logging the current time again and the working out

program deployment

2007-01-05 Thread king kikapu
hi to all folks here, i am learning Python, just finished a book and i am starting to write programs. I just want to ask, is the correct way to deploy my programs to other computers, the .pyc files ?? I now that with the -m compileall . switch can compile a .py file into bytecodes. So i suppose

CPU management

2007-01-05 Thread Fulvio D'Antonio
Hello everybody, I usally develop a lot of expensive (in terms of CPU usage) algorithms. I would like to develop something that allows my application to run quietly all day long with a little CPU usage, so that I can work in the meanwhile! I was wondering if there is a way to limit the CPU

Encoding / decoding strings

2007-01-05 Thread [EMAIL PROTECTED]
Hey Everyone, Was just wondering if anyone here could help me. I want to encode (and subsequently decode) email addresses to use in URLs. I believe that this can be done using MD5. I can find documentation for encoding the strings, but not decoding them. What should I do to encode =and= decode

Change coords of a canvas.line item

2007-01-05 Thread Matthias Vodel
Hi all, I want to change the beginning/end-coordinates of a canvas.line item. Something like: self.myCanvas.itemconfigure(item_id, coords=(x1_new, y1_new, x2_new, y2_new)) I don't want to delete and repaint a new line item. Is this possible? Thanks Matthias --

Re: Encoding / decoding strings

2007-01-05 Thread Jon Clements
[EMAIL PROTECTED] wrote: Hey Everyone, Was just wondering if anyone here could help me. I want to encode (and subsequently decode) email addresses to use in URLs. I believe that this can be done using MD5. I can find documentation for encoding the strings, but not decoding them. What

Re: Change coords of a canvas.line item

2007-01-05 Thread Fredrik Lundh
Matthias Vodel wrote: I want to change the beginning/end-coordinates of a canvas.line item. Something like: self.myCanvas.itemconfigure(item_id, coords=(x1_new, y1_new, x2_new, y2_new)) self.myCanvas.coords(item_id, x1_new, y1_new, x2_new, y2_new) /F --

Re: Change coords of a canvas.line item

2007-01-05 Thread Matthias Vodel
Very nice :) Thank you, Matthias -- http://mail.python.org/mailman/listinfo/python-list

Re: checking one's type

2007-01-05 Thread Bruno Desthuilliers
belinda thom a écrit : Hi, I've been using the following hack to determine if a type is acceptable and I suspect there is a better way to do it: e.g. if type(s) == type() : print okay, i'm happy you're a string if isinstance(s, basestring): print There are very few cases

Re: What is proper way to require a method to be overridden?

2007-01-05 Thread Bruno Desthuilliers
jeremito a écrit : I am writing a class that is intended to be subclassed. What is the proper way to indicate that a sub class must override a method? class Base(object): def method_to_override(self, *args, **kw): raise NotImplementedError(You need to override this method) --

Re: program deployment

2007-01-05 Thread Ravi Teja
king kikapu wrote: hi to all folks here, i am learning Python, just finished a book and i am starting to write programs. I just want to ask, is the correct way to deploy my programs to other computers, the .pyc files ?? I now that with the -m compileall . switch can compile a .py file

Re: Change coords of a canvas.line item

2007-01-05 Thread Wojciech Muła
Fredrik Lundh wrote: Matthias Vodel wrote: I want to change the beginning/end-coordinates of a canvas.line item. Something like: self.myCanvas.itemconfigure(item_id, coords=(x1_new, y1_new, x2_new, y2_new)) self.myCanvas.coords(item_id, x1_new, y1_new, x2_new, y2_new) You can also

Re: Encoding / decoding strings

2007-01-05 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: Hey Everyone, Was just wondering if anyone here could help me. I want to encode (and subsequently decode) email addresses to use in URLs. I believe that this can be done using MD5. Are you by chance after a way to create URLs that contain an email which the server

Re: Calculating Download Rate

2007-01-05 Thread Gabriel Genellina
At Friday 5/1/2007 08:53, placid wrote: I want be able to work the download rate for downloading HTML pages using the urllib.urlopen(url). The way i thought i would do this is start a timer (or log the current time) just before calling this function and the stopping the timer (logging the

Re: program deployment

2007-01-05 Thread king kikapu
Python code is normally deployed as straight source code. But isn't this a problem of its own ?? I mean, many people do not feel good if the know that their source code is lying around on other machines... -- http://mail.python.org/mailman/listinfo/python-list

Re: Draw rectangle on a Window DC

2007-01-05 Thread Paul McGuire
Gabriel Genellina [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] At Thursday 4/1/2007 07:07, Raymond wrote: I want to Draw rectangle on Dc when gived a position. Can you teach me? Let me view your code? This is more a Windows question. See

Re: program deployment

2007-01-05 Thread Diez B. Roggisch
king kikapu wrote: Python code is normally deployed as straight source code. But isn't this a problem of its own ?? I mean, many people do not feel good if the know that their source code is lying around on other machines... This has been discussed a bazillion times on this list - the

Re: where to find wx package

2007-01-05 Thread siggi
Thanks Rob! siggi Rob Williscroft [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] siggi wrote in news:[EMAIL PROTECTED] in comp.lang.python: Hi all, a newbie question: I have a program gui03A.py using wxPython, importing it such: from wxPython.wx import * The program

Re: where to find wx package

2007-01-05 Thread siggi
Thanks to you, too, Robert! siggi Robert Kern [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] siggi wrote: Hi all, a newbie question: I have a program gui03A.py using wxPython, importing it such: from wxPython.wx import * The program works, but I get the warning

Re: bug in copy.deepcopy or in getattr or in my understanding?

2007-01-05 Thread Emin
Dear Gabriel, Thank you for your reply. As you guessed, I want to be able to select the method at runtime as in your final example, but when I tried your suggestion I got the same error (see below). I think the problem is that getattr is donig something different than in my example where I

Re: CPU management

2007-01-05 Thread Gabriel Genellina
At Friday 5/1/2007 08:51, Fulvio D'Antonio wrote: I usally develop a lot of expensive (in terms of CPU usage) algorithms. I would like to develop something that allows my application to run quietly all day long with a little CPU usage, so that I can work in the meanwhile! I'm running

Re: bug in copy.deepcopy or in getattr or in my understanding?

2007-01-05 Thread Peter Otten
Emin wrote: Thank you for your reply. As you guessed, I want to be able to select the method at runtime as in your final example, but when I tried your suggestion I got the same error (see below). I think the problem is that getattr is donig something different than in my example where I

Re: C/C++, Perl, etc. to Python converter

2007-01-05 Thread Uwe Grauer
mm wrote: Is there a Perl to Python converter? Or in general: a XY to Python converter? Is see, that Python is much better then Perl anyway. But for beginners, they whant to konw how is this done with Python etc. Sure, there are some docus out there in the internet. But a converter?

where is Microsoft Speech Object Library 5.1 option in PythonWin 2.5?

2007-01-05 Thread siggi
Hi all, newbie question: I'd like to try speech synthesis with PythonWin 2.5. Problem ** according to several instructions, such as found on http://surguy.net/articles/speechrecognition.xml and in a book on Python, I have to select Tools | COM MakePy Utility | Microsoft Speech Object

Re: What is proper way to require a method to be overridden?

2007-01-05 Thread Bruno Desthuilliers
Carl Banks a écrit : jeremito wrote: I am writing a class that is intended to be subclassed. What is the proper way to indicate that a sub class must override a method? You can't (easily). If your subclass doesn't override a method, then you'll get a big fat AttributeError when

How to get file name on a remote server with ftplib?

2007-01-05 Thread alex
Hello, My script is trying to get a file from a remote server, every day it ftps from a directory. My code works perfect if I know the name of the file in the remote directory. ftp.retrbinary('RETR ' + filename, handleDownload) The problem is that in the future the name of the file is going to

Re: How to get file name on a remote server with ftplib?

2007-01-05 Thread [EMAIL PROTECTED]
alex wrote: Hello, My script is trying to get a file from a remote server, every day it ftps from a directory. My code works perfect if I know the name of the file in the remote directory. ftp.retrbinary('RETR ' + filename, handleDownload) The problem is that in the future the name of

Re: program deployment

2007-01-05 Thread Grant Edwards
On 2007-01-05, king kikapu [EMAIL PROTECTED] wrote: i am learning Python, just finished a book and i am starting to write programs. I just want to ask, is the correct way to deploy my programs to other computers, the .pyc files ?? That depends on the platform. Under Linux, one usually just

Re: bug in copy.deepcopy or in getattr or in my understanding?

2007-01-05 Thread Gabriel Genellina
At Friday 5/1/2007 11:01, Emin wrote: Thank you for your reply. As you guessed, I want to be able to select the method at runtime as in your final example, but when I tried your suggestion I got the same error (see below). I think the problem is that getattr is donig something different than in

Re: Encoding / decoding strings

2007-01-05 Thread [EMAIL PROTECTED]
Basically, I want to encode an email address so that it looks something like 8d2e23c0a835598510c88a758c6b215a - this way the user does not know the email address they are looking at. They are public-facing views and they are to get info about other users, therefore anonymity is important. Any

Re: program deployment

2007-01-05 Thread Grant Edwards
On 2007-01-05, king kikapu [EMAIL PROTECTED] wrote: Python code is normally deployed as straight source code. But isn't this a problem of its own? I mean, many people do not feel good if the know that their source code is lying around on other machines... Are they embarassed by their code?

Re: program deployment

2007-01-05 Thread king kikapu
Are they embarassed by their code? hehehe...no, just worried about stealing their ideas... -- http://mail.python.org/mailman/listinfo/python-list

Re: program deployment

2007-01-05 Thread Thomas Ploch
Grant Edwards schrieb: On 2007-01-05, king kikapu [EMAIL PROTECTED] wrote: Python code is normally deployed as straight source code. But isn't this a problem of its own? I mean, many people do not feel good if the know that their source code is lying around on other machines... Are they

Re: Encoding / decoding strings

2007-01-05 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: Basically, I want to encode an email address so that it looks something like 8d2e23c0a835598510c88a758c6b215a - this way the user does not know the email address they are looking at. They are public-facing views and they are to get info about

Re: program deployment

2007-01-05 Thread Andy Dingley
king kikapu wrote: Are they embarassed by their code? hehehe...no, just worried about stealing their ideas... Ever heard of Open Source ? I do better by letting other people steal my ideas (and stealing theirs too) than I'd ever do by keeping things secret. --

Re: program deployment

2007-01-05 Thread king kikapu
Under Windows, I ususally use py2exe+inno-setup. Xmmm...i have downloaded this and try a (very) simple project and it is working great. Of your experience, does it also working great when you have more complex solutions, e.x. many 3rd party modules like wxWidgets and so ?? --

Re: program deployment

2007-01-05 Thread Grant Edwards
On 2007-01-05, king kikapu [EMAIL PROTECTED] wrote: Are they embarassed by their code? hehehe...no, just worried about stealing their ideas... They're deluding themselves. The vast majority of ideas aren't worth stealing. If they are worth stealing, you don't need the source code to do it.

Re: program deployment

2007-01-05 Thread Grant Edwards
On 2007-01-05, king kikapu [EMAIL PROTECTED] wrote: Under Windows, I ususally use py2exe+inno-setup. Xmmm...i have downloaded this and try a (very) simple project and it is working great. Of your experience, does it also working great when you have more complex solutions, e.x. many 3rd party

elementtree.SimpleXMLWriter and xmlcharrefreplace

2007-01-05 Thread [EMAIL PROTECTED]
I'll try to explain my problem with code. The problem is the output msg = uSödertälje Borås # latin1 unicode string with a from elementtree.SimpleXMLWriter import XMLWriter from cStringIO import StringIO out = StringIO() w = XMLWriter(out) body = w.start(body) w.element(text, msg)

Re: program deployment

2007-01-05 Thread Michele Simionato
king kikapu wrote: Are they embarassed by their code? hehehe...no, just worried about stealing their ideas... I believe that shipping just the bytecode is a pretty effective way to stop 99% of programmers from reading your code. Yes, in theory they could decompile it, but in practice,

Re: program deployment

2007-01-05 Thread king kikapu
Ok, i got the point...Things are a little bit different on the other way of the fence (Microsoft way...) and so many of Python's elements are a little (at least) strange at first... But hey, thank you all! -- http://mail.python.org/mailman/listinfo/python-list

find a .py path

2007-01-05 Thread hg
Hi, Is there an easy way for a script being executed (from anywhere) to know where is is ... something in os.path ? Thanks, hg -- http://mail.python.org/mailman/listinfo/python-list

Re: elementtree.SimpleXMLWriter and xmlcharrefreplace

2007-01-05 Thread [EMAIL PROTECTED]
My current version of SimpeXMLWriter is: $Id: SimpleXMLWriter.py 1862 2004-06-18 07:31:02Z Fredrik $ I'm testing this on in python2.3.5 and python2.4.3. [EMAIL PROTECTED] wrote: I'll try to explain my problem with code. The problem is the output msg = uSödertälje Borås # latin1 unicode

Re: find a .py path

2007-01-05 Thread hg
hg wrote: Hi, Is there an easy way for a script being executed (from anywhere) to know where is is ... something in os.path ? Thanks, hg oops: os.path.abspath(sys.argv[0]) hg -- http://mail.python.org/mailman/listinfo/python-list

Re: find a .py path

2007-01-05 Thread Laszlo Nagy
hg i'rta: Hi, Is there an easy way for a script being executed (from anywhere) to know where is is ... something in os.path ? __file__ You can also use os.argv[0] but that is not the same... Laszlo -- http://mail.python.org/mailman/listinfo/python-list

Re: Undefined symbol __pure_virtual when importing MySQLdb

2007-01-05 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: Fredrik Lundh wrote: [EMAIL PROTECTED] wrote: I have googled hard, and did see someone asking the same question, but haven't found a good solution to this problem. Could anyone give me a hint? Thanks a lot! googling for undefined symbol: __pure_virtual

importing / loading a module / class dynamically

2007-01-05 Thread hg
Hi, I have the following problem. I find in a directory hierarchy some files following a certain sets of rules: .../.../../plugin/name1/name1.py .../.../../plugin/namen/namen.py each file will in turn have a class with the same name as the filename (minus .py) I fetch those names in a

Re: find a .py path

2007-01-05 Thread hg
Laszlo Nagy wrote: hg i'rta: Hi, Is there an easy way for a script being executed (from anywhere) to know where is is ... something in os.path ? __file__ You can also use os.argv[0] but that is not the same... Laszlo Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: find a .py path

2007-01-05 Thread Laszlo Nagy
hg írta: hg wrote: Hi, Is there an easy way for a script being executed (from anywhere) to know where is is ... something in os.path ? Thanks, hg oops: os.path.abspath(sys.argv[0]) Be aware with this. It is different when you do /usr/bin/python prog.py and ./prog.py

Re: importing / loading a module / class dynamically

2007-01-05 Thread Laszlo Nagy
.../.../../plugin/name1/name1.py .../.../../plugin/namen/namen.py I block at the beginning and tried this (test.py is a real file) s = 'test.py' eval ('import ' + s) import test.py # This is invalid import test # This MAY be valid import name1.name1 # Most probably

Re: where is Microsoft Speech Object Library 5.1 option in PythonWin 2.5?

2007-01-05 Thread Gabriel Genellina
At Friday 5/1/2007 11:24, siggi wrote: However, in my Python 2.5/PythonWin 2.5 installation I find as only option Microsoft Speech Object Library 5.0 to select. This list shows all the COM objects currently registered in Windows, does not depend on Pythonwin. Unfortunately, 5.1 is the

Re: importing / loading a module / class dynamically

2007-01-05 Thread hg
hg wrote: Hi, I have the following problem. I find in a directory hierarchy some files following a certain sets of rules: .../.../../plugin/name1/name1.py .../.../../plugin/namen/namen.py each file will in turn have a class with the same name as the filename (minus .py)

Just Getting Started with Python on MS XP Pro

2007-01-05 Thread W. Watson
What do I download to use Python with MX XP Pro on an ASUS 4 year old motherboard? I would guess a good book source for starters would be the O'Reilly book. Wayne T. Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)

Re: importing / loading a module / class dynamically

2007-01-05 Thread Laszlo Nagy
hg írta: hg wrote: Hi, I have the following problem. I find in a directory hierarchy some files following a certain sets of rules: .../.../../plugin/name1/name1.py .../.../../plugin/namen/namen.py each file will in turn have a class with the same name as the filename (minus

Re: importing / loading a module / class dynamically

2007-01-05 Thread hg
Laszlo Nagy wrote: .../.../../plugin/name1/name1.py .../.../../plugin/namen/namen.py I block at the beginning and tried this (test.py is a real file) s = 'test.py' eval ('import ' + s) import test.py # This is invalid import test # This MAY be valid import

Re: Just Getting Started with Python on MS XP Pro

2007-01-05 Thread Laszlo Nagy
W. Watson wrote: What do I download to use Python with MX XP Pro on an ASUS 4 year old motherboard? I would guess a good book source for starters would be the O'Reilly book. You mean Microsoft XP Pro? For a beginner, the motherboard does not really matter. First of all, you should

Re: importing / loading a module / class dynamically

2007-01-05 Thread Laszlo Nagy
Thanks, What I am doing is adding plugin support to PyCrust ... so I'm looking for a mechanism where anyone can develop a plugin and have it loaded by pycrust. the .py was a typo why the ...Have at least an empty plugin/name1/__init__.py file... ? When you do import

Re: importing / loading a module / class dynamically

2007-01-05 Thread hg
Laszlo Nagy wrote: Thanks, What I am doing is adding plugin support to PyCrust ... so I'm looking for a mechanism where anyone can develop a plugin and have it loaded by pycrust. the .py was a typo why the ...Have at least an empty plugin/name1/__init__.py file... ? When you do

Dividing integers...Convert to float first?

2007-01-05 Thread redefined . horizons
I'm still pretty new to Python. I'm writing a function that accepts thre integers as arguments. I need to divide the first integer by te second integer, and get a float as a result. I don't want the caller of the function to have to pass floats instead of integers. How do I convert the arguments

Adding a directory to the Python System Path - Edit the registry?

2007-01-05 Thread redefined . horizons
I have been trying to find a way to add a directory to Python's sytem path on my MS Windows XP computer. I did some searching online, but the only solution I found involved editing the MS Windows Registry. That seemed a little to hard core. Is there another easier way to do this? Thanks, Scott

Re: program deployment

2007-01-05 Thread Laszlo Nagy
hehehe, but what I am thinking: Is it somehow possible to _really_ hide the source from being viewed by other persons when using python? Not that I want to do that ( I am an Open Source friend ), but that might get others that rely on that (commercial) to use python for more projects as it

Re: Dividing integers...Convert to float first?

2007-01-05 Thread Thomas Ploch
[EMAIL PROTECTED] schrieb: I'm still pretty new to Python. I'm writing a function that accepts thre integers as arguments. I need to divide the first integer by te second integer, and get a float as a result. I don't want the caller of the function to have to pass floats instead of integers.

Re: Dividing integers...Convert to float first?

2007-01-05 Thread Jonathan Smith
Thomas Ploch wrote: [EMAIL PROTECTED] schrieb: I'm still pretty new to Python. I'm writing a function that accepts thre integers as arguments. I need to divide the first integer by te second integer, and get a float as a result. I don't want the caller of the function to have to pass floats

Re: Encoding / decoding strings

2007-01-05 Thread [EMAIL PROTECTED]
Marc 'BlackJack' Rintsch wrote: In [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: Basically, I want to encode an email address so that it looks something like 8d2e23c0a835598510c88a758c6b215a - this way the user does not know the email address they are looking at. They are public-facing

Re: Dividing integers...Convert to float first?

2007-01-05 Thread Grant Edwards
On 2007-01-05, Jonathan Smith [EMAIL PROTECTED] wrote: from __future__ import division 1/2 0.5 $ python Python 2.4.3 (#1, Dec 10 2006, 22:09:09) [GCC 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)] on linux2 Type help, copyright, credits or license for more information.

Re: MySQLdb windows binaries for Python 2.5?? Yes, but from a World of Warcraft guild.

2007-01-05 Thread [EMAIL PROTECTED]
Anyone have a binary they want to share? /Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Dividing integers...Convert to float first?

2007-01-05 Thread Thomas Ploch
Jonathan Smith schrieb: Thomas Ploch wrote: [EMAIL PROTECTED] schrieb: I'm still pretty new to Python. I'm writing a function that accepts thre integers as arguments. I need to divide the first integer by te second integer, and get a float as a result. I don't want the caller of the function

Re: Adding a directory to the Python System Path - Edit the registry?

2007-01-05 Thread Martin P. Hellwig
[EMAIL PROTECTED] wrote: I have been trying to find a way to add a directory to Python's sytem path on my MS Windows XP computer. I did some searching online, but the only solution I found involved editing the MS Windows Registry. That seemed a little to hard core. Is there another easier way

Re: Dividing integers...Convert to float first?

2007-01-05 Thread Thomas Ploch
Grant Edwards schrieb: On 2007-01-05, Jonathan Smith [EMAIL PROTECTED] wrote: from __future__ import division 1/2 0.5 $ python Python 2.4.3 (#1, Dec 10 2006, 22:09:09) [GCC 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)] on linux2 Type help, copyright, credits or

Re: wxWindows off-screen?

2007-01-05 Thread Michele Petrazzo
Ivan Voras wrote: Is it possible to draw a widget or a window in an off-screen buffer? (Assuming that you are on linux.) wxWigets (wxWindows is the old name) or better, since if you are on a python ng, wxPython :), can't be used if you are on a not-X machine: michele:~$ env | grep DIS

Re: Dividing integers...Convert to float first?

2007-01-05 Thread Simon Brunning
On 1/5/07, Grant Edwards [EMAIL PROTECTED] wrote: from __future__ import LotteryNumbers File stdin, line 1 SyntaxError: future feature LotteryNumbers is not defined Damn. I guess it's back to work then. Remember the PEP 8 module name standards. from __future__ import

Re: Encoding / decoding strings

2007-01-05 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: Basically, what I am trying to do is display all comments by a specified user on the website. As the only thing which has =always= been used to identify users which never changes is their e-mail addresses, this is the only thing which I can use.

Re: Undefined symbol __pure_virtual when importing MySQLdb

2007-01-05 Thread hg
[EMAIL PROTECTED] wrote: I downloaded MySQL-python-1.2.1 from SourceForge and installed it on a Mandrake system (Mandrake Linux 9.2 3.3.1-2mdk on linux2). The installation was successful. The gcc version is 3.3. My Python version is 2.4.2. When I import MySQLdb, I get an error which

  1   2   >