Re: How to write python plug-ins for your own python program?

2005-03-03 Thread hemanth
Andre wrote: > Mark Rowe <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > > On Mar 3, 2005, at 9:33 PM, Simon Wittber wrote: > > > > >> You mean like 'import'? :) > > > > > > That's how I would do it. It's the simplest thing, that works. > > > > > > exec("import %s as plugin" % pl

ANN: gdmodule 0.54

2005-03-03 Thread Chris Gonnerman
Announcing the release of version 0.54 of the gdmodule for Python. gdmodule is the "standard" module providing access to Thomas Boutell's GD "Graphics Drawing" library. This release includes many bugfixes, and paves the way for another update in the near future to support the newest GD versions. T

Re: Text To Speech with pyTTS

2005-03-03 Thread Peter
I released a new version of the Windows installer for Python 2.3 that includes the missing _TTSFast.pyd file. Peter Hansen wrote: > Mike P. wrote: > > I was wondering if anyone has had any luck with the python text to speech > > (pyTTS) module available on Sourceforge: > > http://sourceforge.net/

Re: Explicit or general importing of namespaces?

2005-03-03 Thread Peter Hansen
Peter Mayne wrote: Peter Hansen wrote: and it's still a bad idea in almost all cases anyway Since I've been playing with PyQt lately... Is qt not one of the "almost all" cases? From the limited number of examples I've seen, it seems to be common to do from qt import * This sort of thing seems com

Final PyCon Keynote from Google Speaker

2005-03-03 Thread Steve Holden
Dear Python Colleague: I am happy to say that we have now completed the PyCon DC 2005 keynote speaker lineup, and that the final keynote will be given by Greg Stein, an engineering manager wirh Google's Blogger group, who will be speaking on "Python at Google" Greg is also known to many in the o

Re: Need help

2005-03-03 Thread Peter Hansen
[EMAIL PROTECTED] wrote: It sounds to me like they just don't have the correct hostname (or their DNS service is down). Again, this could be seen from answering the above questions. Hmm what can be seen from reading Brian's message is that it clearly cannot be a simple matter of incorrect host

Re: Initializing subclasses of tuple

2005-03-03 Thread Steven Bethard
Nick Coghlan wrote: Any volunteers out there willing to put some words about __new__ together for the main Python docs, please consider posting them on SF :) Done. http://sourceforge.net/tracker/?func=detail&aid=1156412&group_id=5470&atid=105470 STeVe -- http://mail.python.org/mailman/listinfo/pyt

Re: How would you program this?

2005-03-03 Thread engsol
On Thu, 03 Mar 2005 19:32:19 -0700, Steven Bethard <[EMAIL PROTECTED]> wrote: >engsol wrote: >> I don't fully understand this line of your code: >> return [(a,b,c) for a in ns for b in ns for c in ns if a + b + c == limit] >> If the "if" part is true, does it 'trigger' the return? > >This code i

RE: convert a list to a string?

2005-03-03 Thread Anthony Liu
Oh, yes, that's a cool function! I did that before but have forgotten. Thanks a lot! --- Tony Meyer <[EMAIL PROTECTED]> wrote: > > Suppose I have a list > > > > myList = ["this", "is", "a", "sample", "list"] > > > > If I don't want to iterate through it and > concatenate > > the list elements

Re: convert a list to a string?

2005-03-03 Thread Roy Smith
Anthony Liu <[EMAIL PROTECTED]> wrote: > Suppose I have a list > > myList = ["this", "is", "a", "sample", "list"] > > If I don't want to iterate through it and concatenate > the list elements, how do I easily convert it to a > string like > > "this is a sample list" You want: >>> myList = ["

RE: convert a list to a string?

2005-03-03 Thread Tony Meyer
> Suppose I have a list > > myList = ["this", "is", "a", "sample", "list"] > > If I don't want to iterate through it and concatenate > the list elements, how do I easily convert it to a > string like > > "this is a sample list" " ".join(myList) =Tony.Meyer -- http://mail.python.org/mailman/

Re: jython question (interesting behavior)

2005-03-03 Thread Kent Johnson
pythonUser_07 wrote: Is this the correct place to post a jython question? I posted the following in the jython group, but I figured I'd post here too: _ I am assuming that the PythonInterpreter environment is not a unique environment from within a jvm. Here i

Virus Quarantine Notification

