Re: Is there no compression support for large sized strings in Python?

2005-12-03 Thread Fredrik Lundh
Christopher Subich wrote: anyone out there with an ILP64 system? I have access to an itanium system with a metric ton of memory. I -think- that the Python version is still only a 32-bit python an ILP64 system is a system where int, long, and pointer are all 64 bits, so a 32-bit python on a

Re: advice : how do you iterate with an acc ?

2005-12-03 Thread Ben Finney
[EMAIL PROTECTED] wrote: acc = []# accumulator ;) for line in fileinput.input(): if condition(line): if acc:#1 doSomething(acc)#1 acc = [] else: acc.append(line) if acc:#2 doSomething(acc)#2 Looks like you'd be better

Re: Compiling Guppy-PE extension modules

2005-12-03 Thread Sverker Nilsson
Claudio Grondi [EMAIL PROTECTED] wrote: I don't know if it applies here, but in this context the extern keyword comes to my mind. [snip extracts from Microsoft docs] Perhaps. But I suspect it isn't that simple since ... I'd think even if I don't use the extern keyword the

os.rename copies when old is in-use - is this deliberate?

2005-12-03 Thread Tony Meyer
On Windows, if I do os.rename(old, new) where old is a file that is in-use (e.g. python itself, or a dll that is loaded), I would expect that an error would be raised (e.g. as when os.remove is called with an in-use file). However, what happens is that a copy of the file is made, and the old file

Re: Cut and paste an EPS file

2005-12-03 Thread Piet van Oostrum
John Henry [EMAIL PROTECTED] (JH) wrote: JH I am looking for a Python tookit that will enable me to cut section of JH a picture out from an EPS file and create another EPS file. JH I am using a proprietary package for doing certain engineering JH calculations. It creates single page x-y line

Re: Python Unicode decimal interpretation

2005-12-03 Thread Martin v. Löwis
Scott David Daniels wrote: In reading over the source for CPython's PyUnicode_EncodeDecimal, I see a dance to handle characters which are neither dec-equiv nor in Latin-1. Does anyone know about the intent of such a conversion? To support this: int(u\N{DEVANAGARI DIGIT SEVEN}) 7 As far

Re: XML and namespaces

2005-12-03 Thread and-google
Uche [EMAIL PROTECTED] wrote: Of course. Minidom implements level 2 (thus the NS at the end of the method name), which means that its APIs should all be namespace aware. The bug is that writexml() and thus toxml() are not so. Not exactly a bug - DOM Level 2 Core 1.1.8p2 explicitly leaves

Re: os.rename copies when old is in-use - is this deliberate?

2005-12-03 Thread Martin v. Löwis
Tony Meyer wrote: Is this the intended behaviour? Sort-of. os.rename invokes the C library's rename, and does whatever this does. It is expected that most platform's C libraries do what the documentation says rename does, but platforms may vary in their implementation of the C library, and from

Re: os.rename copies when old is in-use - is this deliberate?

2005-12-03 Thread Tony Meyer
[Tony Meyer] Is this the intended behaviour? [Martin v. Löwis] Sort-of. os.rename invokes the C library's rename, and does whatever this does. It is expected that most platform's C libraries do what the documentation says rename does, but platforms may vary in their implementation of the C

Re: advice : how do you iterate with an acc ?

2005-12-03 Thread Bengt Richter
On 2 Dec 2005 18:34:12 -0800, [EMAIL PROTECTED] wrote: Bengt Richter wrote: It looks to me like itertools.groupby could get you close to what you want, e.g., (untested) Ah, groupby. The generic string.split() equivalent. But the doc said the input needs to be sorted. seq =

Re: advice : how do you iterate with an acc ?

2005-12-03 Thread bonono
Bengt Richter wrote: On 2 Dec 2005 18:34:12 -0800, [EMAIL PROTECTED] wrote: Bengt Richter wrote: It looks to me like itertools.groupby could get you close to what you want, e.g., (untested) Ah, groupby. The generic string.split() equivalent. But the doc said the input needs to be

