Re: oval

2005-12-04 Thread Peter Otten
e handler for all shapes: def handler(event): print event.widget.gettags("current")[0], "got hit" canvas.tag_bind('oval1', '', handler) canvas.tag_bind('oval2', '', handler) I prefer one handler per shape: def make_handler(message): def handler(event): print message return handler canvas.tag_bind('oval1', '', make_handler("oval 1 got hit")) canvas.tag_bind('oval2', '', make_handler("oval 2 got hit")) Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Equivalent to Text::Autoformat

2005-12-04 Thread Peter Hansen
y googling for that instead: http://www.google.com/search?q=python+structured+text -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Tabs bad (Was: ANN: Dao Language v.0.9.6-beta is release!)

2005-12-04 Thread Peter Decker
On 12/4/05, Lee Harr <[EMAIL PROTECTED]> wrote: > Everyone agrees that mixing is bad. I might even go so far as to > say that the only real problem is mixing. The question is, if we > are trying to pick only one, which one causes fewer problems. > > For me, it is spaces. Why is it that the only p

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

2005-12-04 Thread Peter Decker
On 12/4/05, Mike Meyer <[EMAIL PROTECTED]> wrote: > >> See, I can make up bizarre scenarios where spaces cause > >> problems, too. > > Only if you don't know how decent editors behave. :) > > But the same is also true of tabs causing problems :-). I'm starting to suspect that the same people

Re: option argument length

2005-12-04 Thread Peter Otten
licit constraint checks like options, args = parser.parse_args() if options.eat_your_cake and options.have_it: parser.error("Sorry, you cannot eat your cake and have it") will increase your script's usability and make it easier to maintain for only a tiny amount of work. Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Bitching about the documentation...

2005-12-04 Thread Peter Hansen
e a text field for a user name or something, though it does clearly have the word "Search" in it until you click there... -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: oval

2005-12-05 Thread Peter Otten
lly sufficient. Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: change color

2005-12-05 Thread Peter Otten
s.create_oval(50, 50, 80, 80, tags="oval2", fill="yellow") canvas.tag_bind("oval2", "", turnRed) canvas.tag_bind("oval2", "", turnYellow) canvas.bind("", keypress) canvas.bind("", keypress) canvas.focus_set() root.mainloop() Try pressing Return with the mouse pointer over oval2 and elsewhere on the canvas. Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Double decoding of strings??

2005-12-05 Thread Peter Otten
[EMAIL PROTECTED] wrote: > Ultimately, I think the solution will be to .decode('utf-8') a string > twice Try >>> "Altru\xc3\x83\xc2\xafsme".decode("utf8").encode("latin1").decode("utf8") u'Altru\xefsme' >>> print _ Altruïsme Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: How to ping in Python?

2005-12-05 Thread Peter Hansen
executable, or try using Google (e.g. "python ping" would have produced apparently useful results for you). -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: reddit.com rewritten in Python

2005-12-05 Thread Peter Hansen
issue, the post at http://reddit.com/blog/2005/12/night-of-living-python.html says: """For all you Lispers, stay tuned for a longer post about why we rewrote in Python.""" -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython : getting started

2005-12-05 Thread Peter Milliken
Perhaps the authors should create a new "release" every 6 months or so just so people don't get this (mistaken) impression - I am just not sure what they should put into each new "release" :-) Regards, Peter "Magnus Lycka" <[EMAIL PROTECTED]> w

Re: option argument length

