Re: Use threads or Tkinter event loop?

2007-03-27 Thread Kevin Walzer
Kevin Walzer wrote: > I'm trying to decide whether I need threads in my Tkinter application or > not. My app is a front end to a command-line tool; it feeds commands to > the command-line program, then reads its output and displays it in a > Tkinter text widget. Some of the commands are long-run

Use threads or Tkinter event loop?

2007-03-27 Thread Kevin Walzer
I'm trying to decide whether I need threads in my Tkinter application or not. My app is a front end to a command-line tool; it feeds commands to the command-line program, then reads its output and displays it in a Tkinter text widget. Some of the commands are long-running and/or return thousand

Re: enumerating processes

2007-03-27 Thread kyosohma
On Mar 27, 12:15 am, Shane Geiger <[EMAIL PROTECTED]> wrote: > I believe you are looking for os.getpid() > > 李现民 wrote: > > hi ,all > >any one knows how to enumerate the current running processes , or > > how to obtain a specific process by its name or process id. I know I > > can do this in ma

Re: Python Error :(

2007-03-27 Thread kyosohma
On Mar 27, 8:19 am, "Legend" <[EMAIL PROTECTED]> wrote: > I wasn't able to run a Python script. But then later I was able to run > it through the Shell. I was experimenting with cron jobs and set up > the python execution in as a cron. The first time it ran, It was fine > but then after that, it st

Re: socket read timeout

2007-03-27 Thread Steve Holden
Jarek Zgoda wrote: > hg napisał(a): > >> I am looking for the most efficient / cleanest way to implement a socket >> read with timeout (Windows mainly but would be great if the same code >> worked under *nix) > > Did you see http://www.timo-tasi.org/python/timeoutsocket.py ? > Note that since 2.

Re: Modules & positive surprises

2007-03-27 Thread kyosohma
On Mar 27, 8:30 am, Jan Danielsson <[EMAIL PROTECTED]> wrote: > Hello all, > > > >Although I have encountered many modules that have impressed me with > regards to what they can actually do -- too be perfectly honest, it's > very rare that I become impressed by the _interfaces_ to the modules.

Modules & positive surprises

2007-03-27 Thread Jan Danielsson
Hello all, Although I have encountered many modules that have impressed me with regards to what they can actually do -- too be perfectly honest, it's very rare that I become impressed by the _interfaces_ to the modules. Using a new module is normally, with my - admittedly - limited experi

Re: socket read timeout

2007-03-27 Thread Jarek Zgoda
hg napisał(a): > I am looking for the most efficient / cleanest way to implement a socket > read with timeout (Windows mainly but would be great if the same code > worked under *nix) Did you see http://www.timo-tasi.org/python/timeoutsocket.py ? -- Jarek Zgoda "We read Knuth so you don't have

Re: Python Error :(

2007-03-27 Thread Jarek Zgoda
Legend napisał(a): > I wasn't able to run a Python script. But then later I was able to run > it through the Shell. I was experimenting with cron jobs and set up > the python execution in as a cron. The first time it ran, It was fine > but then after that, it started giving me some errors. Now whe

socket read timeout

2007-03-27 Thread hg
Hi, I am looking for the most efficient / cleanest way to implement a socket read with timeout (Windows mainly but would be great if the same code worked under *nix) Tanks, hg -- http://mail.python.org/mailman/listinfo/python-list

Re: Mastering Python

2007-03-27 Thread Bruno Desthuilliers
Dennis Lee Bieber a écrit : > On Wed, 21 Mar 2007 21:40:51 +0100, Bruno Desthuilliers > <[EMAIL PROTECTED]> declaimed the following in > comp.lang.python: > >> It will actually do something: rebind name 'a' to the method lower() of >> the string previously binded to 'a' >> > For future refe

Re: tkinter popup

2007-03-27 Thread Gigs_
Eric Brunel wrote: > On Tue, 27 Mar 2007 12:05:07 +0200, Gigs_ <[EMAIL PROTECTED]> wrote: > >> Hi all >> >> I cant figure out how to disable resizing of my popup window? > > myPopupWindow.wm_resizable(0, 0) > > It may or may not make resize controls disappear depending on your > platform and/or

Python Error :(

2007-03-27 Thread Legend
I wasn't able to run a Python script. But then later I was able to run it through the Shell. I was experimenting with cron jobs and set up the python execution in as a cron. The first time it ran, It was fine but then after that, it started giving me some errors. Now when I try to run the script di

Re: PMW widget - skip tabbing to it

2007-03-27 Thread jp
On Mar 26, 5:41 pm, John McMonagle <[EMAIL PROTECTED]> wrote: > jp wrote: > >>> On Mar 26, 10:51 am, "jp" <[EMAIL PROTECTED]> wrote: > I have multiple PMW widgets (EntryFields, ScrolledField etc), how can > I skip over these widgets when using the tab key? > Thank you, > John >

Re: shutil.copy Problem

2007-03-27 Thread Facundo Batista
David Nicolson wrote: > Thanks, but it's definitely not the print. In original the code the > print statements are replaced by a call to a log method. > > Besides, the exception would be different if it was thrown outside of > the try block. The best you can do is take the piece of code that

Re: tkinter MVC

2007-03-27 Thread Eric Brunel
On Tue, 27 Mar 2007 13:29:25 +0200, Gigs_ <[EMAIL PROTECTED]> wrote: > Can someone give me example how to write text editor in tkintter with > model-view-controler? > What goes to controler and what goes to model? > > thanks in advance Others may have a different opinion, but I think using MVC

Re: Fortran vs Python - Newbie Question

2007-03-27 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Beliavsky <[EMAIL PROTECTED]> wrote: . . . >Your experience with Fortran is dated -- see below. > >> >> I'll be more clear: Fortran itself is a distinguished >> language with many meritorious im

Re: tkinter popup

2007-03-27 Thread Eric Brunel
On Tue, 27 Mar 2007 12:05:07 +0200, Gigs_ <[EMAIL PROTECTED]> wrote: > Hi all > > I cant figure out how to disable resizing of my popup window? myPopupWindow.wm_resizable(0, 0) It may or may not make resize controls disappear depending on your platform and/or window manager. But the resizing w

correction : Re: pygtk button event

2007-03-27 Thread [EMAIL PROTECTED]
Oups a small mistake: bt=application.get_widget('button1') [EMAIL PROTECTED] wrote: > Hi > > > i am trying to implement the following: > > I want to be able to press a button, perform a task and return a > value. > > my button is named button1 and I used glade to build the gui. > > so, someth

Re: SPE question

2007-03-27 Thread [EMAIL PROTECTED]
I believe that just deleting the folders should work Dick Moores wrote: > At 03:37 AM 3/27/2007, [EMAIL PROTECTED] wrote: > >On Mar 27, 11:39 am, "alain" <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > Could someone tell me how to uninstall SPE under windows? > > > > > > Alain > > > >Dunno ab

pygtk button event

2007-03-27 Thread [EMAIL PROTECTED]
Hi i am trying to implement the following: I want to be able to press a button, perform a task and return a value. my button is named button1 and I used glade to build the gui. so, something like this should work application=gtk.glade.XML('app.glade','app') bt=app.get_widget('button1

Re: plot dendrogram with python

2007-03-27 Thread martin . laloux
I use pycluster http://bonsai.ims.u-tokyo.ac.jp/~mdehoon/software/cluster/software.htm#pycluster -- http://mail.python.org/mailman/listinfo/python-list

Re: plot dendrogram with python

2007-03-27 Thread bearophileHUGS
Frank: > does anyone know if there is a way to plot a dendrogram with python. > Pylab or matplotlib do not provide such a function. An ASCII solution: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/139422 Some graphics: http://plone.org/products/phylogenetictree http://www.bioinformatics

tkinter MVC

2007-03-27 Thread Gigs_
Can someone give me example how to write text editor in tkintter with model-view-controler? What goes to controler and what goes to model? thanks in advance -- http://mail.python.org/mailman/listinfo/python-list

Re: SPE question

2007-03-27 Thread Dick Moores
At 03:37 AM 3/27/2007, [EMAIL PROTECTED] wrote: >On Mar 27, 11:39 am, "alain" <[EMAIL PROTECTED]> wrote: > > Hi, > > > > Could someone tell me how to uninstall SPE under windows? > > > > Alain > >Dunno about SPE, but most Python modules I've installed can >be uninstalled from control panel/add remo

Re: SPE question

2007-03-27 Thread irstas
On Mar 27, 11:39 am, "alain" <[EMAIL PROTECTED]> wrote: > Hi, > > Could someone tell me how to uninstall SPE under windows? > > Alain Dunno about SPE, but most Python modules I've installed can be uninstalled from control panel/add remove programs. -- http://mail.python.org/mailman/listinfo/pyth

Re: SPE question

2007-03-27 Thread Dick Moores
At 01:39 AM 3/27/2007, alain wrote: >Hi, > >Could someone tell me how to uninstall SPE under windows? Well, mine is in E:\Python25\Lib\site-packages\_spe, so I'd try deleting that folder. Dick Moores -- http://mail.python.org/mailman/listinfo/python-list

sys.excepthook and threads

2007-03-27 Thread ian
Hi, sys.excepthook don't work if an exception come in a thread... It's normal or its a bug ? There are any tip ? look here : http://spyced.blogspot.com/2005_06_01_archive.html Thx -- http://mail.python.org/mailman/listinfo/python-list

tkinter popup

2007-03-27 Thread Gigs_
Hi all I cant figure out how to disable resizing of my popup window? How to put this popup window to show in the middle of my text editor? It is writen with Toplevel. thx -- http://mail.python.org/mailman/listinfo/python-list

Re: Sending ECHO_REQUEST (pinging) with python

2007-03-27 Thread Jorgen Grahn
On Mon, 26 Mar 2007 16:50:09 +0200, Thomas Dybdahl Ahle <[EMAIL PROTECTED]> wrote: > Den Mon, 26 Mar 2007 11:24:34 +0200 skrev Michal 'vorner' Vaner: >> On Mon, Mar 26, 2007 at 08:30:16AM +0200, Thomas Dybdahl Ahle wrote: > >>> Do anybody know how to do this in python? > >> You need root for that

Re: PDB does not allow jumping to first statement?

2007-03-27 Thread [EMAIL PROTECTED]
On Mar 26, 6:06 pm, "Chris Lasher" <[EMAIL PROTECTED]> wrote: > Hi all, > > I have a simple script: > > --- > #!/usr/bin/envpython > > a = 1 > b = 2 > > c = a + b > > print c > --- > > I launch said script withpdb: > > python-mpdbsimple.py > > I noticed that I absolutely cannot jump back to the fir

Re: PDB does not allow jumping to first statement?

2007-03-27 Thread Duncan Booth
Peter Otten <[EMAIL PROTECTED]> wrote: >> Which version of Python, and what happens when you try it? >> >> It works fine for me with Python 2.5 on Windows: >> >> C:\Temp>\python25\python -m pdb t.py >>> c:\temp\t.py(3)() >> -> a = 1 >> (Pdb) s >>> c:\temp\t.py(4)() >> -> b = 2 >> (Pdb) j 3 >>> c

plot dendrogram with python

2007-03-27 Thread Frank
Hi, does anyone know if there is a way to plot a dendrogram with python. Pylab or matplotlib do not provide such a function. Thanks! Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: __init__.py

2007-03-27 Thread Steve Holden
Jorgen Grahn wrote: > On Mon, 26 Mar 2007 08:27:19 +0200, Tina I <[EMAIL PROTECTED]> wrote: >> Tina I wrote: >>> When looking at other peoples code (to learn from it) I keep seeing an >>> empty file named "__init__.py". What's the purpose of this? >>> >>> Thanks >>> Tina >> Duh! Never mind... foun

Re: __init__.py

2007-03-27 Thread Jorgen Grahn
On Mon, 26 Mar 2007 08:27:19 +0200, Tina I <[EMAIL PROTECTED]> wrote: > Tina I wrote: >> When looking at other peoples code (to learn from it) I keep seeing an >> empty file named "__init__.py". What's the purpose of this? >> >> Thanks >> Tina > > Duh! Never mind... found it. > Kinda neat actuall

Re: Tkinter Toplevel geometry

2007-03-27 Thread Chris
> A TRULY good way to show your thanks for help like this > is to write up what you learned at theTkinterWiki > http://tkinter.unpythonic.net/wiki/>. Note: > A. You have to log in to edit pages > on this particular Wiki. If you > decide to join us, then, you'll > first need to crea

SPE question

2007-03-27 Thread alain
Hi, Could someone tell me how to uninstall SPE under windows? Alain -- http://mail.python.org/mailman/listinfo/python-list

Re: fetch html page via isa proxy

2007-03-27 Thread Radek
> So you have already tried NTLM Authorization Proxy > Server?http://ntlmaps.sourceforge.net/ > This used to work fine for me but that was at least 3-4 years ago. Actually NTLM proxy server works for most intranet addresses. Not for the outside Internet ones, though. Radek -- http://mail.pytho

Re: with timeout(...):

2007-03-27 Thread Nick Craig-Wood
Hendrik van Rooyen <[EMAIL PROTECTED]> wrote: > so Diez is probably right that the way to go is to put the timer in the > python interpreter loop, as its the only thing around that you could > more or less trust to run all the time. > > But then it will not read as nice as Nick's wish, but mo

Re: with timeout(...):

2007-03-27 Thread Nick Craig-Wood
Klaas <[EMAIL PROTECTED]> wrote: > On Mar 26, 3:30 am, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > > Did anyone write a contextmanager implementing a timeout for > > python2.5? > > > > I'd love to be able to write something like > > > > with timeout(5.0) as exceeded: > > some_long_run

<    1   2