Re: os.rename copies when old is in-use - is this deliberate?

2005-12-03 Thread Bengt Richter
On Sat, 3 Dec 2005 22:32:22 +1300, Tony Meyer [EMAIL PROTECTED] wrote: On Windows, if I do os.rename(old, new) where old is a file that is in-use (e.g. python itself, or a dll that is loaded), I would expect that an error would be raised (e.g. as when os.remove is called with an in-use file).

Re: os.rename copies when old is in-use - is this deliberate?

2005-12-03 Thread Martin v. Löwis
Tony Meyer wrote: Thanks for that. In your opinion, would a documentation patch that explained that this would occur on Windows (after the existing note about the Windows rename not being atomic) be acceptable? In principle, yes. We cannot do that for every platform, of course, but it

Re: CGI and long running job

2005-12-03 Thread jmdeschamps
[EMAIL PROTECTED] wrote: Hello, I am using python and CGI to initiate a long running simulation (up to 5h long) on a remote machine. The main idea is that I use a form, enter the parameters and a CGI scripts start the simulation using these parameters. The structure of the script is: 1.

EOF error

2005-12-03 Thread ash
hi, when i try to unpickle a pickled file in binary format, i get this error: E:\mditest.py Traceback (most recent call last): File E:\mdi\qp.py, line 458, in OnReadButton data=p.load(file(ques.dat,r)) EOFError what is the reason? how do i overcome this? Thanks in advance for you valuable

Re: EOF error

2005-12-03 Thread Peter Otten
ash wrote: hi, when i try to unpickle a pickled file in binary format, i get this error: E:\mditest.py Traceback (most recent call last): File E:\mdi\qp.py, line 458, in OnReadButton data=p.load(file(ques.dat,r)) EOFError what is the reason? how do i overcome this? Thanks in

os.chdir + GUI question

2005-12-03 Thread Philippe C. Martin
Hi, I do not know whether this is a Python, wxPython, Windows, or coding question ... I have a program that changes disk/directory using os.chdir (verified OK with os.getcwd) then opens a file dialog box using wx.FileDialog with as default dir. I expected to be in my chdir directory but

[ANN] rpncalc-2.2 RPN Calculator for Python

2005-12-03 Thread Raymond L. Buvel
The rpncalc package adds an interactive Reverse Polish Notation (RPN) interpreter to Python. This interpreter allows the use of Python as an RPN calculator. You can easily switch between the RPN interpreter and the standard Python interpreter. Home page: http://calcrpnpy.sourceforge.net/

Re: os.rename copies when old is in-use - is this deliberate?

2005-12-03 Thread Jérôme Laheurte
On Sat, 03 Dec 2005 22:32:22 +1300, Tony Meyer wrote: os.rename(sys.executable, d:\\python24.exe) What happens if you specify a destination file on the same drive as the source file ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Is Python string immutable?

2005-12-03 Thread Scott David Daniels
Steve Holden wrote: could ildg wrote: Will string operation in python also leave some garbage? I implemented a net-spider in python which includes many html string procession. After it running for sometime, the python exe eats up over 300M memory. Is this because the string garbages?

Re: CGI and long running job

