Myghty 1.1 Released

2006-09-11 Thread Michael Bayer
Myghty 1.1 Released Myghty is a Python Server Page templating framework designed for large-scale, high availability websites and applications. Its conceptual design and template syntax is derived from HTML::Mason, the popular Perl-based web application platform used by Amazon.com, del.icio.us,

Problems with email.Generator.Generator

2006-09-11 Thread Chris Withers
Hi All, The following piece of code is giving me issues: from email.Charset import Charset,QP from email.MIMEText import MIMEText charset = Charset('utf-8') charset.body_encoding = QP msg = MIMEText( u'Some text with chars that need encoding: \xa3', 'plain', )

Is there a way to take a priori knowledge out of field definitions?

2006-09-11 Thread Hendrik van Rooyen
Hi, It is possible to build a system where the fields are self defining : - One way is to keep a dictionary of tags and descriptors, and to keep the data in a dictionary using the same tags as keys, with values - an oversimplified example: DefinitionDict = {1:'Quantity',2:'Price',3:'Value'}

Re: PyPy with a smaller PVM for the full Python?

2006-09-11 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Casey Hawthorne wrote: Similarly, for JPython (which is at Python 2.2?), could one also use a lot smaller accompanying PVM with the JPython source code and JVM to use Python 2.5 in its entirety? Could you define small? I think the PVM is already quite small. Ciao,

Re: super and __init__

2006-09-11 Thread Michele Simionato
Noah wrote: Am I the only one that finds the super function to be confusing? No, see for instance http://fuhm.net/super-harmful/ Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

import gtk RuntimeError: could not open display

2006-09-11 Thread Petr Jakes
Hi my script is working well when I am running it from the terminal window. While I am trying to start it as a Cron job, I am getting an Error described bellow: My configuration: Pentium III, Python 2.4.1, Fedora Core4 Thanks for your comments. Petr Jakes File

Re: get the en of a program running in background

2006-09-11 Thread awalter1
Thanks a lot. It does exactly what I expected and it's very simple oripel a écrit : Module 'subprocess' may be a better fit for you than fork+exec. Here's an example with a signal handler (1) use subprocess, don't fork and exec (2) maybe this will help: --- import signal, subprocess #

Ann: CoreBio 0.4

2006-09-11 Thread GavinCrooks
Announcing CoreBio 0.4 CoreBio home page: http://code.google.com/p/corebio/ Download: http://corebio.googlecode.com/svn/dist/CoreBio-0.4.1.tar.gz CoreBio is an open source python library for bioinformatics and computational biology, designed to be fast, compact,

Re: Problems with email.Generator.Generator

