How to stop a linux process

2005-11-28 Thread Glen
When I used the following line to play a midi file in linux, return_value = os.system('timidity test.mid') I have encountered two problems. 1. The python script halts until timidity has finished. 2. If I had control of the script, I can't think how I would stop timidity. Any advice on the 'area'

Re: How to stop a linux process

2005-11-28 Thread Glen
Simon Brunning wrote: > The subprocess module might be worth a look. That looks about right for what I need (once I understand it!). Thanks very much. -- http://mail.python.org/mailman/listinfo/python-list

Detect TKinter window being closed?

2005-12-02 Thread Glen
Is it possible to to detect a Tkinter top-level window being closed with the close icon/button (top right), for example to call a function before the window actually closes? Python 2.4 / Linux (2.6 kernel) if that makes any difference. Any info would be greatly appreciated. Thanks Glen -- http

Re: Detect TKinter window being closed?

2005-12-02 Thread Glen
Thanks Fredrik and Adonis that's just what I needed, plus a bit more to learn about. -- http://mail.python.org/mailman/listinfo/python-list

Newb: Telnet 'cooked data','EOF' queries.

2005-07-31 Thread glen
;when' is an EOF received. Glen -- http://mail.python.org/mailman/listinfo/python-list

Re: Newb: Telnet 'cooked data','EOF' queries

2005-08-01 Thread glen
> > Could someone explain what "cooked data" is. > discussed in the telnet RFC, which is in RFC854 telnetlib docstring. > "Cooked" data is data after these special sequences are removed. > >>'when' is an EOF received. > the only EOF in telnet is when the other side closes the socket. Thanks, thats

Confused updating 2.3 to 2.4 on Linux

2004-12-17 Thread Glen
Being a new'ish user to both Linux and Python, I've been 'happily' learning Python (2.3) with Idle and Tkinter as installed with Mandrake 10. Thought I would try installing Python 2.4 (to completely replace 2.3) (first time I've tried installing anything from source) Followed the readme file (all

Re: Confused updating 2.3 to 2.4 on Linux

2004-12-17 Thread Glen
> > Being a new'ish user to both Linux and Python, I've been 'happily' > > learning Python (2.3) with Idle and Tkinter as installed with Mandrake > > 10. > > All seemed to work without any errors, but starting Python from Idle > > or a console displays the same statup text, > > > > Python 2.3.3

Begniner Question

2005-03-21 Thread Glen
#!/usr/local/bin/python import sys print "1.\tDo Something" print "2.\tDo Something" print "3.\tDo Something" print "4.\tDo Something" print "5.\tDo Something" print "6.\tExit" choice=raw_input("Please Enter Choice: ") if int(choice)==1: print "Here" else: pass if int(choice)==2: else:

Beginner: Formatting text output (PyQt4)

2007-04-18 Thread Glen
String( str(tL2[i][0]) ).rightJustified(2) + ':' + QtCore.QString( str(tL2[i][1]) ).rightJustified(4) ) This still gives me uneven columns. Any suggestions? Thanks, Glen -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner: Formatting text output (PyQt4)

2007-04-18 Thread Glen
On Wed, 18 Apr 2007 22:50:14 +, Glen wrote: Ok, obviously, my post didn't come out the way I wanted it to. In the first example from my text file below, the dictionary pairs, constructed from sorted tuples were in straight columns. When I write them to my QTextEdit, however, the column

Re: Beginner: Formatting text output (PyQt4) Solved

2007-04-23 Thread Glen
e hearing from me pretty regularly, since I'm in the process of learning Python and PyQt simultaneously. Glen -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner: Simple Output to a Dialog PyQt4

2007-04-23 Thread Glen
On Sat, 21 Apr 2007 03:15:00 +0200, David Boddie wrote: > On Tuesday 17 April 2007 07:42, Glen wrote: > # Just to avoid any misunderstanding: the form is actually stored as XML. # You can create C++ code with uic or Python code with pyuic4. Right. I do remember noticing that when I open

lowercase class names, eg., qtgui ? (PyQt4)

2007-04-25 Thread Glen
gridlayout(dldialog) What exactly is going on here? Are these instances that are defined somewhere else (their not in the local scope.)? Can I do the same in my code when I import something? Thanks, Glen Glen -- http://mail.python.org/mailman/listinfo/python-list

Re: lowercase class names, eg., qtgui ? (PyQt4)

2007-04-26 Thread Glen
7;s ok now. Maybe vim was just displaying the text wrong for a minute. Had me going though. Thanks again. Glen > Are you sure? That's strange. I have never seen that. Here is a snippet > of one of my typical .py files generated by 'pyuic4': > > self.gridlayout =

Beginner: Simple Output to a Dialog PyQt4

2007-04-17 Thread Glen
Hello, I've written a script in python and put together a simple QFrame with a QTextBrowser with Designer. I've translated the C++ into python using puic4. The .py file is called outputWin.py. My Script and its functions are in cnt.py. Finally, my main is in pball.py which follows her