2005-12-03 Thread merry . sailor
[EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Hello, I am using python and CGI to initiate a long running simulation (up to 5h long) on a remote machine. The main idea is that I use a form, enter the parameters and a CGI scripts start the simulation using these parameters. The

Re: advice : how do you iterate with an acc ?

2005-12-03 Thread Scott David Daniels
Jeffrey Schwab wrote: [EMAIL PROTECTED] wrote: hello, i often encounter something like: acc = []# accumulator ;) for line in fileinput.input(): if condition(line): if acc:#1 doSomething(acc)#1 acc = [] else: acc.append(line)

urllib on windows machines

2005-12-03 Thread william
I've got a strange problem on windows (not very familiar with that OS). I can ping a host, but cannot get it via urllib (see here under). I can even telnet the host on port 80. Thus network seems good, but not for python ;-(. Does any windows specialist can guide me (a poor linux user) to get

Re: Python Unicode decimal interpretation

2005-12-03 Thread Scott David Daniels
Martin v. Löwis wrote: Scott David Daniels wrote: In reading over the source for CPython's PyUnicode_EncodeDecimal, I see a dance to handle characters which are neither dec-equiv nor in Latin-1. Does anyone know about the intent of such a conversion? To support this:

running a c program from a python script

2005-12-03 Thread johnclare
Help - I'm (very) new to python. I want to run run a c executable from a python script - how do I do this? Many thanks for your help, j -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib on windows machines

2005-12-03 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: I've got a strange problem on windows (not very familiar with that OS). I can ping a host, but cannot get it via urllib (see here under). Thus network seems good, but not for python ;-(. Does any windows specialist can guide me (a poor linux user) to get

Re: running a c program from a python script

2005-12-03 Thread Scott David Daniels
johnclare wrote: Help - I'm (very) new to python. I want to run run a c executable from a python script - how do I do this? Many thanks for your help, j generally: import os os.execl(program_location) Look in os, Process management for further details. The next time you ask,

Re: running a c program from a python script

2005-12-03 Thread johnclare
Great stuff, thanks, it works. -- http://mail.python.org/mailman/listinfo/python-list

Re: CGI and long running job

2005-12-03 Thread Mardy
Le die Fri, 02 Dec 2005 20:35:52 -0800, merry.sailor ha scribite: For step 3 I use either os.system or os.popen(2). The problem is that the web server does not send the information of step 2 back to the browser, unless step 3 is completed. The browser simply waits for a response, without

Re: Eclipse best/good or bad IDE for Python?

2005-12-03 Thread BartlebyScrivener
if it is the *best* IDE for Python. Nobody can answer this for you. Just try them all. The two I like that I don't see mentioned in this thread are PythonCard (which is free) and WingWare (which costs $30.00 but you can try for free.) bs -- http://mail.python.org/mailman/listinfo/python-list

SCPocketGrades released

2005-12-03 Thread Philippe C. Martin
Dear all, I am very pleased to announce the release of SCPocketGrades V 0.1. SCPocketGrades is a GPL U3 smart drive-based grade book application. SCPocketGrades is coded in Python, wxPython, and C. SCPocketGrades' main features are: - (U3): no PC installation + data saved on smart drive (no

Re: SCPocketGrades released

2005-12-03 Thread Philippe C. Martin
oops: www.snakecard.com/src On Sat, 03 Dec 2005 12:26:52 -0600, Philippe C. Martin wrote: Dear all, I am very pleased to announce the release of SCPocketGrades V 0.1. SCPocketGrades is a GPL U3 smart drive-based grade book application. SCPocketGrades is coded in Python, wxPython, and

Re: Python Unicode decimal interpretation

2005-12-03 Thread Martin v. Löwis
Scott David Daniels wrote: int(u\N{DEVANAGARI DIGIT SEVEN}) 7 OK, That much I have handled. I am fiddling with direct-to-number conversions and wondering about cases like int(u\N{DEVANAGARI DIGIT SEVEN} + XXX + u\N{DEVANAGARI DIGIT SEVEN}) int() passes NULL as error

Re: Cheapest pocket device to code python on

2005-12-03 Thread adDoc's networker Phil
. I could actually touch-type on the psion (a genuine [/]pocket computer!) but I was looking forward to eventually writing a key mapper (new key layouts are always an aggravation) . my plans were snipped in the bud however, because I got cheap and tried to sneak around the warranty with a

Command Line drive Tk window

2005-12-03 Thread annagel
I have been working to build a media toolkit that uses pygame to modify image and sound data for the user. I have all of this working fine. The one thing I am working on now is adding a pop-up view for the image data as well as some pop-ups for file selection and color picking. I am having

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-03 Thread Tom Anderson
On Fri, 2 Dec 2005, [EMAIL PROTECTED] wrote: Dave Hansen wrote: TAB characters are evil. They should be banned from Python source code. The interpreter should stop translation of code and throw an exception when one is encountered. Seriously. At least, I'm serious when I say that.

Re: urllib on windows machines

2005-12-03 Thread william
Thanks Scott This part I can help you with: import platform platform.platform() 'Windows-2000-5.0.2195-SP4' # in my case platform.architecture() ('32bit', 'WindowsPE') platform.python_version() '2.4.2' platform.python_compiler() 'MSC

Re: urllib on windows machines

2005-12-03 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: ... [I said] So off-hand, I'd suspect some firewall thingie is getting in the way. Can you bless \Python24\python.exe and \Python24\pythonw.exe as applications allowed to do net traffic? Bingo! That's the problem: Blocked outgoing TCP - Source Local: (1898)

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-03 Thread Scott David Daniels
Tom Anderson wrote: On Fri, 2 Dec 2005, [EMAIL PROTECTED] wrote: Dave Hansen wrote: TAB characters are evil. They should be banned from Python source code. The interpreter should stop translation of code and throw an exception when one is encountered. Seriously. At least, I'm serious

Python Equivalent to Text::Autoformat

2005-12-03 Thread BartlebyScrivener
I'm new to both Perl Python. Is there a Python module or script somewhere comparable to the useful Perl module - Text::Autoformat? Thanks, BS -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-03 Thread D H
Scott David Daniels wrote: Tom Anderson wrote: So, could someone explain what's so evil about tabs? They appear in different positions on different terminals (older hard- copy), do different things on different OS's, and in general do not behave nicely. On many (but not all) systems,

Re: CGI and long running job

2005-12-03 Thread merry . sailor
Hello Mardy, thanks a lot for your help. I found the problem. Your suggestion made me look into some things I haven't thought before :-). I don't know if it is a browser/server/mine fault. The problem was that I was sending text/plain and a txt file. I soon as I started sending back to the browser

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-03 Thread Sybren Stuvel
D H enlightened us with: How is that a problem that some editors use 8 columns for tabs and others use less? So what? I don't care either. I always use tabs, and my code is always readable. Some people suggest one indents with four spaces, and replaces eight spaces of indenting with a tab. Now

Re: advice : how do you iterate with an acc ?

2005-12-03 Thread Bengt Richter
On 3 Dec 2005 03:28:19 -0800, [EMAIL PROTECTED] wrote: Bengt Richter wrote: On 2 Dec 2005 18:34:12 -0800, [EMAIL PROTECTED] wrote: Bengt Richter wrote: It looks to me like itertools.groupby could get you close to what you want, e.g., (untested) Ah, groupby. The generic

Convention for C functions success/failure

2005-12-03 Thread spam . noam
Hello, What is the convention for writing C functions which don't return a value, but can fail? If I understand correctly, 1. PyArg_ParseTuple returns 0 on failure and 1 on success. 2. PySet_Add returns -1 on failure and 0 on success. Am I correct? What should I do with new C functions that I

Checking length of each argument - seems like I'm fighting Python

2005-12-03 Thread Brendan
There must be an easy way to do this: For classes that contain very simple data tables, I like to do something like this: class Things(Object): def __init__(self, x, y, z): #assert that x, y, and z have the same length But I can't figure out a _simple_ way to check the arguments

Re: Checking length of each argument - seems like I'm fighting Python

2005-12-03 Thread Mike Erickson
* Brendan ([EMAIL PROTECTED]) wrote: [...] Is there a simpler way to check that either all arguments are scalars, or all are lists of the same length? Is this a poor way to structure things? Your advice is appreciated Disclaimer: I am new to python, so this may be a bad solution. import

distutils problem windows xp python 2.4.2

2005-12-03 Thread [EMAIL PROTECTED]
Hello I tried to combine c++ and python together. So I follow from this website: http://kortis.to/radix/python_ext/ I have this code: # prmodule.c static PyObject *pr_isprime(PyObject *self, PyObject *args){ int n, input; if (!PyArg_ParseTuple(args, i, input)) return

Re: Checking length of each argument - seems like I'm fighting Python

2005-12-03 Thread Alex Martelli
Brendan [EMAIL PROTECTED] wrote: ... def sLen(x): determines the number of items in x. Returns 1 if x is a scalar. Returns 0 if x is None xt = numeric.array(x) if xt == None: return 0 elif xt.rank == 0: return 1 else: return

Re: Checking length of each argument - seems like I'm fighting Python

2005-12-03 Thread Sam Pointon
It depends what you mean by 'scalar'. If you mean in the Perlish sense (ie, numbers, strings and references), then that's really the only way to do it in Python - there's no such thing as 'scalar context' or anything - a list is an object just as much as a number is. So, assuming you want a

Re: distutils problem windows xp python 2.4.2

2005-12-03 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: Hello I tried to combine c++ and python together. So I follow from this website: http://kortis.to/radix/python_ext/ and my setup.py file: from distutils.core import setup, Extension module = Extension('pr', sources = ['prmodule.c']) setup(name = 'Pr test',

Re: CGI module does not parse data

2005-12-03 Thread Tim Roberts
amfr [EMAIL PROTECTED] wrote: import cgi form = cgi.FieldStorage() print form[test] print test I would only be able to see test, not hello world I am sure its not my browser Did you mean: print form[test].value -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. --

Re: CGI and long running job

2005-12-03 Thread Tim Roberts
[EMAIL PROTECTED] wrote: Hello, I am using python and CGI to initiate a long running simulation (up to 5h long) on a remote machine. The main idea is that I use a form, enter the parameters and a CGI scripts start the simulation using these parameters. The structure of the script is: 1. Read

Function to retrieve running script

2005-12-03 Thread Harlin Seritt
Is there a function that allows one to get the name of the same script running returned as a string? Thanks, Harlin Seritt -- http://mail.python.org/mailman/listinfo/python-list

Scientific Notation

2005-12-03 Thread Dustan
How can I get a number into scientific notation? I have a preference for the format '1 E 50' (as an example), but if it's well known, it works. -- http://mail.python.org/mailman/listinfo/python-list

Re: Function to retrieve running script

2005-12-03 Thread Alex Martelli
Harlin Seritt [EMAIL PROTECTED] wrote: Is there a function that allows one to get the name of the same script running returned as a string? Something like: import sys def f(): return sys.modules['__main__'].__file__ might help. Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: Checking length of each argument - seems like I'm fighting Python

2005-12-03 Thread Alex Martelli
Sam Pointon [EMAIL PROTECTED] wrote: ... So, assuming you want a Things object to break if either a) all three arguments aren't sequences of the same length, or b) all three arguments aren't a number (or string, or whatever), this should work: #Not tested. class Things(object): def