2005-03-03 Thread NetCarrier Virus Filter
Dear python-list@python.org, Do not reply to this message. An email message you sent to [EMAIL PROTECTED] with the subject "Returned mail: see transcript for details" appears to contain a virus and has been quarantined for everyone's safety. If you have any questions, please contact us at [EMAIL

convert a list to a string?

2005-03-03 Thread Anthony Liu
Suppose I have a list myList = ["this", "is", "a", "sample", "list"] If I don't want to iterate through it and concatenate the list elements, how do I easily convert it to a string like "this is a sample list" str(myList) will only give you things like "["this", "is", "a", "sample", "list"]"

Re: Grid not getting updated

2005-03-03 Thread Gensek
Thanks. It seems to be working. -- http://mail.python.org/mailman/listinfo/python-list

Re: There's GOT to be a better way!

2005-03-03 Thread Kent Johnson
[EMAIL PROTECTED] wrote: This would be a good case to use OO design, imo. The following works fine. Simply instantiate the object, call the method, and you can access (and manipulate) the "module's" variable to your heart's content. module.py class object: Ouch. Use a different name than

Re: winnt win32process.createProcess with stdout to file ?

2005-03-03 Thread Roger Upole
If it got past the CreateFile call, the problem's not with the log file. This error from CreateProcess means it can't find your executable. Roger <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Roger, I updated the script (below).. but now I get errors... > many thanks f

Re: Multiline regex help

2005-03-03 Thread Kent Johnson
Steven Bethard wrote: Kent Johnson wrote: for line in raw_data: if line.startswith('RelevantInfo1'): info1 = raw_data.next().strip() elif line.startswith('RelevantInfo2'): info2 = raw_data.next().strip() elif line.startswith('RelevantInfo3'): info3 = raw_data.nex

Re: What is the best way to handle a command line argument that includes an escape sequence like \n?

2005-03-03 Thread Joe
Hey no fair changing last names in the middle of a thread :-) Thanks to BOTH Steve's. > In fairness it was Steven Bethard's solution that gave you the solution > you needed. As long as ytour problem is solved, that's fine, and it > appears that you've solved it in a reasonably cross-platform w

Re: How would you program this?

2005-03-03 Thread Steven Bethard
engsol wrote: I don't fully understand this line of your code: return [(a,b,c) for a in ns for b in ns for c in ns if a + b + c == limit] If the "if" part is true, does it 'trigger' the return? This code is basically equivalent to: lc = [] for a in ns: for b in ns: for c in ns:

Re: creating .NET clients with python

2005-03-03 Thread Luis M. Gonzalez
At this time, Ironpython is in pre-alpha state, not suitable for production work. However, we will have news about it in the next Pycon 2005, which will be held by the end of March. -- http://mail.python.org/mailman/listinfo/python-list

Re: winnt win32process.createProcess with stdout to file ?

2005-03-03 Thread david . humpherys
Roger, I updated the script (below).. but now I get errors... many thanks for your help. import win32process, win32file, win32security, win32con, win32api, thread, win32event, win32pipe cmd = "c:/myexe.exe" sa = win32security.SECURITY_ATTRIBUTES() sa.bInheritHandle = 1 startInfo = win32process.S

Re: How to write python plug-ins for your own python program?

2005-03-03 Thread Andre
Mark Rowe <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > On Mar 3, 2005, at 9:33 PM, Simon Wittber wrote: > > >> You mean like 'import'? :) > > > > That's how I would do it. It's the simplest thing, that works. > > > > exec("import %s as plugin" % pluginName) > > plugin.someMet

Re: How would you program this?

2005-03-03 Thread engsol
On Thu, 3 Mar 2005 15:32:36 -0500, Bill Mill <[EMAIL PROTECTED]> wrote: >On Thu, 03 Mar 2005 10:52:23 -0800, engsol <[EMAIL PROTECTED]> wrote: >> >> The diagonal constraint is interestingit seems to affect the number of >> solutions. One surprise, (not being a math major), was that when I let

BayPIGgies: March 10, 7:30pm (FINAL MEETING AT STANFORD)

2005-03-03 Thread Aahz
WARNING: the last meeting of BayPIGgies at Stanford is currently scheduled for March. Our host, Danny Yoo, is leaving Stanford, and we need to find a new location. If you wish to assist with the search, please join the BayPIGgies mailing list. Meanwhile, let's all give hearty thanks to Danny for

Re: tkinter absorb chars

