Re: Determining the length of strings in a list

2005-03-13 Thread Michael Hoffman
[EMAIL PROTECTED] wrote: I have a dictionary. Each key contains a list. I am using the contents of the list to build a portion of a command line. However, before I can build the command line, I have to make sure that the command isn't too long. This means that I have to step through each item in

Re: Convert python to exe

2005-03-13 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > I have a python script under linux, I wonder if I can be converted to > an executable or not? Place '#!/usr/bin/env python' as the first line of your script and type:: chmod u+x yourscript.py at the command line. ;-) Ciao, Marc 'Bla

Re: Convert python to exe

2005-03-13 Thread [EMAIL PROTECTED]
I wonder if I get the executable like c program compiled by gcc -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode BOM marks

2005-03-13 Thread Steve Horsley
Martin v. LÃwis wrote: Steve Horsley wrote: It is my understanding that the BOM (U+feff) is actually the Unicode character "Non-breaking zero-width space". My understanding is that this used to be the case. According to http://www.unicode.org/faq/utf_bom.html#38 the application should now speci

Re: Creating desktop icons for Innosetup file

2005-03-13 Thread Greg Ewing
Will McGugan wrote: You need to set the working dir for the icon in the [Icons] sections. It would be better to re-design the application so that it doesn't rely on being started with any particular working directory. Then it will still work if the user creates additional shortcuts that don't have

Re: Apparently, I don't understand threading

2005-03-13 Thread jepler
The Python threading model doesn't allow one thread to forcibly terminate another. This has been discussed many times before, I think that the short answer is a combination of (a) it's hard to specify what happens in the terminated thread, without the possibility of leaving the program in an unkno

RE: Apparently, I don't understand threading

2005-03-13 Thread jwsacksteder
I realize that. I'm using a variant of the polite shutdown request technique used in the python cookbook. The problem is that thread creation is apparently blocking instead of continuing program execution. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Sunday,

Re: Apparently, I don't understand threading

2005-03-13 Thread Dave Brueck
[EMAIL PROTECTED] wrote: The following script does not behave as expected. I wanted to terminate the 'mythread' thread after 5 seconds. What I see is the threading.Thread call blocking until the 15 second sleep is done. Suggestions? [snip] foo = FooClass() mythread = threading.Thread(foo.stall()

[ANN] pysqlite 2.0.alpha2

2005-03-13 Thread Gerhard Haering
pysqlite 2.0.alpha2 === The last release was back in Nov. 2004, but pysqlite 2 development is going on faster now. So it's time for another alpha release to collect feedback. Please report any bugs you find on the pysqlite mailing list, or even better on the trac tracking system a

Bug?

2005-03-13 Thread [EMAIL PROTECTED]
Hello Ive recently found that you cannot type anything over 7 into a number that is preceded with a 0. ex: >>> 01 1 >>> 07 7 >>> 08 SyntaxError: invalid token >>> 011 9 >>> 017 15 >>> 077 63 >>> 078 SyntaxError: invalid token I know this i

Re: Bug?

2005-03-13 Thread Joe Wong
I think python is expecting a octet number from the input?   - Joe   - Original Message - From: [EMAIL PROTECTED] To: python-list@python.org Sent: Monday, March 14, 2005 10:51 AM Subject: Bug? HelloIve recently found that you cannot type anything over 7 into a nu

Re: Bug?

2005-03-13 Thread Artie Gold
[EMAIL PROTECTED] wrote: Hello Ive recently found that you cannot type anything over 7 into a number that is preceded with a 0. ex: >>> 01 1 >>> 07 7 >>> 08 SyntaxError: invalid token >>> 011 9 >>> 017 15 >>> 077 63 >>> 078 SyntaxError: inva

Re: Convert python to exe

2005-03-13 Thread Stephen Thorne
On 13 Mar 2005 14:31:53 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi > > I have a python script under linux, I wonder if I can be converted to > an executable or not? Yes, you can use cx_Freeze. Regards, Stephen Thorne -- http://mail.python.org/mailman/listinfo/python-list

Re: Adapting code to multiple platforms

2005-03-13 Thread Peter Hansen
Paul Watson wrote: "Peter Hansen" <[EMAIL PROTECTED]> wrote: Simon John wrote: You could try import win32api and checking for an exception ;-) (Winky noted) Just in case anyone thinks that last is a useful idea, keep in mind that win32api is not installed (with the standard distribution) but must