2006-09-11 Thread Manlio Perillo
Chris Withers ha scritto: Hi All, The following piece of code is giving me issues: from email.Charset import Charset,QP from email.MIMEText import MIMEText charset = Charset('utf-8') charset.body_encoding = QP msg = MIMEText( u'Some text with chars that need encoding: \xa3',

Re: PIL cannot open TIFF image in Windows

2006-09-11 Thread Michele Petrazzo
Rob Williscroft wrote: I downloaded some test images from: url:http://www.remotesensing.org/libtiff/images.html I do the same and modified your code for try FreeImagePy and the results are: ok: 41 error: 20 total: 61 Better than PIL, but a lot of problems with

Re: Problems with email.Generator.Generator

2006-09-11 Thread Chris Withers
Manlio Perillo wrote: Try with: msg = MIMEText( u'Some text with chars that need encoding: \xa3', _charset='utf-8', ) and you will obtain the error: Traceback (most recent call last): File pyshell#4, line 3, in -toplevel- _charset='utf-8', File

Re: Is it just me, or is Sqlite3 goofy?

2006-09-11 Thread Magnus Lycka
[EMAIL PROTECTED] wrote: I think an explanation of how Sqlite3 differs from SQL and a better set of examples is still warranted. In general, Python standard library modules that are wrappers for third party libraries are very thinly documented, and they should probably remain that way, because

Re: [ANN] RuPy 2007 - Python Ruby Conference

2006-09-11 Thread Magnus Lycka
Jakub Piotr Nowak wrote: RuPy 2007 Python Ruby Conference Poznan, Poland April 7-8, 2007 Are you aware of the EuroPython Conference which will take place in Vilnius three months later? -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a way to take a priori knowledge out of field definitions?

2006-09-11 Thread Bruno Desthuilliers
Hendrik van Rooyen wrote: Hi, It is possible to build a system where the fields are self defining : - One way is to keep a dictionary of tags and descriptors, and to keep the data in a dictionary using the same tags as keys, with values - an oversimplified example: DefinitionDict =

Re: Help with ctypes pointer return values

2006-09-11 Thread steve . horsley
Lawrence Oluyede wrote: [EMAIL PROTECTED] wrote: Does anyone have a good idea how I should define recordList so that I can retrieve the record pointers? POINTER(POINTER(c_void)) ? Maybe I misunderstood tough... That's interesting. It had not occurred to me that you could do that. And

Re: Is there a way to take a priori knowledge out of field definitions?

2006-09-11 Thread Steve Holden
Hendrik van Rooyen wrote: Hi, It is possible to build a system where the fields are self defining : - One way is to keep a dictionary of tags and descriptors, and to keep the data in a dictionary using the same tags as keys, with values - an oversimplified example: DefinitionDict =

Re: RuPy 2007 - Python Ruby Conference

2006-09-11 Thread Kay Schluehr
Magnus Lycka wrote: Jakub Piotr Nowak wrote: RuPy 2007 Python Ruby Conference Poznan, Poland April 7-8, 2007 Are you aware of the EuroPython Conference which will take place in Vilnius three months later? If I understand the intention right its kind of a peace pipe cross-community

Re: egg and modpython

2006-09-11 Thread Paul Boddie
Bruno Desthuilliers wrote: Wensheng a écrit : I installed pysqlite2 using easy_install. and got this when using it from modpython: -- Mod_python error: PythonHandler etc.modpython [...] I

Re: What algorithm does Python use to evaluate: if substring in string

2006-09-11 Thread Fredrik Lundh
Tor Erik wrote: I would be surprised if it is the naive: 2.4 and earlier uses that algorithm (but with a better implementation). And naive isn't really the right word here; on average, a brute force search is pretty good for the find/index/in use case. Most fancy algorithms ignore the setup

efficient text file search.

2006-09-11 Thread noro
Is there a more efficient method to find a string in a text file then: f=file('somefile') for line in f: if 'string' in line: print 'FOUND' ? BTW: does for line in f: read a block of line to te memory or is it simply calls f.readline() many times? thanks amit --

Re: efficient text file search.

2006-09-11 Thread Luuk
noro [EMAIL PROTECTED] schreef in bericht news:[EMAIL PROTECTED] Is there a more efficient method to find a string in a text file then: f=file('somefile') for line in f: if 'string' in line: print 'FOUND' yes, more efficient would be: grep (http://www.gnu.org/software/grep/)

Re: Ann: CoreBio 0.4

2006-09-11 Thread km
On 11 Sep 2006 00:59:30 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Announcing CoreBio 0.4 CoreBio home page: http://code.google.com/p/corebio/ Download: http://corebio.googlecode.com/svn/dist/CoreBio-0.4.1.tar.gz CoreBio is an open source python

Re: Ann: CoreBio 0.4

2006-09-11 Thread km
Hi,why are u reinventing the wheel when Biopython[1] is already existing ? is there any specific reason u wanted to develop this CoreBio ? why dont u just extend the existing BioPython package itself ?regards,KM

Re: efficient text file search.

2006-09-11 Thread noro
:) via python... Luuk wrote: noro [EMAIL PROTECTED] schreef in bericht news:[EMAIL PROTECTED] Is there a more efficient method to find a string in a text file then: f=file('somefile') for line in f: if 'string' in line: print 'FOUND' yes, more efficient would be:

strange DOM behaviour when using minidom

2006-09-11 Thread JoReiners
Hello, I have a really strange problem. I'm unable to figure it out on my own. I parse very simple xml documents, without any check for their form. These files look very similar and are encoded in UTF-8. Now minidom is always able to parse these files with minidom.parse(file) . Now when fetching

Re: Looking for the Perfect Editor

2006-09-11 Thread Kent Johnson
Dick Moores wrote: At 06:30 PM 9/10/2006, Kent Johnson wrote: Dick Moores wrote: Also, why do you use TextPad instead of IDLE? You're kidding, right? No. Tell me, please. Macros? Comparing files? What else? OK...please, no one interpret this as IDLE bashing or attempt to show me a better

Re: efficient text file search.

2006-09-11 Thread Luuk
noro [EMAIL PROTECTED] schreef in bericht news:[EMAIL PROTECTED] :) via python... Luuk wrote: noro [EMAIL PROTECTED] schreef in bericht news:[EMAIL PROTECTED] Is there a more efficient method to find a string in a text file then: f=file('somefile') for line in f: if 'string'