2005-12-06 Thread Peter Otten
ldn't you need at least two options to demonstrate "mutually inclusive" options? The set_default() method seems to accept only keyword arguments -- but even it were used correctly I'm still unclear why you would need it at all. Perhaps you can post a few sample invocations (both

Re: i=2; lst=[i**=2 while i<1000]

2005-12-06 Thread Peter Otten
r(...) iter(collection) -> iterator iter(callable, sentinel) -> iterator Get an iterator from an object. In the first form, the argument must supply its own iterator, or be a sequence. In the second form, the callable is called until it returns the sentinel. ""&qu

Re: ANN: pygene - genetic algorithms package

2005-12-06 Thread Peter Hansen
lease clarify how your "fixed genome" comment relates to any of this? -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: extract python install info from registry

2005-12-06 Thread Peter Hansen
environment. If it's just a matter of creating those associations, I believe you can do that equally well using the "ftype" and "assoc" console commands, via os.system() or something similar. -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Documentation suggestions

2005-12-06 Thread Peter Hansen
ttedly obvious) point only because (a) sometimes debates about process are fruitless, and (b) having _both_ would fix even more problems than just having a good process. -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: pygene - genetic algorithms package

2005-12-06 Thread Peter Hansen
r, could they be described as heterogenous, and for some problems I've been varying the quantity of genetic material in my genomes. Thus my preoccupation with that "fixed". -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Wrapping method calls with metaclasses

2005-12-07 Thread Peter Otten
sname,bases,classdict): logmatch = re.compile(classdict.get('logMatch','.*')) for attr,item in classdict.items(): if callable(item) and logmatch.match(attr): classdict[attr] = logmethod(attr, item) # replace method by wrapper return type.__new__(cls,classname,bases,classdict) Be warned that I did not thoroughly test that. Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: pygene - genetic algorithms package

2005-12-07 Thread Peter Hansen
lems (where often you do not even > know the high-level form that they will take -- something you need to > decide to put together a genetic algorithm). I agree, and I look forward to seeing Psi some time, if just to help me learn more in the area. Thanks again for the comments. -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Calculating Elapsed Time

2005-12-07 Thread Peter Hansen
our best bet to determine why is to check the documentation for your system (also go figure), since the details are not really handled by Python. Going by memory, Linux will generally be 1ms resolution (I might be off by 10 there...), while Windows XP has about 64 ticks per second, so .015625 reso

Re: option argument length

2005-12-07 Thread Peter Otten
f.py --fetch-update bar --the-mutually-inclusive-option baz do? Would the first terminate with an error message that another option must also be given? Would it use the default? Would the second be accepted? Try to describe it as simple and clear as possible. Imagine you were talking to someone who has never written a line of code. Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Calculating Elapsed Time

2005-12-07 Thread Peter Hansen
Fredrik Lundh wrote: > Peter Hansen wrote: >>Going by memory, Linux will generally be 1ms resolution (I might be >>off by 10 there...), while Windows XP has about 64 ticks per second, >>so .015625 resolution... > [snip script] > if I run this on the Windows 2K box I

Re: Calculating Elapsed Time

2005-12-07 Thread Peter Hansen
Peter Hansen wrote: > Fredrik Lundh wrote: >>Peter Hansen wrote: >>>Going by memory, Linux will generally be 1ms resolution (I might be >>>off by 10 there...), while Windows XP has about 64 ticks per second, >>>so .015625 resolution... > >>if I run th

Re: option argument length

2005-12-07 Thread Peter Otten
omething better for the moment. Maybe you should just provide fewer defaults to the parser. Or you could look into option callbacks for an alternate approach. > Is my way (up till now) of using optparse logically incorrect or improper > ? Well, as the optparse author points out, "required options" are a self-contradictory term -- don't use them if you can avoid it. Would your problem go away if you used two different scripts, one for updating and the other for upgrading? Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: how to put form and display its result(data from database) on the same window?

2005-12-07 Thread Peter Hansen
rning curve involved. -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get the extension of a filename from the path

2005-12-08 Thread Peter Hansen
quot;txt" and "TXT" (and others) are equivalent on Windows file systems. On that note, is there a common idiom for detecting that information? -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Encoding of file names

