Re: [Tutor] Replacing keyboard input to EXE file

2009-06-12 Thread eShopping




"Tino Dai"  wrote
>
>I know that this is a python group but you might want to try the open
> source utility called Expect. It does what you need it to do without
> having
> having to go through this trial and error process with subprocess.
> http://expect.nist.gov/

Or use the Python wrapper around expect - pyexpect???

Alan G


Installed pexpect and rewrote the code to look like this:

import pexpect

x = pexpect.spawn("poly.exe")
for item in ["polyin.dat", "polyout.dat", "polyout.plt"]:
x.sendline('%s\n' % item)

Now I get these errors:

Traceback (most recent call last):
  File "C:\Projects\Active\Alun\US_DOE_EOR\test_poly.py", line 1, in 
-toplevel-

import pexpect
  File "C:\Python24\Lib\site-packages\pexpect.py", line 82, in -toplevel-
raise ImportError (str(e) + """
ImportError: No module named resource

A critical module was not found. Probably this operating system does not
support it. Pexpect is intended for UNIX-like operating systems.

Hm .does this mean we are snookered on Win XP?

Best regards

Alun Griffiths





___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Replacing keyboard input to EXE file

2009-06-11 Thread eShopping



>> eShopping wrote:
>>> import subprocess
>>> x = subprocess.Popen(args="poly.exe",stdin=subprocess.PIPE)
>>> for item in ["polyin.dat", "polyout.dat", "polyout.plt"]:
>>> x.stdin.write('%s\n' % item)
>>> but got the same error message
>>
>> Above code would seem to be correct.
>>
>> Are you sure the Fortran program accepts the names?
>> One easy way to test this is to try
>>
>> C:\> poly.exe < poly_files.txt
>>
>> in a CMD program (or COMMAND or whatever the console program is called
>> nowadays at Win* systems).
>
> Tried piping the input as suggested but POLY ignores the pipe and just
> asks me for the names of the files as if we were in interactive mode.

Can you provide an example of the Fortran program session? Especially
the part where it asked for file name.


An example of the session is

===start of snip
C:\TEMP>poly
PLEASE ENTER THE INPUT FILE NAME:
polyin.dat
PLEASE ENTER THE OUTPUT FILE NAME:
polyout.dat
PLEASE ENTER PLOT OUTPUT FILE NAME:
polyout.plt

Execution terminated: Normal stop
C:\TEMP>
===end of snip



___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Replacing keyboard input to EXE file

2009-06-11 Thread eShopping

At 13:26 11/06/2009, you wrote:

eShopping wrote:

import subprocess
x = subprocess.Popen(args="poly.exe",stdin=subprocess.PIPE)
for item in ["polyin.dat", "polyout.dat", "polyout.plt"]:
x.stdin.write('%s\n' % item)
but got the same error message


Above code would seem to be correct.

Are you sure the Fortran program accepts the names?
One easy way to test this is to try

C:\> poly.exe < poly_files.txt

in a CMD program (or COMMAND or whatever the console program is 
called nowadays at Win* systems).


Tried piping the input as suggested but POLY ignores the pipe and 
just asks me for the names of the files as if we were in interactive mode.



___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Replacing keyboard input to EXE file

2009-06-11 Thread eShopping



Hi

I have a legacy (FORTRAN) program called POLY.EXE which asks the 
user interactively for three inputs (file names) from the 
keyboard.  I would like to run this program in batch and tried to 
replace the interactive prompts with file names stored in a separate 
file using this Python script:


import subprocess

try:
   poly_file = file("poly_files.txt","r")
except:
   print "Could not open input file"
else:
   x = subprocess.Popen(args="poly.exe", stdin=poly_file)
   x.wait()

poly_files.txt contains the three file names as follows:

polyin.dat
polyout.dat
polyout.plt

On execution, I get these error messages
Traceback (most recent call last):
 File "C:/Projects/Active/Alun/test_poly.py", line 4, in -toplevel-
   x = subprocess.Popen(args="poly.exe", stdin=poly_file)
 File "C:\Python24\lib\subprocess.py", line 533, in __init__
   (p2cread, p2cwrite,
 File "C:\Python24\lib\subprocess.py", line 607, in _get_handles
   c2pwrite = self._make_inheritable(c2pwrite)
 File "C:\Python24\lib\subprocess.py", line 634, in _make_inheritable
   DUPLICATE_SAME_ACCESS)
WindowsError: [Errno 6] The handle is invalid

So, it looks like something is wrong with the way I am redirecting 
stdin, but I have no idea what the problem is.  Any suggestions 
gratefully received



I've not done much with subprocess, but I know you can use the 
subprocess.PIPE to redirect stdin/stdout.


This may be of some help too,

http://www.oreillynet.com/onlamp/blog/2007/08/pymotw_subprocess_1.html

-Wayne


Wayne

I did try using stdin but got the same problem.  I also hacked the 
following from the website you suggested:


import subprocess

x = subprocess.Popen(args="poly.exe",stdin=subprocess.PIPE)

for item in ["polyin.dat", "polyout.dat", "polyout.plt"]:
x.stdin.write('%s\n' % item)

but got the same error message

Best regards

Alun


___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Reading binary files #2

2009-02-09 Thread eShopping

Hi Bob

some replies below.  One thing I noticed with the "full" file was 
that I ran into problems when the number of records was 10500, and 
the file read got misaligned.  Presumably 10500 is still within the 
range of int?


Best regards

Alun


At 17:49 09/02/2009, bob gailer wrote:

etrade.griffi...@dsl.pipex.com wrote:

Hi

following last week's discussion with Bob Gailer about reading 
unformatted FORTRAN files, I have attached an example of the file 
in ASCII format and the equivalent unformatted version.


Thank you. It is good to have real data to work with.

Below is some code that works OK until it gets to a data item that 
has no additional associated data, then seems to have got 4 bytes 
ahead of itself.


Thank you. It is good to have real code to work with.

I though I had trapped this but it appears not.  I think the issue 
is asociated with "newline" characters or the unformatted equivalent.




I think not, But we will see.

I fail to see where the problem is. The data printed below seems to 
agree with the files you sent. What am I missing?


When I run the program it exits in the middle but should run through 
to the end.  The output to the console was


236 ('\x00\x00\x00\x10', 'DATABEGI', 0, 'MESS', 
'\x00\x00\x00\x10\x00\x00\x00\x10')
264 ('TIME', '\x00\x00\x00\x01', 1380270412, '\x00\x00\x00\x10', 
'\x00\x00\x00\x04\x00\x00\x00\x00')


Here "TIME" is in vals[0] when it should be in vals[1] and so on.  I 
found the problem earlier today and I re-wrote the main loop as 
follows (before I saw your helpful coding style comments):


while stop < nrec:

# extract data structure

start, stop = stop, stop + struct.calcsize('4s8si4s4s')
vals = struct.unpack('>4s8si4s4s', data[start:stop])
items.extend(vals[1:4])
print stop, vals

# define format of subsequent data

nval = int(vals[2])

if vals[3] == 'INTE':
fmt_string = '>i'
elif vals[3] == 'CHAR':
fmt_string = '>8s'
elif vals[3] == 'LOGI':
fmt_string = '>i'
elif vals[3] == 'REAL':
fmt_string = '>f'
elif vals[3] == 'DOUB':
fmt_string = '>d'
elif vals[3] == 'MESS':
fmt_string = '>%ds' % nval
else:
print "Unknown data type ... exiting"
print items[-40:]
sys.exit(0)

# leading spaces

if nval > 0:
start, stop = stop, stop + struct.calcsize('4s')
vals = struct.unpack('4s', data[start:stop])

# extract data

for i in range(0,nval):
start, stop = stop, stop + struct.calcsize(fmt_string)
vals = struct.unpack(fmt_string, data[start:stop])
items.extend(vals)

# trailing spaces

if nval > 0:
start, stop = stop, stop + struct.calcsize('4s')
vals = struct.unpack('4s', data[start:stop])

Now I get this output

232 ('\x00\x00\x00\x10', 'DATABEGI', 0, 'MESS', '\x00\x00\x00\x10')
256 ('\x00\x00\x00\x10', 'TIME', 1, 'REAL', '\x00\x00\x00\x10')

and the script runs to the end


FWIW a few observations re coding style and techniques.

1) put the formats in a dictionary before the while loop:
formats = {'INTE': '>i', 'CHAR': '>8s', 'LOGI': '>i', 'REAL': '>f', 
'DOUB': '>d', 'MESS': ''>d,}


2) retrieve the format in the while loop from the dictionary:
format = formats[vals[3]]


Neat!!



3) condense the 3 infile lines:
data = open("test.bin","rb").read()


I still don't quite trust myself to "chain" functions together, but I 
guess that's lack of practice



4) nrec is a misleading name (to me it means # of records), nbytes 
would be better.


Agreed



5) Be consistent with the format between calcsize and unpack:
struct.calcsize('>4s8si4s8s')

6) Use meaningful variable names instead of val for the unpacked data:
blank, name, length, typ = struct.unpack ... etc


Will do

7) The format for MESS should be '>d' rather than '>%dd' % nval. 
When nval is 0 the for loop will make 0 cycles.


Wasn't sure about that one.  "MESS" implies string but I wasn't sure 
what to do about a zero-length string



8) You don't have a format for DATA (BEGI); therefore the prior 
format (for CHAR) is being applied. The formats are the same so it 
does not matter but could be confusing later.


DATABEGI should be a keyword to indicate the start of the "proper" 
data which has format MESS (ie string).  You did make me look again 
at the MESS format and it should be '>%ds' % nval and not '>%dd' % nval



___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] reading binary files

2009-02-04 Thread eShopping

Bob

sorry, I misread your email and thought it said "read on"  if the 
file was FORMATTED.  It wasn't so I didn't (but should have).  I read 
the complete thread and it is getting a little messy so I have 
extracted your questions and added some answers.


I'd like to examine the file myself. We might save a lot of time and 
energy that way. If it is not very large would you attach it to your 
reply. If it is very large you could either copy just the first 1000 
or so bytes, or send the whole thing thru www.yousendit.com.


The file is around 800 Mb but I can't get hold of it until next week 
so suggest starting a new topic once I have a cut-down copy.



Well, did you read on? What reactions do you have?


I did (finally) read on and I am still a little confused, though less 
than before.  I guess the word UNFORMATTED means that the file has no 
format  though it presumably has some structure? One 
major  hurdle is that I am not really sure about the difference 
between a Python binary file and a FORTRAN UNFORMATTED file so any 
pointers would be gratefully received



The file looks like (where b = blank) (how it would look in notepad):
bbDISTANCEbb10bFbbb0.00bbb1.00bbb2.00 If you analyze this with 2s8s2si2s1s
you will see 2s matches bb, 8s matches DISTANCE, 2s matches bb, i 
matches . (\x40\x40\x40\x40). The i tells unpack to shove those 
4 bytes unaltered into a Python integer, resulting in 538976288. You 
can verify that:


>>> struct.unpack('i', '')
(538976288,)

Please either assure me you understand or are prepared for a more in 
depth tutorial.


I now understand why Python gave me the results it did ... it looks 
like reading the FORTRAN file will be a non-trivial task so probably 
best to wait until I can post a copy of it.


Thanks for your help

Alun Griffiths




___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] reading binary files

2009-02-03 Thread eShopping

Bob

I am trying to read UNFORMATTED files.  The files also occur as 
formatted files and the format string I provided is the string used 
to write the formatted version.  I can read the formatted version 
OK.  I (naively) assumed that the same format string was used for 
both files, the only differences being whether the FORTRAN WRITE 
statement indicated unformatted or formatted.


Best regards

Alun Griffiths

At 21:41 03/02/2009, bob gailer wrote:
First question: are you trying to work with the file written 
UNFORMATTED? If so read on.


If you are working with a file formatted (1X, 1X, A8, 1X, 1X, I6, 
1X, 1X, A1) then we have a completely different issue to deal with. 
Do not read on, instead let us know.


eShopping wrote:


Data format:

TIME  1  F  0.0
DISTANCE 10  F  0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0

F=float, D=double, L=logical, S=string etc


The first part of the file should contain a string (eg "TIME"),
an integer (1) and another string (eg "F") so I tried using

import struct
in_file = open(file_name+".dat","rb")
data = in_file.read()
items = struct.unpack('sds', data)

Now I get the error

error: unpack requires a string argument of length 17

which has left me completely baffled!


Did you open the file with mode 'b'? If not change that.

You are passing the entire file to unpack when you should be 
giving it only the first "line". That's why is is complaining 
about the length. We need to figure out the lengths of the lines.


Consider the first "line"

TIME  1  F  0.0

There were (I assume)  4 FORTRAN variables written here: character 
integer character float. Without knowing the lengths of the 
character variables we are at a loss as to what the struct format 
should be. Do you know their lengths? Is the last float or double?


Try this: print data[:40] You should see something like:

TIME...\x01\x00\x00\x00...F...\x00\x00\x00\x00...DISTANCE...\n\x00\x00\x00

where ... means 0 or more intervening stuff. It might be that the 
\x01 and the \n are in other places, as we also have to deal with 
"byte order" issues.


Please do this and report back your results. And also the FORTRAN 
variable types if you have access to them.


Apologies if this is getting a bit messy but the files are at a 
remote location and I forgot to bring copies home.  I don't have 
access to the original FORTRAN program so I tried to emulate the 
reading the data using the Python script below.  AFAIK the FORTRAN 
format line for the header is  (1X, 1X, A8, 1X, 1X, I6, 1X, 1X, 
A1).  If the data following is a float it is written using n(1X, 
F6.2) where n is the number of records picked up from the preceding header.


# test program to read binary data

import struct

# create dummy data

data = []
for i in range(0,10):
data.append(float(i))

# write data to binary file

b_file = open("test.bin","wb")

b_file.write("  %8s  %6d  %1s\n" % ("DISTANCE", len(data), "F"))
for x in data:
b_file.write(" %6.2f" % x)


You are still confusing text vs binary. The above writes text 
regardless of the file mode. If the FORTRAN file was written 
UNFORMATTED then you are NOT emulating that with the above program. 
The character data is read back in just fine, since there is no 
translation involved in the writing nor in the reading. The integer 
len(data) is being written as its text (character) representation 
(translating binary to text) but being read back in without 
translation. Also all the floating point data is going out as text.


The file looks like (where b = blank) (how it would look in notepad):

bbDISTANCEbb10bFbbb0.00bbb1.00bbb2.00 If you analyze this with 2s8s2si2s1s
you will see 2s matches bb, 8s matches DISTANCE, 2s matches bb, i 
matches . (\x40\x40\x40\x40). The i tells unpack to shove those 
4 bytes unaltered into a Python integer, resulting in 538976288. You 
can verify that:


>>> struct.unpack('i', '')
(538976288,)

Please either assure me you understand or are prepared for a more in 
depth tutorial.

b_file.close()

# read back data from file

c_file = open("test.bin","rb")

data = c_file.read()
start, stop = 0, struct.calcsize("2s8s2si2s1s")

items = struct.unpack("2s8s2si2s1s",data[start:stop])
print items
print data[:40]

I'm pretty sure that when I tried this at the other PC there were a 
bunch of \x00\x00 characters in the file but they don't appear in 
NotePad  ... anyway, I thought the Python above would unpack the 
data but items appears as


('  ', 'DISTANCE', '  ', 538976288, '10', ' ')

which seems to be contain an extra item (538976288)

Alun Griffiths



--
Bob Gailer
Chapel Hill NC
919-636-4239


___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] reading binary files

2009-02-03 Thread eShopping

Bob
At 19:52 03/02/2009, you wrote:

etrade.griffi...@dsl.pipex.com wrote:

Data format:

TIME  1  F  0.0
DISTANCE 10  F  0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0

F=float, D=double, L=logical, S=string etc


The first part of the file should contain a string (eg "TIME"),
an integer (1) and another string (eg "F") so I tried using

import struct
in_file = open(file_name+".dat","rb")
data = in_file.read()
items = struct.unpack('sds', data)

Now I get the error

error: unpack requires a string argument of length 17

which has left me completely baffled!



Did you open the file with mode 'b'? If not change that.

You are passing the entire file to unpack when you should be giving 
it only the first "line". That's why is is complaining about the 
length. We need to figure out the lengths of the lines.


Consider the first "line"

TIME  1  F  0.0

There were (I assume)  4 FORTRAN variables written here: character 
integer character float. Without knowing the lengths of the 
character variables we are at a loss as to what the struct format 
should be. Do you know their lengths? Is the last float or double?


Try this: print data[:40] You should see something like:

TIME...\x01\x00\x00\x00...F...\x00\x00\x00\x00...DISTANCE...\n\x00\x00\x00

where ... means 0 or more intervening stuff. It might be that the 
\x01 and the \n are in other places, as we also have to deal with 
"byte order" issues.


Please do this and report back your results. And also the FORTRAN 
variable types if you have access to them.


Apologies if this is getting a bit messy but the files are at a 
remote location and I forgot to bring copies home.  I don't have 
access to the original FORTRAN program so I tried to emulate the 
reading the data using the Python script below.  AFAIK the FORTRAN 
format line for the header is  (1X, 1X, A8, 1X, 1X, I6, 1X, 1X, 
A1).  If the data following is a float it is written using n(1X, 
F6.2) where n is the number of records picked up from the preceding header.


# test program to read binary data

import struct

# create dummy data

data = []
for i in range(0,10):
data.append(float(i))

# write data to binary file

b_file = open("test.bin","wb")

b_file.write("  %8s  %6d  %1s\n" % ("DISTANCE", len(data), "F"))
for x in data:
b_file.write(" %6.2f" % x)

b_file.close()

# read back data from file

c_file = open("test.bin","rb")

data = c_file.read()
start, stop = 0, struct.calcsize("2s8s2si2s1s")

items = struct.unpack("2s8s2si2s1s",data[start:stop])
print items
print data[:40]

I'm pretty sure that when I tried this at the other PC there were a 
bunch of \x00\x00 characters in the file but they don't appear in 
NotePad  ... anyway, I thought the Python above would unpack the data 
but items appears as


('  ', 'DISTANCE', '  ', 538976288, '10', ' ')

which seems to be contain an extra item (538976288)

Alun Griffiths





___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] dynamic argument lists

2008-08-30 Thread eShopping

Bob, Kent

thanks for the suggestions.  Bob made the comment "If there is no 
compelling requirement that myfunc's argument be in the form **kwargs 
...", but I'm afraid I don't understand the difference between


myfunc (**kwargs)

and

myfunc (kwargs)

Would someone mind explaining this?  I never managed to find a 
satisfactory explanation for what "**" means!


Alun Griffiths

> <[EMAIL PROTECTED]> wrote:

> > Hi
> >
> > I have a GUI program that extracts some information from the user as
> > strings, and I then want to use the strings to form an argument list to
> > another function.  Hopefully the following code gives some flavour:
> >
> > def myfunc(**kwargs):
> >while kwargs:
> >name, value = kwargs.popitem()
> >print name, value
> >
> > myfunc(a=1, b=2, c=3, d=4)
> > arg_str = "a=1, b=2, c=3, d=4"
> > myfunc(arg_str)
> >
> > ARG_STR will be built up from the data extracted from the GUI.  I get
> this
> > error
> >
> > TypeError: myfunc() takes exactly 0 arguments (1 given)
> >
> > I understand that ARG_STR is a string and that MYFUNC is expecting
> something
> > else ,,, but not sure what it is.  I have tried various dictionary
> > configurations such as
> >
> > arg1 = ["a","b","c","d"]
> > arg2 = [1,2,3,4]
> > arg3 = dict(zip(arg1,arg2))
> > myfunc(arg3)
>

 myfunc(**arg3)

Let's back up to arg_str = "a=1, b=2, c=3, d=4"

To create a dictionary from that:

argDict = dict(pair.split('=') for pair in arg_str.split(','))

If there is no compelling requirement that myfunc's argument be in the form
**kwargs then

def myfunc(kwargs):
while kwargs:
name, value = kwargs.popitem()
print name, value

myfunc(argDict)


___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] dynamic argument lists

2008-08-29 Thread eShopping

Hi

I have a GUI program that extracts some information from the user as 
strings, and I then want to use the strings to form an argument list 
to another function.  Hopefully the following code gives some flavour:


def myfunc(**kwargs):
while kwargs:
name, value = kwargs.popitem()
print name, value

myfunc(a=1, b=2, c=3, d=4)
arg_str = "a=1, b=2, c=3, d=4"
myfunc(arg_str)

ARG_STR will be built up from the data extracted from the GUI.  I get 
this error


TypeError: myfunc() takes exactly 0 arguments (1 given)

I understand that ARG_STR is a string and that MYFUNC is expecting 
something else ,,, but not sure what it is.  I have tried various 
dictionary configurations such as


arg1 = ["a","b","c","d"]
arg2 = [1,2,3,4]
arg3 = dict(zip(arg1,arg2))
myfunc(arg3)

but still get the same error message.  All suggestions welcome!

Thanks in advance

Alun Griffiths

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Unicode strings

2008-08-22 Thread eShopping

Hi

I am trying to read in non-ASCII data from file using Unicode, with 
this test app:


vocab=[("abends","in the evening"),
("aber","but"),
("die abflughalle","departure lounge"),
("abhauen","to beat it/leave"),
("abholen","to collect/pick up"),
("das Abitur","A-levels"),
("abmachen","to take off"),
("abnehem","to lose weight"),
("die Auff\xFCrung","performance (of a play)"),
("der Au\xDFenhandel","foreign trade")
]

print "data from list"
for (word1, word2) in vocab:
print "   ", word1, unicode(word1,"latin1")

print "\ndata from file"
in_file = open("eng_ger.txt","r")
for line in in_file:
words = line.split(',')
print "   ",words[0],unicode(words[0],"latin1")
in_file.close()

The data in the file"eng_ger.txt" is listed below.  When I parse the 
data from the list, I get the correct text displayed but when reading 
it from file, the encoding into unicode does not occur.  I would be 
really grateful if someone could explain why the string-> unicode 
conversion works with lists but not with files!


Thanks in advance

Alun Griffiths

Contents of "eng_ger.txt"

abends,in the evening
aber,but
die abflughalle,departure lounge
abhauen,to beat it/leave
abholen,to collect/pick up
das Abitur,A-levels
abmachen,to take off
abnehem,to lose weight
die Auff\xFCrung,performance (of a play)
der Au\xDFenhandel,foreign trade


___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Which GUI?

2007-08-02 Thread eShopping

>Richard Querin wrote:
> > On 8/2/07, scott <[EMAIL PROTECTED]> wrote:
> >
> >
> >> I was thinking about finding a copy of that book, so maybe starting
> >> WxPython would be easier then and not worry about Tkinter.  Is "WxPython
> >> in Action" a very good book?
> >>
> >>
> >
> > I'm no programmer by trade, but dabble in Python/wxPython for fun and
> > bought the book several months ago. I've found it to be very good.
> > There are a lot of good online tutorials as well, but I was never sure
> > if they were up to date with the later versions of the framework - so
> > the book was blessing to me. I found the book to be very useful and
> > clearly written. It's no reference manual (the online docs serve that
> > purpose) but I think it really helped me get a good foundation in how
> > to program with wxPython.
>
>Switching gears from linear to event driven programming is a pretty
>significant paradigm shift.  Will this book help him get his head around
>that?

Chapter 3 of WPIA gives a nice introduction to event driven 
programming.  But event driven
programming is implicit in all GUIs (isn't it?) so this he will have 
to do this regardless of which
GUI he uses.


> > IMO a good book is still more useful and
> > efficient than online articles or tutorials for a newbie (like me)
> > most of the time. It's nice to be able to thumb through and study some
> > concept without flipping back and forth to some web page.
> >
> > I own a lot of computer books, and I've found Learning Python (an
> > O'Reilly Book) and wxPython in Action to be my two most useful ones.
> >

I have both books and agree that they are both excellent.  After a 
couple of evenings
flicking through WPIA and playing the code, I had a not-too-simple 
WinApp up and running

Alun Griffiths 

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor