Re: [Tutor] Executing a C Program from RH Linux in Python for Win

2009-03-18 Thread Martin Walsh
Wayne Watson wrote: > If you can execute a C program compiled on a Linux with SWIG, then > that's what I'm looking for. There's really no RH dependency according > to the above posts. If it were compiled on Debian or Ubuntu, it appears > it would not make any difference. That is, one could execute

Re: [Tutor] Executing a C Program from RH Linux in Python for Win

2009-03-18 Thread Wayne Watson
Title: Signature.html If you can execute a C program compiled on a Linux with SWIG, then that's what I'm looking for. There's really no RH dependency according to the above posts. If it were compiled on Debian or Ubuntu, it appears it would not make any difference. That is, one could execute a

Re: [Tutor] Python and Tkinter Programming by Grayson--New Version?

2009-03-18 Thread Wayne Watson
Well, after all that churning hours ago before the PC went down, it actually set up the newreader. Wayne Watson wrote: Thanks. My computer continued to struggle. An hour later it was so bad I rebooted. Nothing like cleaning house. I seem to go for about 5-7 days, then things get clogge

Re: [Tutor] Fw: list.replace -- string.swap

2009-03-18 Thread Ricardo Aráoz
ALAN GAULD wrote: > It wasn't my question :-) > > Forwarding to list... > > > Alan Gauld > Author of the Learn To Program website > http://www.alan-g.me.uk/ > > > > > - Original Message > >> From: Ricardo Aráoz >> Subject: Re: [Tutor] Fw: list.replace -- string.swap >> >> >> >>

Re: [Tutor] Iterating over letters or arbitrary symbols like they were numbers...

2009-03-18 Thread Kent Johnson
On Wed, Mar 18, 2009 at 5:26 PM, Alexander Daychilde (Gmail) wrote: > exp_list = [] > > exp_range = exp.split(":") > > min_padding = len(exp_range[0]) > > for i in range(int(exp_range[0]),(int(exp_range[1])+1)): > >    exp_list.append('%0*d' % (min_padding, i)) This could be a little cleaner usi

Re: [Tutor] Playing with CENTER, Grid, Labels and Entry

2009-03-18 Thread Wayne Watson
Title: Signature.html This couldn't be more timely. I finally gave up on the present idea, and thought to myself, "Try frames". You just saved me some Google work. Thanks. Alan Gauld wrote: "Wayne Watson" wrote I'm using Grid. It's gone pretty well, but I'd like to make it "prettier"

Re: [Tutor] Iterating over letters or arbitrary symbols like they were numbers...

2009-03-18 Thread John Fouhy
2009/3/19 Alexander Daychilde (Gmail) : > That creates a list of numbers. I also need to do letters. That is, treat > a-z as base 26, and do the same thing. The three examples I gave from before > would be: >        1:9 --> a:z >        1:99 --> a:zz >        01:99 -- no "zero" in alpha to worry ab

Re: [Tutor] Fun with Label and Entry--Why NoneType?

2009-03-18 Thread Wayne Watson
Title: Signature.html ALAN GAULD wrote: > That change got the same result. Maybe this will make it all clearer. > When the prompt appears, there is a small window showing on the > screen, 2x2", Yes, that's the root window that Python expects you to put your GUI into. The ma

Re: [Tutor] Playing with CENTER, Grid, Labels and Entry

2009-03-18 Thread Alan Gauld
"Wayne Watson" wrote I'm using Grid. It's gone pretty well, but I'd like to make it "prettier". For that Frame is usually your friend. Create your widgets inside frames and then pack or grid the Frames. You can then use a combination of padding, filling and anchoring etc in both way you inse

Re: [Tutor] Python and Tkinter Programming by Grayson--New Version?

2009-03-18 Thread Wayne Watson
Title: Signature.html Thanks. My computer continued to struggle. An hour later it was so bad I rebooted. Nothing like cleaning house. I seem to go for about 5-7 days, then things get clogged up. Running fine now. I think I'll be able to set up the newsreader now without any trouble. Alan Gau

Re: [Tutor] Playing with CENTER, Grid, Labels and Entry

2009-03-18 Thread Wayne Watson
Title: Signature.html Nothing like a good example. anchors away. It's where you put it. anchor=CENTER. See for more. from Tkinter import * class App: def __init__(self, master): master.geometry("300x200") fm = Frame(master) Button(fm, text='side=TOP, anchor=NW')

Re: [Tutor] Python and Tkinter Programming by Grayson--New Version?

2009-03-18 Thread Alan Gauld
"Wayne Watson" wrote As I wander around the internet trying to get info from Lundh, New Mexico, and other sites, I wonder if, in particular New Mexico is not using the "new" Tkinter. How would I know? Nobody is using the new version yet, it's targetted for 3.1 and 2.7 - both are the "next" r

Re: [Tutor] Fw: list.replace -- string.swap

2009-03-18 Thread ALAN GAULD
It wasn't my question :-) Forwarding to list... Alan Gauld Author of the Learn To Program website http://www.alan-g.me.uk/ - Original Message > From: Ricardo Aráoz > Subject: Re: [Tutor] Fw: list.replace -- string.swap > > > Also: How would perform string.swap(s1, s2) in

Re: [Tutor] Iterating over letters or arbitrary symbols like they were numbers...

2009-03-18 Thread Wayne Watson
Title: Signature.html It looks like you used the wrong thread to post this. It's connected to questions about linux and Win, and not iterations. Alexander Daychilde (Gmail) wrote: If there's an easy way to do this, I'd like to have a pointer to it (i.e. what functions would deal with this -

[Tutor] Iterating over letters or arbitrary symbols like they were numbers...

2009-03-18 Thread Alexander Daychilde (Gmail)
If there's an easy way to do this, I'd like to have a pointer to it (i.e. what functions would deal with this - not wanting my code written for me...) Right now, I have written code to generate a list of strings that happen to be a range of numbers. (The fact that they're strings is actually desir

Re: [Tutor] Executing a C Program from RH Linux in Python for Win

2009-03-18 Thread greg whittier
On Wed, Mar 18, 2009 at 4:06 PM, Wayne Watson wrote: > Thanks to both above posts before this reply. > I'll forgo the VM route. It would really complicate things for the users of > the application having to deal with VM. Most are near neophytes. > Nevertheless, it looks like there may be some hope

Re: [Tutor] Executing a C Program from RH Linux in Python for Win

2009-03-18 Thread Wayne Watson
Title: Signature.html Thanks to both above posts before this reply. I'll forgo the VM route. It would really complicate things for the users of the application having to deal with VM. Most are near neophytes. Nevertheless, it looks like there may be some hope here for just doing it from w/i Win

[Tutor] Playing with CENTER, Grid, Labels and Entry

2009-03-18 Thread Wayne Watson
Title: Signature.html I'm prototyping a dialog with about 10 rows of 4 columns of widgets. Most rows are like:         Label, Entry, Label, Entry A couple only have Label, Entry. I'm using Grid. It's gone pretty well, but I'd like to make it "prettier". For example, a row with latitude and lon

Re: [Tutor] Python and Tkinter Programming by Grayson--New Version?

2009-03-18 Thread Wayne Watson
Thanks. Interesting. I went to the web site and thought I'd find out about how NNTP works. I clicked the line, and nothing happened, so I explored some other info, and came back here. As I opened your msg, I wizard showed up from SeaMonkey. I clicked cancel, and then realized that must be what

Re: [Tutor] Executing a C Program from RH Linux in Python for Win

2009-03-18 Thread Alan Gauld
"Wayne Watson" wrote The Subject contains the interest here. Can it be done? A C program is compiled into a binary executable complete with link loader. The executable is not portable across operating systems (nor hardware architectures in most cases) I think it this case it requires execu

Re: [Tutor] Executing a C Program from RH Linux in Python for Win

2009-03-18 Thread Robert Berman
Wayne, I think I do the opposite of what you are doing. I develop in Python on a Linux (Ubuntu 8.10) box. On that box, I also run a virtual copy of Windows XP in its own little happy environment. That way, when my XP customers have a problem, I drop into the desktop environment running XP and

[Tutor] Executing a C Program from RH Linux in Python for Win

2009-03-18 Thread Wayne Watson
Title: Signature.html The Subject contains the interest here. Can it be done? I think it this case it requires executing the program command line with parameters then executing it? How dependent upon the C compiled code is this? That is, I would think various distributions of Linux might produc

Re: [Tutor] Fun with Label and Entry--Why NoneType?

2009-03-18 Thread ALAN GAULD
> That change got the same result. Maybe this will make it all clearer. > When the prompt appears, there is a small window showing on the > screen, 2x2", Yes, that's the root window that Python expects you to put your GUI into. The master that you pas to your GUI wFrames. It didn't show for me

Re: [Tutor] Fun with Label and Entry--Why NoneType?

2009-03-18 Thread Wayne Watson
Title: Signature.html That change got the same result. Maybe this will make it all clearer. root = Tk() z=raw_input("howdy ") dialog = DialogPrototype(root) When the prompt appears, there is a small window showing on the screen, 2x2", I guess. It shows in the upper left a Tk icon on the title

Re: [Tutor] combining Python 2.x and Python 3

2009-03-18 Thread Paul McGuire
These are very interesting links, and I just downloaded the evoque code to see how they handled the one "impossible" case that has stymied me in supporting pyparsing under Python 2.x (pre-2.6) and Python 3.0 with a single code base: exception handling. For those new to this topic, here is the prob

Re: [Tutor] Python and Tkinter Programming by Grayson--New Version?

2009-03-18 Thread ALAN GAULD
Here is the news about a new Tk in Python: (Posted on the TkDocs web site - the home of Tk) February 03, 2009 Ttk support in Python. Guilherme Polo passed along the great news that his pyttk module has been accepted into Python's standard library. That means we should see pytt

Re: [Tutor] combining Python 2.x and Python 3

2009-03-18 Thread Kent Johnson
On Wed, Mar 18, 2009 at 1:50 AM, wesley chun wrote: > wow, great links Kent. i didn't think that people would be as bold as > to do this, but i guess it was inevitable. > it may be worthwhile to collate all of > this info into a "2to3 FAQ" at some point. http://wiki.python.org/moin/PortingPythonT

[Tutor] Fw: list.replace -- string.swap

2009-03-18 Thread ALAN GAULD
Forwarding to list > From: spir > To: Alan Gauld > Sent: Wednesday, 18 March, 2009 8:41:39 AM > Subject: Re: [Tutor] list.replace -- string.swap > > Le Tue, 17 Mar 2009 20:46:06 -, > "Alan Gauld" s'exprima ainsi: > > "spir" wrote > Sorry, I was unclear all along my post. > > > > Is there