2005-03-03 Thread phil
Jeff Epler wrote: On Wed, Mar 02, 2005 at 04:58:03PM -0600, phil wrote: Sorry for the repost, but moderator jeld the last one, We saw both posts. In a Tkinter entry field (or Pmw entry) how could I eat charactres? create a binding on the widget for the particular character you want to treat specia

Re: Explicit or general importing of namespaces?

2005-03-03 Thread Peter Mayne
Peter Hansen wrote: In general, unless the names being imported are *guaranteed* never to be rebound, it is a very bad idea to use "import *", and it's still a bad idea in almost all cases anyway, for reasons already given by others. Since I've been playing with PyQt lately... Is qt not one of the

Re: creating .NET clients with python

2005-03-03 Thread yaipa
> >> Can anyone confirm if there is a python library that > >> can allow me to create .NET clients in python. Sorry, the term 'clients' throws me in this case. PythonNet allows you to call .Net, but not the other way 'round. So, IronPython would be it if that is what you want to do. Cheers, -

Re: Need help

2005-03-03 Thread [EMAIL PROTECTED]
I doubt it's a hardware issue... If these people have any knowledge of computers, they would try connecting to other places to see if it gives them the same error. It sounds obvious, but have them ping your DNS alias as well as your IP address. If they can't get anywhere else, then it's a local h

Re: jython question (interesting behavior)

2005-03-03 Thread pythonUser_07
Hmm, now that I think about this, maybe it's not so crazy. It would be the equivalent of modifying a static variable in the same JVM. Sorry to bother. -- http://mail.python.org/mailman/listinfo/python-list

Re: winnt win32process.createProcess with stdout to file ?

2005-03-03 Thread Roger Upole
You'll need to pass security attributes with inherit=True to CreateProcess also, and the file has to be opened with sharing. (win32file.FILE_SHARE_READ|win32file.FILE_SHARE_WRITE) Also, you shouldn't have FILE_FLAG_OVERLAPPED set if you're not passing an overlapped object into CreateFile. hth

Re: There's GOT to be a better way!

2005-03-03 Thread [EMAIL PROTECTED]
This would be a good case to use OO design, imo. The following works fine. Simply instantiate the object, call the method, and you can access (and manipulate) the "module's" variable to your heart's content. module.py class object: def __init__(self):

jython question (interesting behavior)

2005-03-03 Thread pythonUser_07
Is this the correct place to post a jython question? I posted the following in the jython group, but I figured I'd post here too: _ I am assuming that the PythonInterpreter environment is not a unique environment from within a jvm. Here is some pseudo code

Re: There's GOT to be a better way!

2005-03-03 Thread Earl Eiland
On Thu, 2005-03-03 at 16:46, Steven Bethard wrote: > Earl Eiland wrote: > > module.py > > def A(): > > test = 1 > > for x in range(10): B() > > > > def B(): > > test = test + 1 > > > > > > main.py > > import module > > module.A() > > > > T

Re: There's GOT to be a better way!

2005-03-03 Thread Earl Eiland
On Thu, 2005-03-03 at 16:43, Steve Holden wrote: > Earl Eiland wrote: > > On Thu, 2005-03-03 at 15:11, Steve Holden wrote: > > > >>Earl Eiland wrote: > >> > >>>I'm writing my first program where I call custom modules. The 'global' > >>>command doesn't seem to apply, so how do I change a variable

Re: There's GOT to be a better way!