2005-12-08 Thread Peter Hansen
lib folder.) If you're really seeing what you're seeing, I suspect a bug since if os.listdir() can find it (and it's really a file), os.isfile() should report it as a file, I would think. -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Encoding of file names

2005-12-08 Thread Peter Otten
nce > python (on Win32, at least) does not recognize this as a valid > filename. Does the problem persist if you feed os.listdir() a unicode path? This will cause listdir() to return unicode filenames which are less prone to encoding confusion. Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: how to put form and display its result(data from database) on the same window?

2005-12-08 Thread Peter Hansen
ed you to. (The page I pointed you to actually links to the following one, in case you didn't notice: http://en.wikipedia.org/wiki/Ajax_%28programming%29 ) -Peter -- http://mail.python.org/mailman/listinfo/python-list

Catching error text like that shown in console?

2005-12-09 Thread Peter A.Schott
I know there's got to be an easy way to do this - I want a way to catch the error text that would normally be shown in an interactive session and put that value into a string I can use later. I've tried just using a catch statement and trying to convert the output to string, but this doesn't alway

Re: heartbeats

2005-12-09 Thread Peter Hansen
Tom Anderson wrote: > On Fri, 9 Dec 2005, Sybren Stuvel wrote: >>You probably mean "really a ping, just not an ICMP echo request". > > What's a real ping, if not an ICMP echo request? That's pretty much the > definitive packet for internetwork groping as far as i know. I think that > the more ge

Re: How to detect the presence of a html file

2005-12-09 Thread Peter Hansen
html') os.path.isfile('c:/wumpus.c') The only time this doesn't really work is when you pass the path to the Windows "shell". Or when you naively compare paths without using something like normpath() on them first... -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Thoughts on object representation in a dictionary

2005-12-09 Thread Peter Hansen
dictionary of strings...thats it. You're describing a task that is named "serialization". Google for "python serialization" and you'll get lots of useful and interesting background to help you out. -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: How to detect the presence of a html file

2005-12-09 Thread Peter Hansen
Irmen de Jong wrote: > Forward slashes as path separator only works on NTFS volumes I believe. I'm not sure what they *don't* work on, but at the least they also work across the network as in: os.listdir('//server/shared/xfer') Maybe that still qualifies as &quo

Re: binascii.crc32 results not matching

2005-12-09 Thread Peter Hansen
;polynomial", though just quoting that isn't sufficient to describe their behaviour, but if you happen to know the polynomial for your utility, someone else can probably point you to a more appropriate routine, or perhaps explain what you were doing wrong if the binascii

Re: lambda (and reduce) are valuable

2005-12-10 Thread Peter Otten
t; x = 2 >>> a0 + x*(a1 + x*(a2)) 17 >>> def horner(coefs, x): return reduce(lambda a1, a2: a1*x + a2, coefs) ... >>> horner([a0, a1, a2], x) 11 Are we merely employing different conventions for the order of coefficients or is that simple and expressive lambda/reduce stuff

Re: binascii.crc32 results not matching

2005-12-10 Thread Peter Hansen
Raymond L. Buvel wrote: > Check out the unit test in the following. > > http://sourceforge.net/projects/crcmod/ > > I went to a lot of trouble to get the results to match the results of > binascii.crc32. As you will see, there are a couple of extra operations > even after you get the polynomial

Re: how to put form and display its result(data from database) on the same window?

2005-12-10 Thread Peter Hansen
Tim Roberts wrote: > Peter Hansen <[EMAIL PROTECTED]> wrote: >>[EMAIL PROTECTED] wrote: >>>... Now >>>I want to put the form and display data on the same window. >> >>The most modern approach to this...is AJAX (see >>http://en.wikipedia.org/wiki

Re: pyUnitPerf

2004-12-31 Thread Peter Hansen
he fixture. That's not an issue with the framework, though, is it? Just with your specific tests and application? -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: spacing of code in Google Groups

2004-12-31 Thread Peter Hansen
Grant Edwards wrote: I always rather liked line numbers (a-la 'can -n'). That also makes discussion of the code easier: That, unfortunately, is somewhat harder to remove without using a regular expression... leading hash marks # is pretty simple to remove with almost any editor. -Pet

Re: The Industry choice

2005-01-02 Thread Peter Dembinski
Paul Rubin writes: [...] > I don't understand that. If I see "str x = str(3)", then I know > that x is a string. def foo(x): return str(x) str = foo(x) And now, let's say that foo()'s definition is in another module. It is hard for a programmer to quickly determ

Re: The Industry choice

2005-01-02 Thread Peter Dembinski
"Donn Cave" <[EMAIL PROTECTED]> writes: [...] > For me, the effect is striking. I pound out a little program, > couple hundred lines maybe, and think "hm, guess that's it" and save > it to disk. Run the compiler, it says "no, that's not it - look > at line 49, where this expression has type st

[OT] Re: The Industry choice

2005-01-02 Thread Peter Dembinski
Paul Rubin <http://[EMAIL PROTECTED]> writes: > Peter Dembinski <[EMAIL PROTECTED]> writes: >> If it has to be both reliable and secure, I suggest you used more >> redundant language such as Ada 95. > > That's something to think about and it's come up

Re: What can I do with Python ??

2005-01-02 Thread Peter Hansen
out a magnifying glass... Providing the user with the *option* of running in a window, preferably resizable, or full-screen, would be best. -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: The Industry choice

2005-01-02 Thread Peter Dembinski
Peter Dembinski <[EMAIL PROTECTED]> writes: [...] > str = foo(x) (ick!) it should be: bar = foo(x) -- http://mail.python.org/mailman/listinfo/python-list

Re: The Industry choice

2005-01-02 Thread Peter Dembinski
Peter Dembinski <[EMAIL PROTECTED]> writes: > Peter Dembinski <[EMAIL PROTECTED]> writes: > > [...] > >> str = foo(x) > > (ick!) it should be: > > bar = foo(x) Besides, shouldn't str be a reserved word or something? -- http://mail.python.org/mailman/listinfo/python-list

Re: The Industry choice

2005-01-02 Thread Peter Dembinski
Bulba! <[EMAIL PROTECTED]> writes: [...] > The point is obviously "cover your ass" attitude of managers: Managers get paid for taking risk :) -- http://mail.python.org/mailman/listinfo/python-list

Re: The Industry choice

2005-01-02 Thread Peter Hansen
s it's possible there are more. ;-) -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: The Industry choice

2005-01-03 Thread Peter Dembinski
Peter Hansen <[EMAIL PROTECTED]> writes: > Roy Smith wrote: >> "Terry Reedy" <[EMAIL PROTECTED]> wrote: >> >>> None has been reserved because there is no known good use for >>> overriding it. >> Should I infer from the above that there

Re: The Industry choice

2005-01-03 Thread Peter Hansen
s driven by a strong, recurring need, and I only do just enough to meet that need, in the simplest way I can find. (Often, that ends up not involving a computer.) -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Advice request for project

2005-01-03 Thread Peter Hansen
e actually described. The latter is actually a Python-like language that lets one write code that can be compiled as an extension module, to write performance-critical code or interface to existing libraries more easily. -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I make Windows Application with Python ?

2005-01-03 Thread Peter Hansen
k a more specific, detailed question to get useful answers.) -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: python intergration bus ?

2005-01-04 Thread Peter Hansen
do it without just referencing some Java product which none of us will know about.) Thanks, -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Python evolution: Unease