Re: efficient text file search.

2006-09-11 Thread Kent Johnson
noro wrote: Is there a more efficient method to find a string in a text file then: f=file('somefile') for line in f: if 'string' in line: print 'FOUND' Probably better to read the whole file at once if it isn't too big: f = file('somefile') data = f.read() if 'string' in data:

Re: get the en of a program running in background

2006-09-11 Thread awalter1
Hi, It works when a click on a button launches a program P. Now, I want that a click on another button launches another program P' In this case there is only one signal for two events : the end of P and the end of P'. How can distinct the two cases. In addition, what is the use of the frame

Re: strange DOM behaviour when using minidom

2006-09-11 Thread JoReiners
Sorry, I just found the error. Simple an empty attribute. Python showed me strange row numbers. I used a multi line initialization of a dict. The error always appeared on the first line although I was on an other line. Interesting behavior. Jonatan JoReiners schrieb: Hello, I have a really

extracting substrings from a file

2006-09-11 Thread sofiafig
Hi, I have a file with several entries in the form: AFFX-BioB-5_at E. coli /GEN=bioB /gb:J04423.1 NOTE=SIF corresponding to nucleotides 2032-2305 of /gb:J04423.1 DEF=E.coli 7,8-diamino-pelargonic acid (bioA), biotin synthetase (bioB), 7-keto-8-amino-pelargonic acid synthetase (bioF), bioC

A cross platform systray icon

2006-09-11 Thread Nick Craig-Wood
Does anyone have some hints / tips / experience with making a cross platform systray icon? It should work on Windows, Gnome and KDE at minimum. I've seen the win32all code which is very similar to the C code I've written before for Windows. It would be a small irritation to have to integrate

inserting into a file

2006-09-11 Thread Sai Krishna M
I want to insert a string in a file after a particular line. I thought of using seek() function but on opening the file in append mode the seek value is undone. One crude idea i had was to read the file in a list and insert the string correspondingly. Is there any other way to do this? Please

Re: SQLwaterheadretard3 (Was: Is it just me, or is Sqlite3 goofy?)

2006-09-11 Thread Bruno Desthuilliers
[EMAIL PROTECTED] wrote: Bruno Desthuilliers wrote: [EMAIL PROTECTED] wrote: Probably just me. I've only been using Access and SQL Server for 12 years, so I'm sure my opinions don't count for anything. SQLite never pretended to be a full-blown RDBMS - just a lightweight simple embedded

Re: efficient text file search.

2006-09-11 Thread Bill Scherer
noro wrote: Is there a more efficient method to find a string in a text file then: f=file('somefile') for line in f: if 'string' in line: print 'FOUND' ? BTW: does for line in f: read a block of line to te memory or is it simply calls f.readline() many times? thanks amit If

Re: efficient text file search.

2006-09-11 Thread Ant
noro wrote: Is there a more efficient method to find a string in a text file then: f=file('somefile') for line in f: if 'string' in line: print 'FOUND' break ^^^ Add a 'break' after the print statement - that way you won't have to read the entire file

Re: Can I make unicode in a repr() print readably?

2006-09-11 Thread Terry Hancock
Martin v. Löwis wrote: Terry Hancock schrieb: Or, put another way, what exactly does 'print' do when it gets a class instance to print? It seems to do the right thing if given a unicode or string object, but I cant' figure out how to make it do the same thing for a class instance. It

Re: Looking for the Perfect Editor

