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 "/root/eric/analyza_dat_TPC/htmlgene

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: > > 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 lower-rgb-pl

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 "", line 3, in -toplevel- > _charset='utf-8', > File "C:\Py

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: > > Defin

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

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: > > Defin

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 c

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" [.

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 se

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 -- http://mail.py

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/softwa

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 sourc

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 [1]http://biopython.org

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

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 fetchin

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

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

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

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 para

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 st

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 p

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 its

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 hel

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 >> simpl

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? > >than

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

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

2006-09-11 Thread Bruno Desthuilliers
[EMAIL PROTECTED] wrote: (snip) > Are you saying that MySQL is goofy? ;-) > This is an understatement. -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])" -- http://mail.python.org/mailman/listinfo/python-list

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

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 perfe

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 readlines/writeli

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 -- http://mail.python.org/mailman/listinfo/pyth

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. Sugge

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 some

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), > 7-keto-8-am

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 fi

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? -- http://mail.python.org/ma

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), > 7-keto-8-

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

Re: Python on handhelds

2006-09-11 Thread Luke Dunstan
"Paul Rubin" 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 tha

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 *HIST

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 proces

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 synt

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 th

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 -- http://mail

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 wan

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 (b

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' > > Al

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

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 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 s

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 t

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 >> sum

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 Googl

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: "

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 pyth

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 "whic

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: > > > > 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

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

Re: Problems with email.Generator.Generator

2006-09-11 Thread Chris Withers
Peter Otten wrote: > http://sourceforge.net/tracker/?func=detail&aid=1409455&group_id=5470&atid=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

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 o

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-s

Re: Problems with email.Generator.Generator

2006-09-11 Thread Steve Holden
Chris Withers wrote: > Peter Otten wrote: > >>http://sourceforge.net/tracker/?func=detail&aid=1409455&group_id=5470&atid=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 hopin

Cool! A python course!

2006-09-11 Thread Neal Becker
http://www.epp.jhu.edu/schedule/courseinfo.php?deptid=525&coursenum=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 t

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 the

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 "whic

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 >

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

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 equivalent

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" c

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

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 a

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 usin

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'

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

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. Othe

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: Biop

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 simpl

assistance with python coding

2006-09-11 Thread John Shappell
I don’t 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 do

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 yo

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/475

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

Re: Problems with email.Generator.Generator

2006-09-11 Thread Manlio Perillo
Chris Withers ha scritto: > [...] > > OK, but I fail to see how replacing one unicode error with another is > any help... :-S > The problem is simple: email package does not support well Unicode strings. For now I'm using this: charset = "utf-8" # the charset to be used for email class Head

Re: Python on handhelds

2006-09-11 Thread Bob Greschke
"Luke Dunstan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > "Paul Rubin" 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

  1   2   3   >