2005-01-04 Thread Peter Hansen
responsibility to do the missing work, since I'm not the one making those advocacy claims. So those who claim Python is well-documented are the ones who should improve the documentation, but those claiming that the documentation is poor should feel no responsibility to make the improvements? Does this make any sense to you? To me, *this* is the nonsense. -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.4 on Windows XP

2005-01-05 Thread Peter Hansen
l. I don't have any trouble running the python command line version. Do you mean "python.exe" here? Are you saying that you can run IDLE using python.exe, but not using pythonw.exe? Or something else? It's not clear. -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: spacing of code in Google Groups

2005-01-05 Thread Peter Hansen
Jacek Generowicz wrote: Peter Hansen <[EMAIL PROTECTED]> writes: Grant Edwards wrote: I always rather liked line numbers (a-la 'can -n'). That also makes discussion of the code easier: That, unfortunately, is somewhat harder to remove without using a regular expression... You

Re: No typical loops, and other crazy ideas

2005-01-06 Thread Peter Otten
gt; #oldl=list(orig) > #newl=list(orig) Because you used the same reader twice newl will always be empty. Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Embedding a restricted python interpreter

2005-01-06 Thread Peter Maas
l designed language but progress is made by criticism not by satisfaction ;) -- --- Peter Maas, M+R Infosysteme, D-52070 Aachen, Tel +49-241-93878-0 E-mail 'c