2006-09-11 Thread mystilleef
If you have those requirements installed, it does not need anything else. mystilleef wrote: I recommend Scribes. http://scribes.sf.net Flash Demo: http://scribes.sf.net/snippets.htm GIF Demo: http://www.minds.may.ie/~dez/images/blog/scribes.html Omar wrote: I'd love the perfect editor

Re: inserting into a file

2006-09-11 Thread Fredrik Lundh
Sai Krishna M wrote: One crude idea i had was to read the file in a list and insert the string correspondingly. file systems usually don't support insertion and deletion, so if you want to move things around, you have to do that yourself. reading and writing lists (using

Re: Problems with email.Generator.Generator

2006-09-11 Thread Peter Otten
Chris Withers wrote: The following piece of code is giving me issues: from email.Charset import Charset,QP from email.MIMEText import MIMEText charset = Charset('utf-8') charset.body_encoding = QP msg = MIMEText( u'Some text with chars that need encoding: \xa3', 'plain',

best small database?

2006-09-11 Thread David Isaac
I have no experience with database applications. This database will likely hold only a few hundred items, including both textfiles and binary files. I would like a pure Python solution to the extent reasonable. Suggestions? Thank you, Alan Isaac --

Re: best small database?

2006-09-11 Thread km
checkout gadfly database.regards,KMOn 9/11/06, David Isaac [EMAIL PROTECTED] wrote: I have no experience with database applications.This database will likely hold only a few hundred items,including both textfiles and binary files.I would like a pure Python solution to the extent reasonable.

Re: extracting substrings from a file

2006-09-11 Thread Tim Chase
I have a file with several entries in the form: AFFX-BioB-5_at E. coli /GEN=bioB /gb:J04423.1 NOTE=SIF corresponding to nucleotides 2032-2305 of /gb:J04423.1 DEF=E.coli 7,8-diamino-pelargonic acid (bioA), biotin synthetase (bioB), 7-keto-8-amino-pelargonic acid synthetase

Re: best small database?

2006-09-11 Thread Andre Meyer
buzhug is a nice one: http://buzhug.sourceforge.net/ (not sure about binaries, though).greetingsAndreOn 9/11/06, km [EMAIL PROTECTED] wrote: checkout gadfly database.regards,KMOn 9/11/06, David Isaac [EMAIL PROTECTED] wrote: I have no experience with database applications.This database will

Re: win32service (wxpython) -- i cannot install service

2006-09-11 Thread Larry Bates
I believe you misunderstand services. They don't have user interfaces (UIs) like other programs. They run without any UI as background processes that are in basically in an infinite loop but with a way to break out of the loop (stop service). If you wish to have a background service that has

Re: extracting substrings from a file

2006-09-11 Thread John Machin
[EMAIL PROTECTED] wrote: Hi, I have a file with several entries in the form: AFFX-BioB-5_at E. coli /GEN=bioB /gb:J04423.1 NOTE=SIF corresponding to nucleotides 2032-2305 of /gb:J04423.1 DEF=E.coli 7,8-diamino-pelargonic acid (bioA), biotin synthetase (bioB),

Re: Refactoring Dilemma

2006-09-11 Thread Steven Bethard
Kamilche wrote: Is there any reason NOT to do this that I may be unaware of? [snip] # --- Module 2.py # 'Self' module processing import sys var = 0 self = sys.modules[__name__] def MyRoutine(): self.var = 1 MyRoutine() print var Looks basically fine to me,

Re: best small database?

2006-09-11 Thread Thorsten Kampe
* David Isaac (2006-09-11 14:23 +0100) I have no experience with database applications. This database will likely hold only a few hundred items, including both textfiles and binary files. I would like a pure Python solution to the extent reasonable. Gadfly? --

Re: extracting substrings from a file

2006-09-11 Thread Larry Bates
[EMAIL PROTECTED] wrote: Hi, I have a file with several entries in the form: AFFX-BioB-5_at E. coli /GEN=bioB /gb:J04423.1 NOTE=SIF corresponding to nucleotides 2032-2305 of /gb:J04423.1 DEF=E.coli 7,8-diamino-pelargonic acid (bioA), biotin synthetase (bioB),

Re: inserting into a file

2006-09-11 Thread Larry Bates
Sai Krishna M wrote: I want to insert a string in a file after a particular line. I thought of using seek() function but on opening the file in append mode the seek value is undone. One crude idea i had was to read the file in a list and insert the string correspondingly. Is there any

Re: Python on handhelds

2006-09-11 Thread Luke Dunstan
Paul Rubin http://[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Nick [EMAIL PROTECTED] writes: I have never programmed in Python a day in my life. My group is working on developing an application on the Dell Axim hand held that has a tight deadline. I have heard that Python is

Re: efficient text file search.

2006-09-11 Thread John Machin
Luuk wrote: [snip] some googling turned op the following. Second paragraph of chapter 14 of http://www.amk.ca/python/2.1/ [snip] For a fuller discussion of the line I/O changes, see the python-dev summary for January 1-15, 2001 at http://www.amk.ca/python/dev/2001-01-1.html. That is

Re: get the en of a program running in background

2006-09-11 Thread Damjan
It works when a click on a button launches a program P. Now, I want that a click on another button launches another program P' In this case there is only one signal for two events : the end of P and the end of P'. How can distinct the two cases. Remember the PIDs of the forked procesess

Re: extracting substrings from a file

2006-09-11 Thread Paul McGuire
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I have a file with several entries in the form: AFFX-BioB-5_at E. coli /GEN=bioB /gb:J04423.1 NOTE=SIF corresponding to nucleotides 2032-2305 of /gb:J04423.1 DEF=E.coli 7,8-diamino-pelargonic acid (bioA), biotin synthetase

Re: best small database?

2006-09-11 Thread Larry Bates
David Isaac wrote: I have no experience with database applications. This database will likely hold only a few hundred items, including both textfiles and binary files. I would like a pure Python solution to the extent reasonable. Suggestions? Thank you, Alan Isaac If they are

Re: egg and modpython

2006-09-11 Thread Damjan
I applaud you for studying the traceback in more depth than I can find the motivation for, Bruno. ;-) However, this looks like a program using some package installed by setuptools/easy_install needs to unpack that package when running. See news:[EMAIL PROTECTED] -- damjan --

Re: A cross platform systray icon

2006-09-11 Thread TheSeeker
Nick Craig-Wood wrote: Does anyone have some hints / tips / experience with making a cross platform systray icon? It should work on Windows, Gnome and KDE at minimum. I've seen the win32all code which is very similar to the C code I've written before for Windows. It would be a small

Re: A cross platform systray icon

2006-09-11 Thread Larry Bates
Nick Craig-Wood wrote: Does anyone have some hints / tips / experience with making a cross platform systray icon? It should work on Windows, Gnome and KDE at minimum. I've seen the win32all code which is very similar to the C code I've written before for Windows. It would be a small

Re: best small database?

2006-09-11 Thread Paul Watson
David Isaac wrote: I have no experience with database applications. This database will likely hold only a few hundred items, including both textfiles and binary files. I would like a pure Python solution to the extent reasonable. Suggestions? Thank you, Alan Isaac If you want really

Re: extracting substrings from a file

2006-09-11 Thread Tim Williams
On 11 Sep 2006 05:29:17 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I have a file with several entries in the form: AFFX-BioB-5_at E. coli /GEN=bioB /gb:J04423.1 NOTE=SIF corresponding to nucleotides 2032-2305 of /gb:J04423.1 DEF=E.coli 7,8-diamino-pelargonic acid (bioA),

Re: Simple regex with whitespaces

2006-09-11 Thread Paul McGuire
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, I cannot figure out a way to find a regular expression that would match one and only one of these two strings: s1 = ' how are you' s2 = 'hello world how are you' All I could

Re: efficient text file search.

2006-09-11 Thread noro
can you add some more info, or point me to a link, i havn't found anything about binary search in mmap() in python documents. the files are very big... thanks amit Bill Scherer wrote: noro wrote: Is there a more efficient method to find a string in a text file then: f=file('somefile') for

Re: Algorithm Question