Re: Scientific Notation

2005-12-03 Thread Alex Martelli
Dustan [EMAIL PROTECTED] wrote: How can I get a number into scientific notation? I have a preference for the format '1 E 50' (as an example), but if it's well known, it works. You mean something like: print '%e' % (1e50) 1.00e+50 ...? Alex --

Re: Scientific Notation

2005-12-03 Thread Dustan
No, I mean given a big number, such as 1000, convert it into scientific notation. -- http://mail.python.org/mailman/listinfo/python-list

Re: Scientific Notation

2005-12-03 Thread Roy Smith
In article [EMAIL PROTECTED], Dustan [EMAIL PROTECTED] wrote: 1000 print %e % 1000 1.00e+51 -- http://mail.python.org/mailman/listinfo/python-list

Re: Scientific Notation

2005-12-03 Thread Alex Martelli
Roy Smith [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], Dustan [EMAIL PROTECTED] wrote: 1000 print %e % 1000 1.00e+51 Exactly: the %e builds a ``scientific-notation string

Re: Scientific Notation

2005-12-03 Thread Jorge Godoy
Dustan [EMAIL PROTECTED] writes: No, I mean given a big number, such as 1000, convert it into scientific notation. It's the same. print %e % 1000 1.00e+51 -- Jorge Godoy [EMAIL