Re: OT: spacing of code in Google Groups

2005-01-06 Thread Peter Hansen
Jacek Generowicz wrote: Peter Hansen <[EMAIL PROTECTED]> writes: Why the heck would I ever have to do "rectangle operations" on a regular basis? ;-) Well, given that all editors are cat equivalent[*], you don't _have_ to use any of their features :-) This "cat equivale

Re: 2 versions of python on 1 machine

2005-01-06 Thread Peter Hansen
er as well. The content of each batch file is like this: @echo off c:\python23\python.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: File Handling Problems Python I/O

2005-01-06 Thread Peter Hansen
c:\\temp\\myfile.txt" Much less readable that way, but sometimes the right thing to do... -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: spacing of code in Google Groups

2005-01-06 Thread Peter Hansen
Steve Holden wrote: Peter Hansen wrote: But the whole argument is fairly moot... I've needed a rectangle operation only once in the last ten years, and if I hadn't known at the time that my editor could do it (and spent about half an hour figuring out how it worked), I could have

Re: Embedding a restricted python interpreter

2005-01-06 Thread Peter Maas
th the id of an authenticated user. But this seems to be a problem with Apache or with Linux? -- --- Peter Maas, M+R Infosysteme, D-52070 Aachen, Tel +49-241-93878-0 E-mail 'cGV0ZXIubWFhc0BtcGx1c3IuZG

Re: File Handling Problems Python I/O

2005-01-06 Thread Peter Hansen
llowing link in the docs provides a list of all the recognized escape sequences: http://www.python.org/doc/current/ref/strings.html -Peter -- http://mail.python.org/mailman/listinfo/python-list

Really OT (was Re: OT: spacing of code in Google Groups)

2005-01-06 Thread Peter Hansen
Alex Martelli wrote: Peter Hansen <[EMAIL PROTECTED]> wrote: This "cat equivalent" thing is a red-herring. I can rarely type more I tried offering a red herring to my cat to check this out, and, sure enough, she indignantly refused it and miaowed loudly for less smelly food. So

[OT] Re: The Industry choice

2005-01-06 Thread Peter Dembinski
Bulba! <[EMAIL PROTECTED]> writes: [...] > That's remarkable, first time I see smth like this - > out of curiosity, could you say a word where was that? Are you the same Bulba I know from alt.pl.comp.os.hacking? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python evolution: Unease

2005-01-06 Thread Peter Hansen
ipt in the first place? (Assuming that has one of the straightforward answers I can think of, then I would say the answer to your question is "certainly"... I think most installers support a "silent" option so that they could be run from a script.) -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Operating System???

2005-01-06 Thread Peter Hansen
Fuzzyman wrote: There is/was a project (Peter Hansen ?) to produce a pure python file system. that could be an interesting component. Good memory... uh, sort of. :-) It was probably me you're thinking of, but the point of the project was solely a "virtual" file system, to be used

Re: Embedding a restricted python interpreter