2006-09-11 Thread Neil Cerutti
On 2006-09-10, Andrew McLean [EMAIL PROTECTED] wrote: This really an algorithm question more that a Python question, but it would be implemented in Python In that case, try comp.programming. But still... I have a list of strings, A. I want to find a set of strings B such that for any a

best way of testing a program exists before using it?

2006-09-11 Thread Hari Sekhon
I am writing a wrapper to a binary command to run it and then do something with the xml output from it. What is the best way of making sure that the command is installed on the system before I try to execute it, like the python equivalent of the unix command which? Otherwise I'd have to do

Re: efficient text file search.

2006-09-11 Thread Steve Holden
noro wrote: Bill Scherer wrote: noro wrote: Is there a more efficient method to find a string in a text file then: f=file('somefile') for line in f: if 'string' in line: print 'FOUND' ? BTW: does for line in f: read a block of line to te memory or is it simply calls

Re: efficient text file search.

2006-09-11 Thread Luuk
John Machin [EMAIL PROTECTED] schreef in bericht news:[EMAIL PROTECTED] Luuk wrote: [snip] some googling turned op the following. Second paragraph of chapter 14 of http://www.amk.ca/python/2.1/ [snip] For a fuller discussion of the line I/O changes, see the python-dev summary for

ANN: ChiPy Thurs. September 14, 2006. 7pm @ Google, Chicago

2006-09-11 Thread bray
Chicago Python User Group = Come join us for our best meeting ever! Topics -- * Google Code (Brian Fitzpatrick and Ben Collins-Sussman) * Trac + Subversion + doctests (Garrett Smith) * Special method names for operator overloading (Brian Ray) Location

Re: egg and modpython

2006-09-11 Thread Wensheng
Paul Boddie wrote: Bruno Desthuilliers wrote: Wensheng a écrit : I installed pysqlite2 using easy_install. and got this when using it from modpython: -- Mod_python error: PythonHandler

Re: best small database?

