Re: Decorator Base Class: Needs improvement.

2005-04-04 Thread Steve Holden
Ron_Adam wrote: Ok, that post may have a few(dozen?) problems in it. I got glitched by idles not clearing variables between runs, so it worked for me because it was getting values from a previous run. This should work better, fixed a few things, too. The decorators can now take more than one argu

Re: re module non-greedy matches broken

2005-04-04 Thread André Malo
* "lothar" <[EMAIL PROTECTED]> wrote: > no - in the non-greedy regex > <1st-pat>*? > > <1st-pat>, and are arbitrarily complex patterns. The "not" is the problem. Regex patterns are expressed positive by definition (meaning, you can say, what you expect, but not what you don't expect). In oth

Good day

2005-04-04 Thread rlmorgan
The message cannot be represented in 7-bit ASCII encoding and has been sent as a binary attachment. -- http://mail.python.org/mailman/listinfo/python-list

Re: copying a file in the python script

2005-04-04 Thread Fouff
Raghul a écrit : hi I am having a problem. I want to copy a file from the folder and paste it or move it to another folder. Is it possible in python? Actually I need to implement this in the zope for my site. When I click any file it should move or copied to another folder in the same machine us

EOL created by .write or .encode

2005-04-04 Thread Xah Lee
Why is that some of my files written out by outF.write(outtext.encode('utf-8')) has ascii 10 as EOL, while others has ascii 13 as EOL? both of these files's EOL are originally all ascii 10. If i remove the EOL after the tt below in the place string, then this doesn't happen. findreplace = [ (u

Re: How to merge two binary files into one?

2005-04-04 Thread Andrew Dalke
Grant Edwards wrote: > For large files, something like this is probably a better idea: Or with the little-used shutil module, and keeping your nomenclature and block size of 65536 import shutil fout = file('C', 'wb') for n in ['A', 'B']: fin = file(n, 'rb') shutil.copyfileobj(fin, fout, 65536

monitoring folder in python

2005-04-04 Thread Raghul
Is it possible to monitor a folder in the python?My question is if I put any file in it that particular folder my script should monitor the folder and read the file name.If so what function can I use? Thanx in advance -- http://mail.python.org/mailman/listinfo/python-list

Re: Docorator Disected

2005-04-04 Thread Bengt Richter
On Mon, 04 Apr 2005 02:13:29 GMT, Ron_Adam <[EMAIL PROTECTED]> wrote: >On Sun, 03 Apr 2005 23:59:51 +0200, "Martin v. Löwis" ><[EMAIL PROTECTED]> wrote: > >>Ron_Adam wrote: >>> This would be the same without the nesting: >>> >>> def foo(xx): >>> global x >>> x = xx >>> return fee >>>

Re: Decorator Maker is working. What do you think?

2005-04-04 Thread Ron_Adam
Hi again, If anyone is reading this. Fixed the endless loop when stacking the same decorator instance. You can now reuse the same exact decorator object either in stacks or on different functions with different arguments. The only quirk left is if you stack the same decorator object, and have

copying a file in the python script

2005-04-04 Thread Raghul
hi I am having a problem. I want to copy a file from the folder and paste it or move it to another folder. Is it possible in python? Actually I need to implement this in the zope for my site. When I click any file it should move or copied to another folder in the same machine using zope. Thanks

gvbyhqp

2005-04-04 Thread dlm
The message contains Unicode characters and has been sent as a binary attachment. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to merge two binary files into one?

2005-04-04 Thread could ildg
Thank Grant, it works well. On Apr 5, 2005 10:54 AM, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2005-04-05, could ildg <[EMAIL PROTECTED]> wrote: > >> > I want to merge file A and file B into a new file C, All of > >> > them are binary. > >> > >> file('C','wb').write(file('A','rb').read()+file(

Re: Web application toolkit recommendation?

2005-04-04 Thread Shalabh Chaturvedi
Stewart Midwinter wrote: hi all: I'm a python user in my day job. Now I want to take on a personal pet project which will involve the creation of a website on my home server. I'll want to keep track of users through user accounts and logins, allow them to upload information to a database (maybe my

Re: Unexpected result when comparing method with variable

2005-04-04 Thread Michael Spencer
David Handy wrote: I had a program fail on me today because the following didn't work as I expected: class C: ... def f(self): ... pass ... c = C() m = c.f m is c.f False I would have expected that if I set a variable equal to a bound method, that variable, for all intents and purposes

RE: Web application toolkit recommendation?

2005-04-04 Thread Robert Brewer
Stewart Midwinter wrote: > I would like to take a stab at doing this in Python instead of PHP, > but I'd like to hear from people who are familiar with both, or who > have a good understanding of web application toolkits in Python. > Which is likely to be the least painful route? > > I'm already

Re: Unexpected result when comparing method with variable

2005-04-04 Thread David Handy
On Tue, Apr 05, 2005 at 03:38:09PM +1200, Tony Meyer wrote: > [David Handy] > > I had a program fail on me today because the following didn't > > work as I expected: > > > > >>> class C: > > ... def f(self): > > ... pass > > ... > > >>> c = C() > > >>> m = c.f > > >>> m is c.f > > Fal

Re: Unexpected result when comparing method with variable

2005-04-04 Thread Ron_Adam
On Mon, 4 Apr 2005 23:34:41 -0400, David Handy <[EMAIL PROTECTED]> wrote: I'm not sure if this is the best way. But it might work. for method, params in deferred: method(*params) try: if method.im_func is c.f.im_func: # handle a special case except: if

Re: Unexpected result when comparing method with variable

2005-04-04 Thread Michael Spencer
David Handy wrote: I had a program fail on me today because the following didn't work as I expected: class C: ... def f(self): ... pass ... c = C() m = c.f m is c.f False I would have expected that if I set a variable equal to a bound method, that variable, for all intents and purposes

RE: Unexpected result when comparing method with variable

2005-04-04 Thread Tony Meyer
[David Handy] > I had a program fail on me today because the following didn't > work as I expected: > > >>> class C: > ... def f(self): > ... pass > ... > >>> c = C() > >>> m = c.f > >>> m is c.f > False [...] > The workaround really awkward: What's wrong with this? >>> class C: ...

Unexpected result when comparing method with variable

2005-04-04 Thread David Handy
I had a program fail on me today because the following didn't work as I expected: >>> class C: ... def f(self): ... pass ... >>> c = C() >>> m = c.f >>> m is c.f False I would have expected that if I set a variable equal to a bound method, that variable, for all intents and purposes,

Re: sparse sets of integers?

2005-04-04 Thread Terry Reedy
"Dan Stromberg" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Does anyone have a python implementation (or python C/C+ extension) that > would allow me to perform set operations (union, intersection, > difference, > number of elements, &c) over very large collections of integer

Re: How to merge two binary files into one?

2005-04-04 Thread Grant Edwards
On 2005-04-05, could ildg <[EMAIL PROTECTED]> wrote: >> > I want to merge file A and file B into a new file C, All of >> > them are binary. >> >> file('C','wb').write(file('A','rb').read()+file('B','rb').read()) > > Python is really magic, even merge file can use "+". You probably shouldn't use t

Re: sparse sets of integers?

2005-04-04 Thread Terry Reedy
"Dan Stromberg" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Does anyone have a python implementation (or python C/C+ extension) that > would allow me to perform set operations (union, intersection, > difference, > number of elements, &c) over very large collections of integer

hello

2005-04-04 Thread anna
The message cannot be represented in 7-bit ASCII encoding and has been sent as a binary attachment. -- http://mail.python.org/mailman/listinfo/python-list

hello

2005-04-04 Thread jane
The message cannot be represented in 7-bit ASCII encoding and has been sent as a binary attachment. -- http://mail.python.org/mailman/listinfo/python-list

raw sockets please

2005-04-04 Thread ionel
anyone got any idea how the get raw sockets working on win32 ? (on python 2.4) -- ionel. -- http://mail.python.org/mailman/listinfo/python-list

Re: Silly question re: 'for i in sys.stdin'?

2005-04-04 Thread Tom Eastman
Jeff Epler wrote: > The iterator for files is a little bit like this generator function: > Cool thanks for that, it looks like iter(f.readline, '') is the best solution for the job. Tom -- http://mail.python.org/mailman/listinfo/python-list

Re: Python modules for image / map manipulation?

2005-04-04 Thread Robert Kern
Robert Kern wrote: I use PROJ.4 via pipes for cartographic projections. http://proj.maptools.org/ There is an addon to the matplotlib plotting library that contains a binding for the PROJ.4 library, but I haven't gotten it to work on my Mac. http://matplotlib.sourceforge.net/toolkits.html Jus

hello

2005-04-04 Thread bug-gs-beta
The message contains Unicode characters and has been sent as a binary attachment. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to merge two binary files into one?

2005-04-04 Thread could ildg
Thank you! Python is really magic, even merge file can use "+". On Apr 5, 2005 9:20 AM, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2005-04-05, could ildg <[EMAIL PROTECTED]> wrote: > > > I want to merge file A and file B into a new file C, All of > > them are binary. > > file('C','wb').write(

Re: Python modules for image / map manipulation?

2005-04-04 Thread Robert Kern
Stewart Midwinter wrote: I would like to do some image / map manipulation with Python. I've got a very large map file in .png format. My thought is to chop it up into small tiles using some method. What Python module would be helpful for this? The PIL. I'm not sure how well it handles files of y

Re: How to merge two binary files into one?

2005-04-04 Thread Grant Edwards
On 2005-04-05, could ildg <[EMAIL PROTECTED]> wrote: > I want to merge file A and file B into a new file C, All of > them are binary. file('C','wb').write(file('A','rb').read()+file('B','rb').read()) -- Grant Edwards grante Yow! ... or were you

Re: sparse sets of integers?

2005-04-04 Thread Raymond Hettinger
[Dan Stromberg] > Does anyone have a python implementation (or python C/C+ extension) that > would allow me to perform set operations (union, intersection, difference, > number of elements, &c) over very large collections of integers? > > Some of the sets may have over 10**11 (probably less than 10

Re: Super Newbie Question

2005-04-04 Thread Greg Ewing
[EMAIL PROTECTED] wrote: In short, how might I go about deleting just the contents of a file? File objects have a truncate() method which chops the file back to zero length (or a length that you specify). But why not just delete the file? You can always create another one with the same name later i

How to merge two binary files into one?

2005-04-04 Thread could ildg
I want to merge file A and file B into a new file C, All of them are binary. How to do that? thanks a lot. -- 鹦鹉聪明绝顶、搞笑之极,是人类的好朋友。 直到有一天,我才发觉,我是鹦鹉。 我是翻墙的鹦鹉。 -- http://mail.python.org/mailman/listinfo/python-list

Python modules for image / map manipulation?

2005-04-04 Thread Stewart Midwinter
I would like to do some image / map manipulation with Python. I've got a very large map file in .png format. My thought is to chop it up into small tiles using some method. What Python module would be helpful for this? Next, when I obtain the start and end co-ordinates of a user's trip, I'd lik

Re: Gnuplot.py and, _by far_, the weirdest thing I've ever seen on my computer

2005-04-04 Thread Paul Cochrane
I had similar problems with Gnuplot.py, basically, one couldn't use ascii mode for plotting grid data, and had to set binary=1 in the GridData() method. (this is off the top of my head, so I might have the binary/ascii thing the wrong way around). What fixed the problem was going to version Gnup

Re: StopIteration in the if clause of a generator expression

2005-04-04 Thread Raymond Hettinger
> > Use a genexp when you need a generator > > and use a listcomp when you need a list. [Steven Bethard] > So do I read this right in preferring > [ for in ] > over > list( for in ) Yes! Raymond -- http://mail.python.org/mailman/listinfo/python-list

Re: Gnuplot.py and, _by far_, the weirdest thing I've ever seen on my computer

2005-04-04 Thread David M. Cooke
"syd" <[EMAIL PROTECTED]> writes: > I don't even know where to begin. This is just bizarre. I just picked > up the Gnuplot.py module (a light interface to gnuplot commands) and > was messing around with it today. > > I've got a tiny script, but it only works from the command line about > half th

Decorator Maker is working. What do you think?

2005-04-04 Thread Ron_Adam
Ok... it's works! :) So what do you think? Look at the last stacked example, it process the preprocess's first in forward order, then does the postprocess's in reverse order. Which might be usefull. Interesting in any case. Making decorators with this class is a snap! Any thoughts? Any imp

Re: Super Newbie Question

2005-04-04 Thread John Ridley
--- John Ridley <[EMAIL PROTECTED]> blurted: > I suppose the simplest thing to do would be to write an empty string > to the file: > > >>> f = open('tmpfile.txt', 'w') > >>> f.write('') > >>> f.close() # or f.flush(), if keeping open Apologies - this is, of course, nonsense. Time for me to hi

Re: Web application toolkit recommendation?

2005-04-04 Thread Grig Gheorghiu
Check out http://pyre.third-bit.com/pyweb/index.html Grig -- http://mail.python.org/mailman/listinfo/python-list

Re: Super Newbie Question

2005-04-04 Thread Brian van den Broek
[EMAIL PROTECTED] said unto the world upon 2005-04-04 19:39: I want the "engine" to read the file, write its contents to another temporary file (for now it just writes the contents; later it will format it before writing the contents) and then deletes the *contents* of the temporary file after pri

Re: Super Newbie Question

2005-04-04 Thread John Ridley
--- [EMAIL PROTECTED] wrote: > In short, how might I go about deleting just the contents of a file? > I tried several methods with my limited knowledge but had no luck. I suppose the simplest thing to do would be to write an empty string to the file: >>> f = open('tmpfile.txt', 'w') >>> f.write

Re: Super Newbie Question

2005-04-04 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-04-04 16:39:27 -0700: > In short, how might I go about deleting just the contents of a file? > I tried several methods with my limited knowledge but had no luck. fd = open("your-file") fd.truncate() fd.close() or open("your-file", "w").close() -- How

Web application toolkit recommendation?

2005-04-04 Thread Stewart Midwinter
hi all: I'm a python user in my day job. Now I want to take on a personal pet project which will involve the creation of a website on my home server. I'll want to keep track of users through user accounts and logins, allow them to upload information to a database (maybe mySQL or SqLite), and in t

Re: unittest vs py.test?

2005-04-04 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Jeremy Bowers <[EMAIL PROTECTED]> wrote: > On Mon, 04 Apr 2005 22:50:35 +, John J. Lee wrote: > > What I don't understand about py.test (and trying it out seems > > unlikely to answer this) is why it uses the assert statement. > > unittest used to do that, too,

Re: Status of Chaco?

2005-04-04 Thread Robert Kern
Tim Lesher wrote: I recently had reason to look up Chaco again, but after searching the SciPy and Enthought websites, I see it seems to have gone missing. Looking over c.l.p, I can find only one quasi-recent message from Eric about at, from almost a year ago: Chaco has moved to a new package. We

Re: sparse sets of integers?

2005-04-04 Thread Terry Reedy
"Dan Stromberg" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Does anyone have a python implementation (or python C/C+ extension) that > would allow me to perform set operations (union, intersection, > difference, > number of elements, &c) over very large collections of integer

Re: Change between Python 2.3 and 2.4 under WinXP

2005-04-04 Thread "Martin v. Löwis"
Fredrik Lundh wrote: I'm not aware of any other tool that solves that specific problem. notepad does a fine job at creating batch files, IMO. Of course, it is not all that clear what the OP actually wanted. For all we know, he wanted to "alternate quickly (with batch file or similary) between pytho

Re: unittest vs py.test?

2005-04-04 Thread Grig Gheorghiu
py.test intercepts the assert statements before they are optimized away. It's part of the profuse "magic" that py.test does. Grig -- http://mail.python.org/mailman/listinfo/python-list

Re: testing -- what to do for testing code with behaviour dependant upon which files exist?

2005-04-04 Thread Brian van den Broek
Jeremy Bowers said unto the world upon 2005-04-04 17:26: On Mon, 04 Apr 2005 17:02:20 -0400, Brian van den Broek wrote: Jeremy suggested using a directory name akin to "C:\onlyanidiotwouldhavethisdirecotrynameonadrive". That is what I had settled on before I posted. Somehow it feels unhappy and i

Re: change extensions

2005-04-04 Thread David Wilson
Bob Then wrote: > how can i change all files from one extension to another within a direcory? This should work: import os def change_exts(suffix, new_suffix, dir_name): for name in os.listdir(dir_name): if name.endswith(suffix): old_pathname = os.path.join(dir_name, name)

Re: sparse sets of integers?

2005-04-04 Thread François Pinard
[runes] > You have sets in Python 2.3x and 2.4x. I don't know if they can handle > your amounts of data, but i guess so. The original poster (OP) spoke about 10**13 numbers, if I remember correctly (I did not keep the original message). It all depends on the real sparsity of the spare sets! :-)

Super Newbie Question

2005-04-04 Thread joeyjwc
I have recently started to use Python to develop a new version of my website. I'm working on a sort of "web engine" that takes the contents of a standardized file format I have designed and then outputs it using templates created by me. However, I'm only at the very beginning (i.e. opening and re

Re: change extensions

2005-04-04 Thread Gerhard Häring
Bob Then wrote: how can i change all files from one extension to another within a direcory? Using os.listdir, os.path.split and os.rename. -- Gerhard -- http://mail.python.org/mailman/listinfo/python-list

change extensions

2005-04-04 Thread Bob Then
how can i change all files from one extension to another within a direcory? -- http://mail.python.org/mailman/listinfo/python-list

Eric3 under WinXP

2005-04-04 Thread John Ridley
* Franz Steinhäusler wrote: > I have successfully installed pyqt, but not > qtext, which I need to run Eric3. > The PyQT demo files run fine. > > I've downloaded QScintilla, compiled via MS-VC, > but (I suppose I need the SIG), to translate or provide > the Python interface with pyd Files. > >

Re: unittest vs py.test?

2005-04-04 Thread Jeremy Bowers
On Mon, 04 Apr 2005 22:50:35 +, John J. Lee wrote: > What I don't understand about py.test (and trying it out seems > unlikely to answer this) is why it uses the assert statement. > unittest used to do that, too, but then it was pointed out that that > breaks when python -O is used, so unittest

Re: Gnuplot.py and, _by far_, the weirdest thing I've ever seen on my computer

2005-04-04 Thread James Stroud
Are you on NFS or are you using a raid? This may have to do with the time it takes to access your files, etc. On Monday 04 April 2005 02:23 pm, syd wrote: > I don't even know where to begin. This is just bizarre. I just picked > up the Gnuplot.py module (a light interface to gnuplot commands) a

Re: Insert database rows from CSV file

2005-04-04 Thread 3c273
Thanks for the link, but this is the step I am trying to save (for someone else). Every time he goes to run a report, he must stop and import any new csv files. Since the files are generated by a Python script, I thought I could just insert them into his table and save him some steps. I'm also just

Re: sparse sets of integers?

2005-04-04 Thread runes
You have sets in Python 2.3x and 2.4x. I don't know if they can handle your amounts of data, but i guess so. -- http://mail.python.org/mailman/listinfo/python-list

Re: unittest vs py.test?

2005-04-04 Thread John J. Lee
"Raymond Hettinger" <[EMAIL PROTECTED]> writes: > [Peter Hansen] > > (I'm not dissing py.test, and intend to check it > > out. > > Not to be disrepectful, but objections raised by someone > who hasn't worked with both tools equate to hot air. [...] Why? Peter had a reasonable question which, AF

Re: Changing TEXT color from python

2005-04-04 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Heiko Wundram wrote: > Am Montag, 4. April 2005 21:59 schrieb GujuBoy: >> how can i do this...and hopefully without including any external >> modules. > > It depends. > > Under *NIX, have a look at the curses module. > > Under Windows, Google for ANSI.SYS and read up on

Re: Insert database rows from CSV file

2005-04-04 Thread Larry Bates
You may want to take a look at this link. It should be much faster than any programmatic technique. http://www.its.niu.edu/its/CSupport/tipoftheweek/tip_080502.shtml If you still want to do it programmatically, you will need to look at csv module to parse the lines. Larry Bates 3c273 wrote:

Re: A ClientForm Question

2005-04-04 Thread John J. Lee
Francesco <[EMAIL PROTECTED]> writes: > Il Fri, 01 Apr 2005 02:36:24 -0800, narke ha scritto: > > > Does anyone here use ClientForm to handle a HTML form on client side? Yes. :-) [...] > > forms = ParseResponse(urlopen(url)) > > > > form = forms[0] > > urlopen(form.click("ZoomContr

Re: re module non-greedy matches broken

2005-04-04 Thread John Ridley
--- lothar <[EMAIL PROTECTED]> wrote: > no - in the non-greedy regex > <1st-pat>*? > > <1st-pat>, and are arbitrarily complex > patterns. Could you post some real-world examples of the problems you are trying to deal with, please? Trying to come up with general solutions for arbitrarily comp

sparse sets of integers?

2005-04-04 Thread Dan Stromberg
Does anyone have a python implementation (or python C/C+ extension) that would allow me to perform set operations (union, intersection, difference, number of elements, &c) over very large collections of integers? Some of the sets may have over 10**11 (probably less than 10**13 though) integers in

Re: Decorator Base Class: Needs improvement.

2005-04-04 Thread Ron_Adam
Ok, that post may have a few(dozen?) problems in it. I got glitched by idles not clearing variables between runs, so it worked for me because it was getting values from a previous run. This should work better, fixed a few things, too. The decorators can now take more than one argument. The fun

Re: re module non-greedy matches broken

2005-04-04 Thread Christopher Weimann
On 04/04/2005-04:20PM, lothar wrote: > > how then, do i specify a non-greedy regex > <1st-pat>*? > > that is, such that non-greedy part *? > excludes a match of <1st-pat> > jet% cat vwre2.py #! /usr/bin/env python import re vwre = re.compile("V[^V]W") vwlre = re.compile("V[^V]WL") if __nam

Re: TOC of Python Cookbook now online (was Re: author index for Python Cookbook 2?)

2005-04-04 Thread beliavsky
robin wrote: > [EMAIL PROTECTED] wrote: > > >I emailed the O'Reilly webmaster, and the table of contents are now > >online at http://www.oreilly.com/catalog/pythoncook2/toc.html and also > >listed below. > > Unfortunately there is no list of authors for the sections in the > book. This is likely it

Re: string goes away

2005-04-04 Thread John J. Lee
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: [...] > Of course that statement is also false. Performance prediction is very > difficult, and you cannot imply much from this benchmark. In other [...] s/imply/infer/ John -- http://mail.python.org/mailman/listinfo/python-list

Insert database rows from CSV file

2005-04-04 Thread 3c273
Hello, I have a really simple Access database table with a format similar to this: CustomerName - ProductOrdered - QtyOrdered I have a CSV file with the appropriate values as follows: Customer1, Widget1, 1000 Customer2, Widget2, 3000 etc I have figured out how to insert the data manually from the

Re: checkbook manager -> cross platform printing

2005-04-04 Thread David Isaac
"Alan Isaac" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'd like to try personal financial management using Python. > I just found PyCheckbook, but it does not support check printing. > Is there a Python check printing application kicking around? OK, I'll assume silence means "

Mail Delivery System

2005-04-04 Thread trasno-owner
You are not allowed to post to this mailing list, and your message has been automatically rejected. If you think that your messages are being rejected in error, contact the mailing list owner at [EMAIL PROTECTED] --- Begin Message --- n†,×I-™9¸¯âGv±Ä$ μ‚R?T9æ–ÜÅf š‚óÈ{Å}Ý–]ü„±­x?÷½I-˜Ý?ÖEÞ첎҈Ì

Re: testing -- what to do for testing code with behaviour dependant upon which files exist?

2005-04-04 Thread Jeremy Bowers
On Mon, 04 Apr 2005 17:02:20 -0400, Brian van den Broek wrote: > Jeremy suggested using a directory name akin to > "C:\onlyanidiotwouldhavethisdirecotrynameonadrive". That is what I had > settled on before I posted. Somehow it feels unhappy and inelegant. > But, I'm a bit less uncomfortable with

Gnuplot.py and, _by far_, the weirdest thing I've ever seen on my computer

2005-04-04 Thread syd
I don't even know where to begin. This is just bizarre. I just picked up the Gnuplot.py module (a light interface to gnuplot commands) and was messing around with it today. I've got a tiny script, but it only works from the command line about half the time! In the python interpreter, 100%. Ip

Re: Changing TEXT color from python

2005-04-04 Thread Heiko Wundram
Am Montag, 4. April 2005 21:59 schrieb GujuBoy: > how can i do this...and hopefully without including any external > modules. It depends. Under *NIX, have a look at the curses module. Under Windows, Google for ANSI.SYS and read up on Escape Sequences, or check out the curses for Windows impleme

Re: StopIteration in the if clause of a generator expression

2005-04-04 Thread Steven Bethard
Raymond Hettinger wrote: [Steven Bethard] and I often find myself alternating between the two when I can't decide which one seems more Pythonic. Both are pythonic. Use a genexp when you need a generator and use a listcomp when you need a list. So do I read this right in preferring [ for in ] o

Re: Looking for Stephen Turner, maintainer of informixdb

2005-04-04 Thread Carsten Haese
On Tue, 2005-03-29 at 03:05, Michael Husmann wrote: > Carsten Haese wrote: > > > Hello everybody: > > > > I have discovered that the functionality for connecting Python to an > > Informix database is currently in a frustrating state of neglect. The > > link to Kinfxdb is dead, and informixdb does

Re: testing -- what to do for testing code with behaviour dependant upon which files exist?

2005-04-04 Thread Brian van den Broek
"Brian van den Broek" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi all, I'm just starting to employ unit testing (I'm using doctest), and I am uncertain how to handle writing tests where the behaviour being tested is dependant on whether certain file paths point to actual file

sys.stdout / sys.stderr, subprocess, redirection

2005-04-04 Thread Roman Neuhauser
Hello, I have a piece of code that gets run in a script that has its stdout closed: import sys sys.stdout = sys.stderr c = subprocess.Popen (..., stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr =

Re: text analysis in python

2005-04-04 Thread Steve Holden
Maurice LING wrote: Terry Reedy wrote: "Maurice LING" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Say I code my stuffs in Jython (importing java libraries) in a file "text.py" Just to be clear, Jython is not a separate langague that you code *in*, but a separate implementation

Real ython Poetry [was: Re: boring the reader to death...]

2005-04-04 Thread Steve Holden
Scott David Daniels wrote: Sunnan wrote: ...Because what is "boring"? The opposite of dense, tense, intense. Utterly predictable; it's like the combination of all my prejudices. Even before I knew, I thought "Bet Python separates statements from expressions". Python is for terse, pithy prose; P

http://zephyrfalcon.org/labs/wax.html

2005-04-04 Thread patrick vergain
http://zephyrfalcon.org/labs/wax.html Wax :: Email :: Download area This page is a stub. Over time, I hope to collect more Wax resources here. NOTE: Wax currently works (or is supposed to work) with wxPython 2.5.2.7 or 2.5.2.8. That is the version I am currently using. Newer versions might or mi

Decorator Base Class: Needs improvement.

2005-04-04 Thread Ron_Adam
Hi, Thanks again for all the helping me understand the details of decorators. I put together a class to create decorators that could make them a lot easier to use. It still has a few glitches in it that needs to be addressed. (1) The test for the 'function' object needs to not test for a s

Re: Makeing TopLevel Modal ?

2005-04-04 Thread [EMAIL PROTECTED]
well, top.transient(root) will ensure your toplevel window is on top of all others. IIRC, you could also use top.grab_set() to make it modal, but you'll have to try it and see. S -- http://mail.python.org/mailman/listinfo/python-list

Re: Name of IDLE on Linux

2005-04-04 Thread [EMAIL PROTECTED]
Peter Otten wrote: and now typing e. g. > pym os.path > in the address bar immediately brings up that module's documentation. > > Peter Nice one! Thanks. S -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems compiling PIL under Cygwin

2005-04-04 Thread Jason Tishler
Martin, On Mon, Apr 04, 2005 at 03:46:58PM +0200, Martin Magnusson wrote: > I'm trying to build PIL under Cygwin (for use with the Skencil vector > graphics program), and I couldn't find a better forum for questions > than this. > > I'm using Python 2.3.4, and when I run "python setup.py build_ex

Re: re module non-greedy matches broken

2005-04-04 Thread lothar
no - in the non-greedy regex <1st-pat>*? <1st-pat>, and are arbitrarily complex patterns. with character classes and negative character classes you do not need non-greediness anyway. "John Ridley" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > --- lothar <[EMAIL PROTECTED]>

Re: Changing TEXT color from python

2005-04-04 Thread Grant Edwards
On 2005-04-04, GujuBoy <[EMAIL PROTECTED]> wrote: > so i am writing a program in Python and i want to print out a few > statements in Different colors > > for example "Print hello world in RED, and "GOOD BYE in blue" " > > how can i do this... Depends on what you're printing on. tty? curses

Changing TEXT color from python

2005-04-04 Thread GujuBoy
so i am writing a program in Python and i want to print out a few statements in Different colors for example "Print hello world in RED, and "GOOD BYE in blue" " how can i do this...and hopefully without including any external modules. thanks in advance -- http://mail.python.org/mailman/listinf

Re: How to execute a cmd line program without invoking console window?

2005-04-04 Thread Tian
this is very useful, thanks very much! -- http://mail.python.org/mailman/listinfo/python-list

Re: How to reload local namespace definitions in the python interpreter?

2005-04-04 Thread Steve Holden
Bill Mill wrote: On Apr 4, 2005 11:10 AM, Steve Holden <[EMAIL PROTECTED]> wrote: Tim Jarman wrote: [EMAIL PROTECTED] wrote: Hi, I am a beginner using the python interpreter. To reduce typing effort, I created a module called "aliases.py" containing some aliases for objects I commonly use like - a

Re: mini_httpd (ACME Labs) & Python 2.4.1 integration

2005-04-04 Thread Venkat B
We found the answer, just in case one was looking for it... I turns out that setting the environment params (CGI_PATH & CGI_LD_LIB_PATH) is not sufficient. One has to still add the path entry to the script itself... like so: #! /python2.4 May also work with ensuring env variable PYTHONPATH is set

Re: StopIteration in the if clause of a generator expression

2005-04-04 Thread Raymond Hettinger
[Steven Bethard] > and I often find myself alternating > between the two when I can't decide which one seems more Pythonic. Both are pythonic. Use a genexp when you need a generator and use a listcomp when you need a list. Raymond Hettinger -- http://mail.python.org/mailman/listinfo/python-l

Re: re module non-greedy matches broken

2005-04-04 Thread lothar
with respect to the documentation, the module is broken. the module does not necessarily deliver a "minimal length" match for a non-greedy pattern. "Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "lothar" wrote: > > > this is a bug and it needs to be fixed. > > it's

Re: help with python-devel!!!

2005-04-04 Thread Heiko Wundram
Am Montag, 4. April 2005 20:54 schrieb John Ridley: > The OP mentioned that urpmi couldn't find a package by that name. So it > might be worth querying for "libpython" if that fails: This is why why I don't use a binary distribution... :-) (Differences in) Naming makes getting at devel-packages a

Re: setup distributed computing for two computer only

2005-04-04 Thread Heiko Wundram
Am Montag, 4. April 2005 21:27 schrieb [EMAIL PROTECTED]: > Google for: Python Remote Objects or Python XMLRPC -- --- Heiko. listening to: Nine Inch Nails - The Downward Spiral see you at: http://www.stud.mh-hannover.de/~hwundram/wordpress/ pgpbsPKhjKOEY.pgp Description: PGP signature --

Status of Chaco?

2005-04-04 Thread Tim Lesher
I recently had reason to look up Chaco again, but after searching the SciPy and Enthought websites, I see it seems to have gone missing. Looking over c.l.p, I can find only one quasi-recent message from Eric about at, from almost a year ago: > Chaco has moved to a new package. We hope to have it

  1   2   >