Re: Convert python to exe

2005-03-13 Thread [EMAIL PROTECTED]
Thanks. -- http://mail.python.org/mailman/listinfo/python-list

[OT] Who Knows of a Good Computational Physics Textbook?

2005-03-13 Thread Dan Sommers
Hi, I posted this to sci.physics and alt.sci.physics and got nowhere; perhaps the much more friendly and helpful crowd here can help me. I know that a lot of pythonistas are, in fact, scientists. I am a non-traditional, undergraduate physics (and math) student with 20+ years of professional soft

Re: Who Knows of a Good Computational Physics Textbook?

2005-03-13 Thread beliavsky
There is some info on teaching computational physics at Rubin Landau's site http://www.physics.orst.edu/~rubin/ . Springer recently published the book "Python Scripting for Computational Science" by Hans P. Langtangen . Searching "computational physics" at Amazon returns some relevant books. --

Unimport module

2005-03-13 Thread Chmouel Boudjnah
Hi, I have some code like that to do kind of plugins load : dir = listdir('/path/') for i in dir: sys.path.append('/path/' + i "/") import Module doStuff() sys.path.remove('/path/' + i "/") it's obviously not working since it get only the first import Module while t

Re: Python-list Digest, Vol 18, Issue 208

2005-03-13 Thread Charles Hartman
I know this isnt that big of a problem, but i cannot think of one reason why they would not allow numbers preceded with a 0 to have a number higher then a 7 in them... And it seems very inconsistant to me... Is there a reason for this? I *love* questions I can answer! Answer: because that's how y

Re: Linux Multimedia System

2005-03-13 Thread Marek Franke
> Just wondering how you're supporting the Xbox controller. I bought a > cable and driver a few months back to hook up to my computer. Are you > using a Python alternative?? > No, I rebuild the connector to USB and loaded the xpad-driver (Linux), that's all. Just the same with the SNES pads (para

Re: Linux Multimedia System

2005-03-13 Thread Marek Franke
> Freevo is pure python already ;) > > Greetings, Roland OK, but it's more the 'thrill' to create something own, not the matter which language we/they use. And even there is only a little image-viewer and a little CD-player, it's fun (for me) to use it already on my TV. Marek -- http://mail.

Re: Unimport module

2005-03-13 Thread Terry Reedy
"Chmouel Boudjnah" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > dir = listdir('/path/') > for i in dir: > sys.path.append('/path/' + i "/") > import Module > doStuff() > sys.path.remove('/path/' + i "/") > > it's obviously not working since it get only the first import Module >

Re: Linux Multimedia System

2005-03-13 Thread Lucas Raab
Marek Franke wrote: Just wondering how you're supporting the Xbox controller. I bought a cable and driver a few months back to hook up to my computer. Are you using a Python alternative?? No, I rebuild the connector to USB and loaded the xpad-driver (Linux), that's all. Just the same with the SNES

Re: newbie: dictionary - howto get key value

2005-03-13 Thread Joal Heagney
Tim Roberts wrote: "G. Völkl" <[EMAIL PROTECTED]> wrote: I use a dictionary: phone = {'mike':10,'sue':8,'john':3} phone['mike'] --> 10 I want to know who has number 3? 3 --> 'john' How to get it in the python way ? If you need to do this a lot, just keep two dictionaries, where the keys in each

Re: Searching for a ComboBox for Tkinter?

2005-03-13 Thread Harlin Seritt
Thanks nirinA... I've played with that one before. I'm not a big fan of Pmw or Tix so much I guess although when it gets down to it, those 'extra' toolkits are probably more functional. Cheers, Harlin -- http://mail.python.org/mailman/listinfo/python-list

Re: Searching for a ComboBox for Tkinter?

2005-03-13 Thread Harlin Seritt
ahh Frame! I didn't even think of extending Frame. I kept wondering how I could instead extend entry and listbox... thanks for the pointer. Yeah I know there are others out there, I just wanted to create one from tkinter widgets and keep the constructor as close to other tkinter widgets as possible