2006-09-11 Thread Laurent Pointal
David Isaac a écrit : I have no experience with database applications. This database will likely hold only a few hundred items, including both textfiles and binary files. I would like a pure Python solution to the extent reasonable. Suggestions? May take a look at buzhug (very pythonic

Re: best way of testing a program exists before using it?

2006-09-11 Thread Steve Holden
Hari Sekhon wrote: I am writing a wrapper to a binary command to run it and then do something with the xml output from it. What is the best way of making sure that the command is installed on the system before I try to execute it, like the python equivalent of the unix command which?

Re: PIL cannot open TIFF image in Windows

2006-09-11 Thread Iain King
Michele Petrazzo wrote: Rob Williscroft wrote: I downloaded some test images from: url:http://www.remotesensing.org/libtiff/images.html I do the same and modified your code for try FreeImagePy and the results are: ok: 41 error: 20 total: 61 Better than PIL, but

Re: best small database?

2006-09-11 Thread Aahz
In article [EMAIL PROTECTED], Paul Watson [EMAIL PROTECTED] wrote: David Isaac wrote: I have no experience with database applications. This database will likely hold only a few hundred items, including both textfiles and binary files. I would like a pure Python solution to the extent

Re: Problems with email.Generator.Generator

2006-09-11 Thread Chris Withers
Peter Otten wrote: http://sourceforge.net/tracker/?func=detailaid=1409455group_id=5470atid=105470 Now, is this change to Generator.py in error or am I doing something wrong? I'm not familiar enough with the email package to answer that. I'm hoping someone around here is ;-) If the latter,

Re: best way of testing a program exists before using it?

2006-09-11 Thread Hari Sekhon
Steve Holden wrote: Hari Sekhon wrote: I am writing a wrapper to a binary command to run it and then do something with the xml output from it. What is the best way of making sure that the command is installed on the system before I try to execute it, like the python equivalent

Re: best way of testing a program exists before using it?

2006-09-11 Thread Rob Wolfe
Hari Sekhon wrote: I am writing a wrapper to a binary command to run it and then do something with the xml output from it. What is the best way of making sure that the command is installed on the system before I try to execute it, like the python equivalent of the unix command which?

Re: Algorithm Question

2006-09-11 Thread Carl Banks
Andrew McLean wrote: I have a list of strings, A. I want to find a set of strings B such that for any a in A there exists b in B such that b is a sub-string of a. B=A? But I also want to minimise T = sum_j t_j where t_j = count of the number of elements in A which have b[j] as a sub-string

Re: Problems with email.Generator.Generator

2006-09-11 Thread Steve Holden
Chris Withers wrote: Peter Otten wrote: http://sourceforge.net/tracker/?func=detailaid=1409455group_id=5470atid=105470 Now, is this change to Generator.py in error or am I doing something wrong? I'm not familiar enough with the email package to answer that. I'm hoping someone around here

Cool! A python course!

2006-09-11 Thread Neal Becker
http://www.epp.jhu.edu/schedule/courseinfo.php?deptid=525coursenum=492 -- http://mail.python.org/mailman/listinfo/python-list

RE: best way of testing a program exists before using it?

2006-09-11 Thread Tim Golden
[Rob Wolfe] | Hari Sekhon wrote: | I am writing a wrapper to a binary command to run it and then do | something with the xml output from it. | | What is the best way of making sure that the command is | installed on the | system before I try to execute it, like the python equivalent of the |

Re: best way of testing a program exists before using it?

2006-09-11 Thread Hari Sekhon
Rob Wolfe wrote: Hari Sekhon wrote: I am writing a wrapper to a binary command to run it and then do something with the xml output from it. What is the best way of making sure that the command is installed on the system before I try to execute it, like the python equivalent of

Re: best way of testing a program exists before using it?

2006-09-11 Thread Steven Bethard
Hari Sekhon wrote: I am writing a wrapper to a binary command to run it and then do something with the xml output from it. What is the best way of making sure that the command is installed on the system before I try to execute it, like the python equivalent of the unix command which?

Behaviour of classes (tired of writing too much)

2006-09-11 Thread mpn
How do I catch any reference to an instance of a class, i.e., I want to run some code as soon as an instance of a class is used in any way. (and I don't want to define all of __add__, __ge__ etc etc etc etc etc) The reason for the question is that I want to simplify the Message Passing Interface

Re: best way of testing a program exists before using it?

2006-09-11 Thread Steve Holden
Rob Wolfe wrote: Hari Sekhon wrote: I am writing a wrapper to a binary command to run it and then do something with the xml output from it. What is the best way of making sure that the command is installed on the system before I try to execute it, like the python equivalent of the unix command

Re: best way of testing a program exists before using it?

2006-09-11 Thread Steve Holden
Hari Sekhon wrote: Steve Holden wrote: Hari Sekhon wrote: I am writing a wrapper to a binary command to run it and then do something with the xml output from it. What is the best way of making sure that the command is installed on the system before I try to execute it, like the python

Re: best way of testing a program exists before using it?

2006-09-11 Thread Hari Sekhon
Steven Bethard wrote: Hari Sekhon wrote: I am writing a wrapper to a binary command to run it and then do something with the xml output from it. What is the best way of making sure that the command is installed on the system before I try to execute it, like the python

Re: Problems with email.Generator.Generator

2006-09-11 Thread Gerard Flanagan
Chris Withers wrote: Now, I want to know what I'm supposed to do when I have unicode source and want it to end up as either a text/plain or text/html mime part. Is there a how-to for this anywhere? The email package's docs are short on examples involving charsets, unicode and the like :-(

Re: PyPy with a smaller PVM for the full Python?

2006-09-11 Thread John Roth
Casey Hawthorne wrote: Currently PyPy is working toward compiling to C a restricted subset of Python, called RPython. Would it be possible for PyPy to compile the full subset of Python by also using a lot smaller version of the PVM (Python Virtual Machine) to go with the compiled code? So,

Re: best way of testing a program exists before using it?

2006-09-11 Thread Tim Williams
On 11/09/06, Hari Sekhon [EMAIL PROTECTED] wrote: Steve Holden wrote: Hari Sekhon wrote: The easiest way to test whether the command will run is to try and run it. If the program doesn't exist then you'll get an exception, which you can catch. Otherwise you'll be stuck with non-portable

Re: Behaviour of classes (tired of writing too much)

2006-09-11 Thread Brian Quinlan
[EMAIL PROTECTED] wrote: How do I catch any reference to an instance of a class, i.e., I want to run some code as soon as an instance of a class is used in any way. (and I don't want to define all of __add__, __ge__ etc etc etc etc etc) What do you mean by used in any way? Which of these are

Re: best way of testing a program exists before using it?

2006-09-11 Thread Tim Chase
Erm, but don't you *have* to run the program anyway to produce the required XML output? So, if the attempt to run it fails then you know it isn't installed, and if it succeeds then you should have the required output (I'm presuming either the output will appear in a file or you'll be using

Re: best small database?

2006-09-11 Thread Paul McGuire
Aahz [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] In article [EMAIL PROTECTED], Once Python 2.5 comes out, I recommend using sqlite because it avoids the mess that dbm can cause. -- Aahz ([EMAIL PROTECTED]) * http://www.pythoncraft.com/ and if you don't want to

Re: Is it just me, or is Sqlite3 goofy?

2006-09-11 Thread Gerhard Häring
Kay Schluehr wrote: [EMAIL PROTECTED] wrote: I wouldn't be at all surprised if the pysqlite author operated under that assumption. That the Python developers didn't pick up on the issue is not surprising. I'm not sure how many of them are (py)sqlite users, probably relatively few. Skip

Re: best way of testing a program exists before using it?

2006-09-11 Thread Hari Sekhon
Tim Williams wrote: On 11/09/06, Hari Sekhon [EMAIL PROTECTED] wrote: Steve Holden wrote: Hari Sekhon wrote: The easiest way to test whether the command will run is to try and run it. If the program doesn't exist then you'll get an exception, which you can catch. Otherwise you'll be

Re: Ann: CoreBio 0.4

2006-09-11 Thread GavinCrooks
km wrote: Hi, why are u reinventing the wheel when Biopython[1] is already existing ? is there any specific reason u wanted to develop this CoreBio ? why dont u just extend the existing BioPython package itself ? regards, KM [1]http://biopython.org [EMAIL PROTECTED] wrote: Biopython is

Re: Behaviour of classes (tired of writing too much)

2006-09-11 Thread Steve Holden
[EMAIL PROTECTED] wrote: How do I catch any reference to an instance of a class, i.e., I want to run some code as soon as an instance of a class is used in any way. (and I don't want to define all of __add__, __ge__ etc etc etc etc etc) The reason for the question is that I want to simplify

assistance with python coding

2006-09-11 Thread John Shappell
I dont understand what this question is asking; can you clarify for me and maybe point me in the right direction? As an exercise, rewrite this line of code without using a sequence assignment. self.cards[i], self.cards[j] = self.cards[j], self.cards[i] V/R CW2 John Shappell

Re: best way of testing a program exists before using it?

2006-09-11 Thread Tim Williams
On 11/09/06, Hari Sekhon [EMAIL PROTECTED] wrote: Tim Williams wrote: On 11/09/06, Hari Sekhon [EMAIL PROTECTED] wrote: Steve Holden wrote: Hari Sekhon wrote: The easiest way to test whether the command will run is to try and run it. If the program doesn't exist then you'll get

Re: A cross platform systray icon

2006-09-11 Thread Nick Craig-Wood
TheSeeker [EMAIL PROTECTED] wrote: Nick Craig-Wood wrote: Does anyone have some hints / tips / experience with making a cross platform systray icon? It should work on Windows, Gnome and KDE at minimum. You might do a search for TaskBarIcon in the wxPython toolkit. Yes thank you (and

Re: A cross platform systray icon

2006-09-11 Thread Nick Craig-Wood
Larry Bates [EMAIL PROTECTED] wrote: Google turned this up. http://radio.weblogs.com/0110159/gems/systray_py.txt I couldn't get that to work - wxwindows bitrot maybe? I did find an example which worked under windows linux http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/475155

Re: get the en of a program running in background

2006-09-11 Thread awalter1
Hi, I am using subprocess module, then I do not fork my program. How use os.wait() in a non blocking mode ? Thanks Damjan wrote: It works when a click on a button launches a program P. Now, I want that a click on another button launches another program P' In this case there is only one

  1   2   3   >