2005-03-03 Thread Steven Bethard
Earl Eiland wrote: module.py def A(): test = 1 for x in range(10): B() def B(): test = test + 1 main.py import module module.A() This will fail, unless test is passed and returned. (Sorry if this sent twice. I

Re: winnt win32process.createProcess with stdout to file ?

2005-03-03 Thread Peter Hansen
[EMAIL PROTECTED] wrote: os:winnt python2.3.2 I have a exe that dumps info to the command line. I want to run this process and capture the stdout into a file. I think i'm close... any help appreciated. Use the standard "subprocess" module that comes in Python2.4. Or, if you can't upgrade for som

Re: There's GOT to be a better way!

2005-03-03 Thread Steve Holden
Earl Eiland wrote: On Thu, 2005-03-03 at 15:11, Steve Holden wrote: Earl Eiland wrote: I'm writing my first program where I call custom modules. The 'global' command doesn't seem to apply, so how do I change a variable internally in a module without passing it down n layers, and then back out agai

Re: newbie, help with pythonpath

2005-03-03 Thread Peter Hansen
Eduardo Suarez wrote: In order not to make a mess my system, i have installed a packaged called pygtkglext in /usr/local/pygtkglext instead of /usr/local (using the --prefix in ./configure). Hence, i have the directories /usr/local/pygtkglext-1.0.1/lib/python2.3/site-packages/gtk-2.0/gtk/gtkgl /

Re: file.getvalue() with _ or other characters

2005-03-03 Thread Peter Hansen
[EMAIL PROTECTED] wrote: I did this but don't work: It is quite possible I misunderstood the problem you were having. I am familiar with a problem with StringIO whereby if you call close() on it, you can no longer call getvalue() afterwards. Perhaps that's not the problem you were seeing. Can you

Re: windows bat file question

2005-03-03 Thread Peter Hansen
Duncan Booth wrote: Peter Hansen wrote: This should make it work: python %0.bat %* Only, among other issues, if you type the full path to the batch file, or if it's in the current directory. This approach fails if you put the batch file in a directory somewhere along your path. The simplest fix,

Re: Gordon McMillan installer and Python 2.4

2005-03-03 Thread Peter Hansen
Richie Hindle wrote: [Svein] According to the command line help for cx_Freeze and py2exe, they cannot pack my program with additional installation files into one self-extracting .exe file (which is what I want to do). [Peter] On the other hand, there are readily available utilities that will do wha

Re: creating .NET clients with python

2005-03-03 Thread Guy Robinson
Thanks Alan, Are you saying I can create python .net clients with PythonNet. My understanding is I can only use .net clients from python not the other way around. Do you have an example showing creating a .net client in python? regards, Guy yaipa wrote: Guy, I can tell you that pythonNet is quite

Re: creating .NET clients with python

2005-03-03 Thread yaipa
Guy, I can tell you that pythonNet is quite far along, rel 1, Beta 4 actually. here is a c.l.p link to the three major releases. http://groups-beta.google.com/group/comp.lang.python/browse_frm/thread/ddfc68767901007c/445f2052948d93e2?q=pythonnet&_done=%2Fgroup%2Fcomp.lang.python%2Fsearch%3Fgroup

Re: There's GOT to be a better way!

2005-03-03 Thread Earl Eiland
On Thu, 2005-03-03 at 15:11, Steve Holden wrote: > Earl Eiland wrote: > > I'm writing my first program where I call custom modules. The 'global' > > command doesn't seem to apply, so how do I change a variable internally > > in a module without passing it down n layers, and then back out again? >

Re: Help- Recursion v. Iter Speed comparison

2005-03-03 Thread Robert Kern
actuary77 wrote: Robert Kern wrote: actuary77 wrote: # # non-generator # def f1(afunc,aseed,n): values = [afunc(aseed)] for i in range(n-1): values.append(afunc(values[-1])) return v

Re: binutils "strings" like functionality?

2005-03-03 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, cjl wrote: > I am working on a little script that needs to pull the strings out of a > binary file, and then manipulate them with python. > > The command line utility "strings" (part of binutils) has exactly the > functionality I need, but I was thinking about trying to im

Re: problem with recursion

2005-03-03 Thread Steve Holden
vegetax wrote: How can i use a counter inside the recursive function? This code gives me the error 'local variable 'c' referenced before assignment' I really don't think it does. I'd believe "local variable 'COUNTER' referenced before assignment". Rule one: always copy and paste the traceback ...

Re: Multiline regex help

2005-03-03 Thread Steven Bethard
Kent Johnson wrote: for line in raw_data: if line.startswith('RelevantInfo1'): info1 = raw_data.next().strip() elif line.startswith('RelevantInfo2'): info2 = raw_data.next().strip() elif line.startswith('RelevantInfo3'): info3 = raw_data.next().strip() sc

winnt win32process.createProcess with stdout to file ?

2005-03-03 Thread david . humpherys
os:winnt python2.3.2 I have a exe that dumps info to the command line. I want to run this process and capture the stdout into a file. I think i'm close... any help appreciated. dh -- import win32process, win32file, win32se

Re: Ruby on Rails or Perl's Maypole..is there a Python equivalent

2005-03-03 Thread Steve Holden
Gary Nutbeam wrote: I count zpt as xml because page templates can operate in html or xml mode. This is not a troll. It is a lot of work in Zope to create interfaces to relational data for anything more than simple data models. It's a lot less work in Maypole or Rails, but I don't want to go back

Re: Call variable as a function

2005-03-03 Thread Steve Holden
Chmouel Boudjnah wrote: Steve Holden wrote: But it depends how you are creating the reference to the function. The above is required if all you have is a string, but it would also be possible to set the variable to the function rather than the function's name >>> var = test >>> var() hello >>

Re: Help- Recursion v. Iter Speed comparison

2005-03-03 Thread actuary77
Robert Kern wrote: actuary77 wrote: # # non-generator # def f1(afunc,aseed,n): values = [afunc(aseed)] for i in range(n-1): values.append(afunc(values[-1])) return values[-1] _b=time

Re: py2exe

2005-03-03 Thread D H
[EMAIL PROTECTED] wrote: I'm a newbie at programmin. I've downloaded Python and am going through "How to think like a computer scientist". I've also downloaded py2exe and I don't really know how to use it. For one what is the disutil? thanks for the help yall. You'll get better help for beginner qu

Re: problem with recursion

2005-03-03 Thread vegetax
How can i use a counter inside the recursive function? This code gives me the error 'local variable 'c' referenced before assignment' #!/usr/bin/python from os import listdir from os.path import isdir,join,basename import HTMLgen dirpath = '/devel/python/html/test' COUNTER = 0 def rec(

Re: newbie, help with pythonpath

2005-03-03 Thread Chmouel Boudjnah
Eduardo Suarez wrote: I'm trying to set the python path variable so i can use them, but i haven't got it. Any hint? sys.path.append('/usr/blah/blah/blah/directory') -- http://mail.python.org/mailman/listinfo/python-list

Re: There's GOT to be a better way!

2005-03-03 Thread Steve Holden
Earl Eiland wrote: I'm writing my first program where I call custom modules. The 'global' command doesn't seem to apply, so how do I change a variable internally in a module without passing it down n layers, and then back out again? You are correct in assuming that global isn't what you want - it

Re: yield_all needed in Python

2005-03-03 Thread Jeremy Bowers
On Thu, 03 Mar 2005 20:47:42 +, Paul Moore wrote: > This can probably be tidied up and improved, but it may be a > reasonable workaround for something like the original example. This is why even though in some sense I'd love to see yield *expr, I can't imagine it's going to get into the langua

Re: Ruby on Rails or Perl's Maypole..is there a Python equivalent

2005-03-03 Thread Gary Nutbeam
Thanks for the feedback. I should have been more specific though and mentioned this has done on Linux (client and server). D H wrote: > Gary Nutbeam wrote: > >> I've noticed that the Perl camp has a very nice web/database environment >> called Maypole. Ruby has the Rails environment which on the

Re: Call variable as a function

2005-03-03 Thread Steve Holden
Chmouel Boudjnah wrote: Hey, It's look simple for most of the people here but i can't figure out to that. If i have : def test(): print "foo" and: var = "test" how do i call function test from var, kind of ${$var} in some others languages (or eval()) There's always a way: >>> def test(): ..

Re: Ruby on Rails or Perl's Maypole..is there a Python equivalent

2005-03-03 Thread Gary Nutbeam
I count zpt as xml because page templates can operate in html or xml mode. This is not a troll. It is a lot of work in Zope to create interfaces to relational data for anything more than simple data models. It's a lot less work in Maypole or Rails, but I don't want to go back to writing in Perl,

Re: problem with recursion

2005-03-03 Thread vegetax
Alexander Zatvornitskiy wrote: > ?? vegetax! > > 03 ? 2005 ? 13:54, vegetax ? ? ?? ? All ?: > > v> I need this in order to print a directory tree with htmlgen library > v> which uses nested lists to represent trees. > As you see from output of your code, you simply add item

Re: py2exe

2005-03-03 Thread Andrew Dalke
> On 3 Mar 2005 11:06:58 -0800, [EMAIL PROTECTED] wrote: >> How did we ever live without Google? On Thu, 03 Mar 2005 21:48:27 +0100, BOOGIEMAN wrote: > We used Yahoo (and still using it) Altavista. Lycos. Veronica on gopher. Archie on telnet. Lists of anonymous ftp sites (like http://thprox

There's GOT to be a better way!

2005-03-03 Thread Earl Eiland
I'm writing my first program where I call custom modules. The 'global' command doesn't seem to apply, so how do I change a variable internally in a module without passing it down n layers, and then back out again? Earl -- http://mail.python.org/mailman/listinfo/python-list

Re: Ruby on Rails or Perl's Maypole..is there a Python equivalent

2005-03-03 Thread D H
Gary Nutbeam wrote: I've noticed that the Perl camp has a very nice web/database environment called Maypole. Ruby has the Rails environment which on the surface seems similar to Maypole. I can't find anything in Python that ties a database to a web interface anywhere near as well as Ruby on Rails o

newbie, help with pythonpath

2005-03-03 Thread Eduardo Suarez
Hi all, In order not to make a mess my system, i have installed a packaged called pygtkglext in /usr/local/pygtkglext instead of /usr/local (using the --prefix in ./configure). Hence, i have the directories /usr/local/pygtkglext-1.0.1/lib/python2.3/site-packages/gtk-2.0/gtk/gtkgl /usr/local/pygt

Call variable as a function

2005-03-03 Thread Chmouel Boudjnah
Hey, It's look simple for most of the people here but i can't figure out to that. If i have : def test(): print "foo" and: var = "test" how do i call function test from var, kind of ${$var} in some others languages (or eval()) Cheers, Chmouel. -- http://mail.python.org/mailman/listinfo/py

Re: creating .NET clients with python

2005-03-03 Thread D H
Guy Robinson wrote: Hello, Can anyone confirm if there is a python library that can allow me to create .NET clients in python. My understanding is both IronPython and python for .NET can't create python .net clients? Correct, although IronPython may work one day. -- http://mail.python.org/mailma

Re: Multiline regex help

2005-03-03 Thread Yatima
On Thu, 3 Mar 2005 12:26:37 -0800, James Stroud <[EMAIL PROTECTED]> wrote: > Have a look at "martel", part of biopython. The world of bioinformatics is > filled with files with structure like this. > > http://www.biopython.org/docs/api/public/Martel-module.html > > James Thanks for the link. Stev

Re: Multiline regex help

2005-03-03 Thread Yatima
On Thu, 03 Mar 2005 16:25:39 -0500, Kent Johnson <[EMAIL PROTECTED]> wrote: > Here is another attempt. I'm still not sure I understand what form you want > the data in. I made a > dict -> dict -> list structure so if you lookup e.g. scores['10/11/04']['60'] > you get a list of all > the Relevan

Re: Multiline regex help

2005-03-03 Thread Yatima
On Thu, 03 Mar 2005 13:45:31 -0700, Steven Bethard <[EMAIL PROTECTED]> wrote: > > I think if you use the non-greedy .*? instead of the greedy .*, you'll > get this behavior. For example: > > py> s = """\ > ... Gibberish > ... 53 > ... MoreGarbage > [snip a whole bunch of stuff] > ... RelevantInfo

Re: Ruby on Rails or Perl's Maypole..is there a Python equivalent

2005-03-03 Thread Bruno Desthuilliers
Gary Nutbeam a écrit : I've noticed that the Perl camp has a very nice web/database environment called Maypole. Ruby has the Rails environment which on the surface seems similar to Maypole. I can't find anything in Python that ties a database to a web interface anywhere near as well as Ruby on Rail

Re: Multiline regex help

2005-03-03 Thread Kent Johnson
Here is another attempt. I'm still not sure I understand what form you want the data in. I made a dict -> dict -> list structure so if you lookup e.g. scores['10/11/04']['60'] you get a list of all the RelevantInfo2 values for Relevant1='10/11/04' and Relevant2='60'. The parser is a simple-minde

Re: py2exe

2005-03-03 Thread Steve Holden
BOOGIEMAN wrote: On 3 Mar 2005 11:06:58 -0800, [EMAIL PROTECTED] wrote: How did we ever live without Google? We used Yahoo (and still using it) Even before Yahoo used Google themselves? regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005

Re: binutils "strings" like functionality?

2005-03-03 Thread cjl
David M. Cooke wrote: > Are you sure it's monkey/chicken/dog/cat, and not > monkey\chicken\dog\cat? The later one will print monkey\\chicken... > because of the repr() call. > > Also, you probably want it as [\x20-\x7e] (the DEL character \x7f > isn't printable). You're also missing tabs (\t). > >

Re: Gordon McMillan installer and Python 2.4

2005-03-03 Thread Martin Bless
On 2 Mar 2005 15:29:21 -0800, [EMAIL PROTECTED] (Svein Brekke) wrote: >Thank you Gordon McMillan for a very nice freeze tool for python. Yes, thanks a lot. >Recently I upgraded to python 2.4, and on my system any .exe file >generated by the installer crashes immediately after startup. Yes, I ca

creating .NET clients with python

2005-03-03 Thread Guy Robinson
Hello, Can anyone confirm if there is a python library that can allow me to create .NET clients in python. My understanding is both IronPython and python for .NET can't create python .net clients? Regards, Guy -- http://mail.python.org/mailman/listinfo/python-list

Re: binutils "strings" like functionality?

2005-03-03 Thread David M. Cooke
"cjl" <[EMAIL PROTECTED]> writes: > Fredrik Lundh wrote: > >> something like this could work: >> >> import re >> >> text = open(file, "rb").read() >> >> for m in re.finditer("([\x20-\x7f]{4,})[\n\0]", text): >> print m.start(), repr(m.group(1)) > > Hey...that worked. I actually

Re: py2exe

2005-03-03 Thread BOOGIEMAN
On 3 Mar 2005 11:06:58 -0800, [EMAIL PROTECTED] wrote: > How did we ever live without Google? We used Yahoo (and still using it) -- http://mail.python.org/mailman/listinfo/python-list

Re: yield_all needed in Python

2005-03-03 Thread Paul Moore
Skip Montanaro <[EMAIL PROTECTED]> writes: > Doug>def foogen(arg1): > > Doug> def foogen1(arg2): > Doug> # Some code here > > Doug> # Some code here > Doug> yield_all foogen1(arg3) > Doug> # Some code here > Doug> yield_all foo

Re: Multiline regex help

2005-03-03 Thread Steven Bethard
Yatima wrote: On Thu, 03 Mar 2005 09:54:02 -0700, Steven Bethard <[EMAIL PROTECTED]> wrote: A possible solution, using the re module: py> s = """\ ... Gibberish ... 53 ... MoreGarbage ... 12 ... RelevantInfo1 ... 10/10/04 ... NothingImportant ... ThisDoesNotMatter ... 44 ... RelevantInfo2 ... 22 ..

Re: How would you program this?

2005-03-03 Thread Bill Mill
On Thu, 03 Mar 2005 10:52:23 -0800, engsol <[EMAIL PROTECTED]> wrote: > > The diagonal constraint is interestingit seems to affect the number of > solutions. One surprise, (not being a math major), was that when I let the > brute force run (forever, it seemed), but without the diagonal > qual

Re: Multiline regex help

2005-03-03 Thread James Stroud
I found the original paper for Martel: http://www.dalkescientific.com/Martel/ipc9/ On Thursday 03 March 2005 12:26 pm, James Stroud wrote: > Have a look at "martel", part of biopython. The world of bioinformatics is > filled with files with structure like this. > > http://www.biopython.org/docs/a

Re: Multiline regex help

2005-03-03 Thread Yatima
On Thu, 03 Mar 2005 07:14:50 -0500, Kent Johnson <[EMAIL PROTECTED]> wrote: > > Here is a way to create a list of [RelevantInfo, value] pairs: > import cStringIO > > raw_data = '''Gibberish > 53 > MoreGarbage > 12 > RelevantInfo1 > 10/10/04 > NothingImportant > ThisDoesNotMatter > 44 > RelevantInfo

Re: Multiline regex help

2005-03-03 Thread James Stroud
Have a look at "martel", part of biopython. The world of bioinformatics is filled with files with structure like this. http://www.biopython.org/docs/api/public/Martel-module.html James On Thursday 03 March 2005 12:03 pm, Yatima wrote: > On Thu, 03 Mar 2005 09:54:02 -0700, Steven Bethard <[EMAI

Re: How to write python plug-ins for your own python program?

2005-03-03 Thread Andrew Dalke
Mark Rowe wrote: > A better method would be something along the lines of: > > plugin = __import__(pluginName) > plugin.someMethod() In the one time I did a plugin architecture I found that state = ... set up intial state for my program ... ... plugin = __import__(pluginName) plugin.someMethod

Re: Gordon McMillan installer and Python 2.4

2005-03-03 Thread Svein Brekke
> > According to the command line help for cx_Freeze and py2exe, they > > cannot pack my program with additional installation files into one > > self-extracting .exe file (which is what I want to do). > > > > Am I wrong on this? > > As far as py2exe goes, no, you're not wrong. > > On the other h

Re: Multiline regex help

2005-03-03 Thread Yatima
On Thu, 03 Mar 2005 09:54:02 -0700, Steven Bethard <[EMAIL PROTECTED]> wrote: > > A possible solution, using the re module: > > py> s = """\ > ... Gibberish > ... 53 > ... MoreGarbage > ... 12 > ... RelevantInfo1 > ... 10/10/04 > ... NothingImportant > ... ThisDoesNotMatter > ... 44 > ... RelevantI

Re: greedy match wanted

2005-03-03 Thread Paul McGuire
This is very similar to some common problems in developing pyparsing grammars. One of my early attempts at parsing CORBA IDL listed the valid parameter passing mechanisms as ('in' | 'out' | 'inout'). As you can imagine, I never successfully matched an 'inout', since the 'in' match came first. (P

problem with recursion

2005-03-03 Thread Alexander Zatvornitskiy
Привет vegetax! 03 марта 2005 в 13:54, vegetax в своем письме к All писал: v> I need this in order to print a directory tree with htmlgen library v> which uses nested lists to represent trees. As you see from output of your code, you simply add items to the only list. Try this: v> def rec(f):

Re: How would you program this?

2005-03-03 Thread pwalessi1
very nice. -- http://mail.python.org/mailman/listinfo/python-list

Re: Ruby on Rails or Perl's Maypole..is there a Python equivalent

2005-03-03 Thread Gary Nutbeam
Two out of three on the home made approach I was thinking about. Quixote, Cheetah and SQLObject. Thanks for the link. I'm perusing it now. deelan wrote: > Gary Nutbeam wrote: > (...) >> Does anyone know of something similar to Rails or Maypole in Python? > > you may want to take a look at sub

Re: Need help running external program

2005-03-03 Thread Rigga
Thanks to all for your help it is now working, I rant he code through a debugger and found that the input file I was using to create my list of addresses to wget had newlines in them and were therefore breaking my command line. All your advice has been appreciated. RiGGa -- http://mail.python.o

Re: problem with recursion

2005-03-03 Thread Kent Johnson
vegetax wrote: I am trying to make convert a directory "tree" in a list of list, but cant find the algoritm =( ,for example a directory tree like : #!/usr/bin/python from os import listdir from os.path import isdir,join,basename dirpath = '/tmp/test/' res = [] def rec(f): print f for ele i

Re: binutils "strings" like functionality?

2005-03-03 Thread cjl
Fredrik Lundh wrote: > something like this could work: > > import re > > text = open(file, "rb").read() > > for m in re.finditer("([\x20-\x7f]{4,})[\n\0]", text): > print m.start(), repr(m.group(1)) Hey...that worked. I actually modified: for m in re.finditer("([\x20-\x7f]{4

SOLVED: passing lists

2005-03-03 Thread Earl Eiland
It turns out that the function call was passing arguments in a different order than they were being received. Thanks, everyone, for your help. earl -- http://mail.python.org/mailman/listinfo/python-list

Re: Need help

2005-03-03 Thread brian
Got code from the 3rd party, maybe someone can see something wrong with it: def sendDataHTTP( url, postData ): # url format: http://www.blah.com/notrealurl # postData is either a dictionary or list of dictionaries # that contain the data that you want to post. responseList =

Re: Grid not getting updated

2005-03-03 Thread Steve Holden
Gensek wrote: I have a wxPython program, and it has a loop. I want to be able to break the loop by pushing a button. But it doesn't react to events until the loop finishes, which is sort of pointless. What's the best way to get it to work? Do I need threads? Or is there a more convenient way? You s

Re: How would you program this?

2005-03-03 Thread engsol
On Thu, 3 Mar 2005 14:57:13 -, "Duncan Smith" <[EMAIL PROTECTED]> wrote: > >"engsol" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] >> There is a number puzzle which appears in the daily paper. >> Because I'm between Python projects, I thought it might be >> fun to write a progra

Re: Ruby on Rails or Perl's Maypole..is there a Python equivalent

2005-03-03 Thread deelan
Gary Nutbeam wrote: (...) Does anyone know of something similar to Rails or Maypole in Python? you may want to take a look at subway: it glues together cherrypy2, sqlobject and cheetah using an MVC approach. HTH, deelan. -- http://mail.python.org/mailman/listinfo

  1   2   3   >