Re: urllib's functionality with urllib2

2005-03-13 Thread Harlin Seritt
Is there any reason why you can't import both? import urllib as u import urllib2 as uu -- http://mail.python.org/mailman/listinfo/python-list

Re: how to delete the close button (the X on the right most corner of the window) on a window

2005-03-13 Thread Harlin Seritt
What GUI toolkit are you using? I think this is the point Jeremy is making. Harlin Seritt -- http://mail.python.org/mailman/listinfo/python-list

Re: Itertools wishlists

2005-03-13 Thread Raymond Hettinger
[bearophile] > This was my suggestion for a possible flatten(): > > flatten(sequence, level=-1, tuples=True, strings=False, safe=False) > - tuples=True then it flattens tuples too. > - strings=True then it flattens strings with len(s)>1 too. > - safe if True it cheeks (with something like an iterat

Re: Unimport module

2005-03-13 Thread Chmouel Boudjnah
Terry Reedy wrote: Yes, Python's import mechanism assumes that sys.path is relatively static, or grow only. I not sure what 'reload Module' would do after the first loop. it does work using like that : if sys.modules.has_key("Module"): reload(Module)

Re: issues installing readine-1.12 on WinXP

2005-03-13 Thread Michele Simionato
Well, this is ugly as the sin but it seems to work, at least for the moment: vk = VkKeyScan(ord(char)) if vk == -1: # ugly fix for backtips vk = 96 I will write to Gary Bishop to point out this issue with the Italian keyboard and see if he has some decent solution. Michele

A Font Dialog (Tkinter)

2005-03-13 Thread Harlin Seritt
Is there a way to call up the Font dialog box (at least in the Windows API) from Tkinter or another module? thanks, Harlin Seritt -- http://mail.python.org/mailman/listinfo/python-list

Re: SimpleHTTPRequestHandler handling long lasting requests problem

2005-03-13 Thread Andy Leszczynski
Steve Holden wrote: Andy Leszczynski wrote: Sorry for questioning Python :-) - it turned out that this is a problem with Mozilla. For some reason it holds up with opening second connection to given host until the previous one is completed. Interestingly enough, IE works better with Python multi

some information

2005-03-13 Thread Sandeep Avinash Gohad
Hi,I want to know weather python conducts any certification exams like the other programming languages - Microsoft (MCP,MCSD) Sun  (sun certification) Regards, Sandeep    -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] Who Knows of a Good Computational Physics Textbook?

2005-03-13 Thread Sean Richards
This may be of interest http://farside.ph.utexas.edu/teaching/329/lectures/lectures.html Cheers, Sean -- "Hver sin smak", sa vintapperen, han drakk mens de andre sloss." -- http://mail.python.org/mailman/listinfo/python-list

html parsing

2005-03-13 Thread Suchitra
Hi all,     Please help me in parsing  the html document and extract the http links .   Thanks in advance!!1   Suchitra -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] RELEASED Python 2.4.1, release candidate 1

2005-03-13 Thread Brian van den Broek
Martin v. Löwis said unto the world upon 2005-03-10 20:55: Anthony Baxter wrote: On behalf of the Python development team and the Python community, I'm happy to announce the release of Python 2.4.1 (release candidate 1). I'd like to encourage feedback on whether the Windows installer works for peo

Re: [Python-Dev] RELEASED Python 2.4.1, release candidate 1

2005-03-13 Thread "Martin v. Löwis"
Brian van den Broek wrote: A comment about the msi process: even though I set it to install to a different directory, 2.4.1c1 clobbered my 2.4 install. I remember reading something somewhere such that I expected this, but a quick glance at the obvious places for the 2.4.1c1 doesn't produce anyth

Re: newbie: dictionary - howto get key value

2005-03-13 Thread Bengt Richter
On Mon, 14 Mar 2005 05:02:25 GMT, Joal Heagney <[EMAIL PROTECTED]> wrote: >Tim Roberts wrote: >> "G. Völkl" <[EMAIL PROTECTED]> wrote: >> >>>I use a dictionary: >>> >>>phone = {'mike':10,'sue':8,'john':3} >>> >>>phone['mike'] --> 10 >>> >>>I want to know who has number 3? >>> >>>3 --> 'john' >

<    1   2