How to execute an EXE via os.system() with spaces in the directory name?

2005-12-03 Thread [EMAIL PROTECTED]
I am trying to run an exe within a python script, but I'm having trouble with spaces in the directory name. The following example will display the usage statement of the program, so I know that the space in the path to the exe is being handled correctly and that the program was executed. CMD=

regexp non-greedy matching bug?

2005-12-03 Thread John Hazen
I want to match one or two instances of a pattern in a string. According to the docs for the 're' module ( http://python.org/doc/current/lib/re-syntax.html ) the '?' qualifier is greedy by default, and adding a '?' after a qualifier makes it non-greedy. The *, +, and ? qualifiers are all

Re: How to execute an EXE via os.system() with spaces in the directory name?

2005-12-03 Thread jepler
This comes up from time to time. The brain damage is all Windows', not Python's. Here's one thread which seems to suggest a bizarre doubling of the initial quote of the commandline. http://groups.google.com/group/comp.lang.python/browse_frm/thread/89d94656ea393d5b/ef40a65017848671

Re: How to execute an EXE via os.system() with spaces in the directory name?

2005-12-03 Thread Vijay L
I don't have any problems with spaces in the folders. just for debugging, you could probably try os.system(CMD.replace(\\, /) On 3 Dec 2005 19:16:10 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I am trying to run an exe within a python script, but I'm having trouble with spaces in the

Re: regexp non-greedy matching bug?

2005-12-03 Thread Sam Pointon
My understanding of .*? and its ilk is that they will match as little as is possible for the rest of the pattern to match, like .* will match as much as possible. In the first instance, the first (.*?) did not have to match anything, because all of the rest of the pattern can be matched 0 or more

SOAPpy SOAP and/or WSDL Question

2005-12-03 Thread Rodney
Hi all, I am relatively weak in Python and I need some help with this. I have built a series of SOAP client functions that ping, authenticate (password username), and query a SOAP server. All works well but I cannt figure out on part of the download SOAP outgoing message. I also tried WSDL

Re: Checking length of each argument - seems like I'm fighting Python

2005-12-03 Thread Michael Spencer
Brendan wrote: ... class Things(Object): def __init__(self, x, y, z): #assert that x, y, and z have the same length But I can't figure out a _simple_ way to check the arguments have the same length, since len(scalar) throws an exception. The only ways around this I've found

Re: How to execute an EXE via os.system() with spaces in the directory name?

2005-12-03 Thread Peter Hansen
[EMAIL PROTECTED] wrote: This comes up from time to time. The brain damage is all Windows', not Python's. Here's one thread which seems to suggest a bizarre doubling of the initial quote of the commandline.

newbie write to file question

2005-12-03 Thread ProvoWallis
Hi, I'm trying to create a script that will search an SGML file for the numbers and titles of the hierarchical elements (section level headings) and create a dictionary with the section number as the key and the title as the value. I've managed to make some progress but I'd like to get some

Re: Function to retrieve running script

2005-12-03 Thread Mike Meyer
Harlin Seritt [EMAIL PROTECTED] writes: Is there a function that allows one to get the name of the same script running returned as a string? The questions a little ambiguous, but one answer might be: import sys myname = sys.argv[0] mike -- Mike Meyer [EMAIL PROTECTED]

Re: regexp non-greedy matching bug?

2005-12-03 Thread Tim Peters
[John Hazen] I want to match one or two instances of a pattern in a string. According to the docs for the 're' module ( http://python.org/doc/current/lib/re-syntax.html ) the '?' qualifier is greedy by default, and adding a '?' after a qualifier makes it non-greedy. The *, +, and ?

Re: regexp non-greedy matching bug?

2005-12-03 Thread Mike Meyer
John Hazen [EMAIL PROTECTED] writes: I want to match one or two instances of a pattern in a string. Then you should be using the split() method of the match object on the pattern in question. According to the docs for the 're' module ( http://python.org/doc/current/lib/re-syntax.html ) the

Re: Python Equivalent to Text::Autoformat

2005-12-03 Thread Paddy
Google is your freind. Try searching for: python text wrapping - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: Checking length of each argument - seems like I'm fighting Python

2005-12-03 Thread Mike Meyer
Brendan [EMAIL PROTECTED] writes: There must be an easy way to do this: Not necessarily. For classes that contain very simple data tables, I like to do something like this: class Things(Object): def __init__(self, x, y, z): #assert that x, y, and z have the same length But I

Python package installing rationale

2005-12-03 Thread Kay Schluehr
In almost any case I install a Python package via distutils some directories in the package tree are left behind e.g. the docs, licenses, tests etc. I wonder if there is some rationale behind this? Should it be left to the creative freedom of the user to copy the docs whereever she wants or is

Re: Python package installing rationale

2005-12-03 Thread Robert Kern
Kay Schluehr wrote: In almost any case I install a Python package via distutils some directories in the package tree are left behind e.g. the docs, licenses, tests etc. I wonder if there is some rationale behind this? Should it be left to the creative freedom of the user to copy the docs

Re: regexp non-greedy matching bug?

2005-12-03 Thread John Hazen
[John Hazen] I want to match one or two instances of a pattern in a string. s = 'foobarbazfoobar' foofoo = re.compile(r'^(foo)(.*?)(foo)?(.*?)$') foofoo.match(s).group(1) 'foo' foofoo.match(s).group(3) [Tim Peters] Your problem isn't that (foo)? is not greedy (it

Re: Checking length of each argument - seems like I'm fighting Python

2005-12-03 Thread Bengt Richter
On 3 Dec 2005 15:50:25 -0800, Brendan [EMAIL PROTECTED] wrote: There must be an easy way to do this: For classes that contain very simple data tables, I like to do something like this: class Things(Object): def __init__(self, x, y, z): #assert that x, y, and z have the same length

Trouble with idle from python 2.4.2 on SUSE linux 9.3

2005-12-03 Thread Alasdair
I've just installed python 2.4.2 from source - it works fine from the command line. But when I attempt to start idle, I am told: ** IDLE can't import Tkinter. Your Python may not be configured for Tk. ** I have tcl 8.4 and tk 8.4 on my system; can anybody provide me with some advice? Sorry if

Re: How to execute an EXE via os.system() with spaces in the directory name?

2005-12-03 Thread Bengt Richter
On 3 Dec 2005 19:16:10 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I am trying to run an exe within a python script, but I'm having trouble with spaces in the directory name. The following example will display the usage statement of the program, so I know that the space in the path to the

Re: regexp non-greedy matching bug?

2005-12-03 Thread John Hazen
[Mike Meyer] The thing to understand is that regular expressions are *search* functions, that return the first parsing that matches. They search a space of possible matches to each term in the expression. If some term fails to match, the preceeding term goes on to its next match, and you try

[ python-Bugs-1372650 ] Cookie and multiple names

2005-12-03 Thread SourceForge.net
Bugs item #1372650, was opened at 2005-12-03 18:47 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1372650group_id=5470 Please note that this message will contain a full copy of