2005-01-07 Thread Peter Maas
ems to be an OS issue. -- --- Peter Maas, M+R Infosysteme, D-52070 Aachen, Tel +49-241-93878-0 E-mail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n'.decode('base64') --

Re: OT: spacing of code in Google Groups

2005-01-08 Thread Peter Hansen
nctionality once in the last ten years, but on behalf of those who do what it and didn't know how to get it, I give you thanks. ;-) -quite-happy-with-simple-editors-and-a-command-line-ly y'rs, Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: sorting on keys in a list of dicts

2005-01-08 Thread Peter Hansen
single sort with the key combination "key 1, key 2", not the other way around. -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: 2 versions of python on 1 machine

2005-01-08 Thread Peter Hansen
orry, I don't recall where else there is useful info on those, though I'm pretty sure Google could help. (I'm not sure there's much to add to what the "-h" option tells you, however.) -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: python3: 'where' keyword

2005-01-08 Thread Peter Hansen
not a tuple as you seem to think. -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Operating System???

2005-01-08 Thread Peter Hansen
think more than twice of resorting to a little "glue" in assembler or in the form of "canned" byte sequences built by hand and stuck into the appropriate places in memory... -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: google groups bug, or worse?

2005-01-08 Thread Peter Hansen
them. Given the "architecture" of Usenet, I wouldn't be surprised if Google missed messages consistently, a very small percentage of the time. -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: "A Fundamental Turn Toward Concurrency in Software"

2005-01-08 Thread Peter Hansen
ce" reasons. *I* certainly have: that's easily the reason for threading in 95% of the cases I've dealt with, and I suspect those of many others. -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Recent infoworld column

2005-01-08 Thread Peter Hansen
Dwarf Electrician wrote: from a long time listener... http://www.infoworld.com/article/04/12/30/01OPstrategic_1.html Kudos for Roger Binns! -- http://mail.python.org/mailman/listinfo/python-list

Re: windows mem leak