Re: Several Topics - Nov. 19, 2013

2013-11-19 Thread glen herrmannsfeldt
opriate time (Just In Time) compile that to machine code and execute it. This is common for Java, and more recently for languages like Matlab. -- glen -- https://mail.python.org/mailman/listinfo/python-list

Re: Several Topics - Nov. 19, 2013

2013-11-19 Thread glen herrmannsfeldt
In comp.lang.fortran Rainer Weikusat wrote: > glen herrmannsfeldt writes: >> In comp.lang.fortran E.D.G. wrote: >>>>> "E.D.G." wrote in message >>>>> news:ro-dnch2dptbrhnpnz2dnuvz_rsdn...@earthlink.com... >>> Posted by E.D.G. on Nove

struct calcsize discrepency?

2011-12-04 Thread Glen Rice
In IPython: >import struct >struct.calcsize('4s') 4 >struct.calcsize('Q') 8 >struct.calcsize('4sQ') 16 This doesn't make sense to me. Can anyone explain? -- http://mail.python.org/mailman/listinfo/python-list

Re: struct calcsize discrepency?

2011-12-04 Thread Glen Rice
On Dec 4, 9:38 am, Duncan Booth wrote: > Glen Rice wrote: > > In IPython: > >>import struct > >>struct.calcsize('4s') > > 4 > >>struct.calcsize('Q') > > 8 > >>struct.calcsize('4sQ') > > 16 > >

Re: What can we do about all the spam that the list is getting?

2008-04-18 Thread glen stark
On Thu, 17 Apr 2008 13:30:18 -0500, Grant Edwards wrote: > When using Google Groups can one kill all posts made via Google Groups? > Presuming he has no burning need to see his own posts (something that > can't be said for everybody in the history of Usenet), it might still be > a viable approach

Re: Numeric literal syntax

2008-09-09 Thread glen stark
On Tue, 09 Sep 2008 08:32:29 +1000, Tom Harris wrote: > I agree. So did Forth's early designers. That is why Forth's number > parser considers a word that starts with a number and has embedded > punctuation to be a 32 bit integer, and simply ignores the punctuation. > I haven't used Forth in years

Re: Python/Fortran interoperability

2009-08-24 Thread glen herrmannsfeldt
ith this. The usual way would be to pass the length, as with assumed size arrays. I believe terminating strings with unusual (likely not null) characters was also done. -- glen -- http://mail.python.org/mailman/listinfo/python-list

Re: What's an elegant way to test for list index existing?

2018-09-29 Thread Glen D souza
fld = [ ] data = shlex.split(ln) for item in data: fld.append(item) fld = fld + [0] * (5 - len(data)) On Sat, 29 Sep 2018 at 11:03, Glen D souza wrote: > i have a approach, it may not be best > > fld = [ ] > for data in shlex.split(ln): >fld.append(data) > &g

Re: What's an elegant way to test for list index existing?

2018-09-29 Thread Glen D souza
i have a approach, it may not be best fld = [ ] for data in shlex.split(ln): fld.append(data) On Sat, 29 Sep 2018 at 07:52, wrote: > On Friday, September 28, 2018 at 11:03:17 AM UTC-7, Chris Green wrote: > > I have a list created by:- > > > > fld = shlex.split(ln) > > > > It may co

Re: Access to static members from inside a method decorator?

2006-10-05 Thread glen . coates . bigworld
;)]) for > p in '[EMAIL PROTECTED]'.split('@')])" Thanks Bruno. I came up with a similar solution today at work, which involves an 'init' method which is called at the bottom of each module that defines subclasses of Exposed and sets up static mappings for the exposed methods. I guess my solution is slightly less elegant because it requires this ugly explicit init call outside the classes that it actually deals with, however it is more efficient because the dir() pass happens once on module load, instead of every time I want the list of exposed methods. Thanks for the help though, Glen -- http://mail.python.org/mailman/listinfo/python-list

Re: Access to static members from inside a method decorator?

2006-10-05 Thread glen . coates . bigworld
quot; ) ) That's better, but still ugly. Is there a better way? Thanks for all the help thus far guys, Glen Maric Michaud wrote: > Le jeudi 05 octobre 2006 17:18, [EMAIL PROTECTED] a écrit : > > I guess my solution is slightly less elegant because > > it requires this ugly e

Re: Access to static members from inside a method decorator?

2006-10-08 Thread glen . coates . bigworld
le type. Is the Splat/SplatType pairing really a common design pattern when trying to use metaclasses in this way? Also ... as for the 'inspect' based solution, yeah I can see that would work, but it seems very hacky to me and my gut reaction is to avoid that kind of thing ... Cheers, Glen -- http://mail.python.org/mailman/listinfo/python-list

Access to static members from inside a method decorator?

2006-10-04 Thread glen . coates . bigworld
enclosing class into the decorator, which in turn means that static tracking of the list of exposed methods is impossible (at least, if I want to use decorators). Any ideas that will enable my initial design, or suggestions for an elegant, workable alternative would be much appreciated. Cheers,