2005-01-08 Thread Peter Hansen
application to cause memory to leak as a result of your own code, not as a result of Python's. And it's even possible that this would happen only on one platform (though I'm trying hard to think of an example and can't... maybe it's very unlikely.) -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: windows mem leak

2005-01-09 Thread Peter Hansen
Bob Smith wrote: Attached is the code. Run it yourself and see. You too Peter. Be gentle with me, this was my first attempt with threads. Thanks, Bob, and I will, but not before you answer some of my questions. I had good reasons to ask them, one of which is that I don't feel like wasting my

Re: Python Installation

2005-01-09 Thread Peter Hansen
at is required. Google for his name and "python registry" to find out more. -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: time module precision

2005-01-09 Thread Peter Hansen
omething that is entirely unnecessary, probably for good reasons but with too little experience of the issues involved. Can you expand on your situation? -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Installation

2005-01-09 Thread Peter Hansen
Steve Holden wrote: Peter Hansen wrote: Simon John wrote: I would say install on one machine, then just copy the C:\Python24 directory, but then you'd have to deal with the missing Registry entries That part is pretty trivial to automate as well. Fredrik Lundh has a useful utility on hi

Re: Guild of Python consultants?

2005-01-09 Thread Peter Hansen
uld cause a great deal of confusion amongst its members and their clients. Which type do you mean? -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: read numbers from file and covert to integer

2005-01-09 Thread Peter Hansen
could post some kind of example of the sorts of data you are talking about, perhaps a hex representation of the bytes (if it's a binary file). Otherwise we are just guessing how you are using the terms "block", "number", "string", and even "integer".

Re: windows mem leak

2005-01-09 Thread Peter Hansen
Bob Smith wrote: Peter Hansen wrote: [snip details of Bob's platform] WinXP Home, Service Pack 2, AMD 1400MHz proc, 256MB Ram That's not really much RAM for a WinXP box. Do you have lots of physical memory available before running? (I presume you're using a version of nmap that

Re: windows mem leak

2005-01-09 Thread Peter Hansen
Roel Schroeven wrote: Peter Hansen wrote: How have you proven that it is not *that* program which is at fault?) It would surprise me: even if it consumes much CPU-time, memory and other resources, each instances returns all resources when it exits. I agree with that statement, but you assume that

Re: SuSE 9.1: updating to python-2.4

2005-01-09 Thread Peter Maas
regular upgrade via FTP. I didn't try that. -- ------- Peter Maas, M+R Infosysteme, D-52070 Aachen, Tel +49-241-93878-0 E-mail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n'.decode('base64') --

Uploading files

2005-01-10 Thread Peter Mott
If you upload a file using the cgi module is there anyway to discover the file name that the user submitted as well as the file data? I've googled till I squint but I can't find anything. Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: time module precision

2005-01-10 Thread Peter Hansen
[EMAIL PROTECTED] wrote: Peter Hansen wrote: _Why_ do you want to wait such brief amounts of time? What I am trying to do is sending binary data to a serial port. Since the device attached to the port cannot handle a continous in-flow of data, I need to make an artificial tiny delay in-between

Re: exceptions and items in a list

2005-01-10 Thread Peter Hansen
h those, or not do a simple "pass". See Vincent's response, for example, where he explicitly asks only for ValueErrors and lets others propagate upwards, to be reported. (I realize these were contrived examples, but examples that don't mention this important issue risk the propagatio

Re: Uploading files

2005-01-11 Thread Peter Mott
Thanks for this. Peter "Robert Brewer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Peter Mott wrote: > If you upload a file using the cgi module is there any > way to discover the file name that the user submitted > as well as the file data? I've

Re: [csv module] duplication of end of line character in output file generated

2005-01-11 Thread Peter Otten
simon.alexandre wrote: > I use csv module included in python 2.3. I use the writer and encouter the > following problem: in my output file (.csv) there is a duplication of the > end of line character, so when I open the csv file in Ms-Excel a blank > line is inserted between each data line. > > O

Re: SuSE 9.1: updating to python-2.4

2005-01-11 Thread Peter Otten
mark python for removal in yast, then click the [Abhängigkeiten prüfen] (check dependencies) button -- and probably cancel the changes afterwards. Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Exception not captured

2005-01-11 Thread Peter Otten
ssible? Some kind of duplicate import, maybe? E.g.: >>> import sys >>> import inspect >>> getsource = inspect.getsource >>> del sys.modules["inspect"] >>> import inspect >>> getsource is inspect.getsource False Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Importing Problem on Windows

2005-01-11 Thread Peter Otten
en the two modules. If you do that, don't forget to delete the compiled module parser.pyc or parser.pyo, too. Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: how to set doc-string of new-style classes

2005-01-11 Thread Peter Otten
r: >>> T = type("T", (object,), dict(__doc__="what you want")) >>> T.__doc__ 'what you want' Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: reference or pointer to some object?

2005-01-11 Thread Peter Maas
<-- inner local namespace {'fi': , 'u': 4, 'u2': 8} <-- outer local namespace 8 -- --- Peter Maas, M+R Infosysteme, D-52070 Aachen, Tel +49-241-93878-0 E-mail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n

Re: a new Perl/Python a day

2005-01-11 Thread Peter Maas
if you don't want to waste your time. -- --- Peter Maas, M+R Infosysteme, D-52070 Aachen, Tel +49-241-93878-0 E-mail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n'.decode('base64') --- -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: MoinMoin and Mediawiki?

2005-01-11 Thread Peter Maas
ocal/pgsql/bin/createdb test /usr/local/pgsql/bin/psql test The first four lines are the same for every source based distribution, only 8 lines are PostgreSQL specific. I don't think this is too complex. -- --- Peter Maas, M+R In

<    18   19   20   21   22   23   24   25   26   27   >