RE: [Tutor] maximum value in a Numeric array

2004-12-10 Thread Ertl, John
All, Thanks for the help...I am using the older Numeric 23.4. I have some stuff that cannot use Numarray yet. Numeric does not seam to have the same functionality. Happy Holidays. John Ertl -Original Message- From: Danny Yoo [mailto:[EMAIL PROTECTED] Sent: Friday, December 10, 2004

RE: [Tutor] Regexp Not Matching on Numbers?

2004-12-14 Thread Gooch, John
before it would search the entire string for a match. This seems a bit unusual from my past experience, but it solved the issue I was experiencing. Thank you for your help. John Gooch -Original Message- From: Kent Johnson [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 14, 2004 10:41 AM

[Tutor] turning a number into a formated string

2004-12-15 Thread Ertl, John
o look like 00011000 22.33 needs to look like 00223330 .22 needs to look like 2200 Any ideas on the right padding the decimal side using "0" Thanks, John ___ Tutor maillist - [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/tutor

[Tutor] Regexp Not Matching on Numbers?

2004-12-14 Thread Gooch, John
This is weird. I have a script that checks walks through directories, checks to see if their name matches a certain format ( regular expression ), and then prints out what it finds. However, it refuses to ever match on numbers unless the regexp is ".*". So far I have tried the following regular exp

RE: [Tutor] turning a number into a formated string

2004-12-15 Thread Ertl, John
Very elegant, It makes me feel like "I should have thought of that". Thanks for the help and the reminder to think of the simplistic approach. John -Original Message- From: Tim Peters [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 15, 2004 12:15 To: Ertl, John Cc:

[Tutor] ipython, PYTHONPATH, on a MAC

2010-02-16 Thread John [H2O]
Hello, I'm not a Mac user, but I'm a promoter of Python! I have a good friend using a Mac who's becoming sceptical of python due to frustrations with the PYTHONPATH. I'm trying to help... Everything is fine running vanilla python. Importing modules works fine. But in ipython, the module paths ne

[Tutor] Help with exercises from learning to program python wikibooks

2010-07-04 Thread John Palmer
yntax I've tried every changing where the white space is and the commas but i just cant get it to work. any help would be much appreciated and thank you in advance John ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Contents of Tutor digest, help with Hangman program

2010-07-19 Thread John Palmer
dh6SX3q>, which uses Steve > D'Aprano's random_digits function, took 201 seconds (3.35 minutes). > > Still, I understand yours, and not his (the return line). I'd never > noticed random.sample() before, nor tried out extend() on a list. So > thanks, Bob. > > Dick

Re: [Tutor] Contents of Tutor digest, Help with hangman

2010-07-19 Thread John Palmer
line with the word in it off the screen, but I don't really like it to be honest. The getpass module seems to be the best solution i just don't understand why its not working for me. Regards John On 19 July 2010 16:02, wrote: > Send Tutor mailing list submissions to &g

Re: [Tutor] Contents of Tutor digest, Help with hangman

2010-07-19 Thread John Palmer
Right thanks for all the help guys, finally got it working. It was because as previously suggested, I was using Idle instead of the terminal. Again thanks for all the help John ___ Tutor maillist - Tutor@python.org To unsubscribe or change

Re: [Tutor] input and raw input

2010-09-28 Thread John Chandler
e: > m.append(a[I]) > m=map(float,m) > print m;print len( m ) > >> [1,2,3] > >> 3 > > looking forward to seeing your help, > regards, > Ahmed > > > > > ___ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options:

[Tutor] How to copy file from a source, I do not know the source file name, Only path to the src directory I know

2010-11-09 Thread Joseph John
#shutil.move(src, dst) shutil.copy(src,dst2) shutil.move(src,dst3) ## -- Thanks Joseph John http://www.oss101.com/ ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How to copy file from a source, I do not know the source file name, Only path to the src directory I know

2010-11-09 Thread Joseph John
e" >> # >> dst2 = "/home/joseph/Projects/Training/Python/example/Two/" >> dst3 = "/home/joseph/Projects/Training/Python/example/Three/" >> # >> >> # >> #shutil.move(src, dst) >> shutil.copy(src,dst2) >> shutil.move(src,dst3) >> >> ##

Re: [Tutor] Fw: Installing Pyserial for Python27 on Win 7

2010-11-22 Thread John Smith
stop now before I install a bunch of extra applications that I need only to install one or two Python modules. I like Python itself. Very powerful. But I guess I'll look for some other language which provides the features I need without the hassle. Thanks again for your help. Cheers, John

Re: [Tutor] help with loop that is to be fed out of a word list

2009-02-09 Thread John Fouhy
n the list, Does this word use all the required letters? If so, print it out." You can use your first function to make that loop work. Hope this helps. -- John. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Detecting wx

2009-02-12 Thread John Fouhy
t;, line 14359, in CallAfter assert app is not None, 'No wx.App created yet' AssertionError: No wx.App created yet Whereas if I do the same thing from pycrust, nothing happens (that is, presumably my lambda executes). -- John. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Keeping Dictonary Entries Ordered

2009-02-12 Thread John Fouhy
not do what you want if you initialise it as something like: o_dict(foo=1, bar=2) All of which goes to show that you're probably better off looking for an implementation online, since someone else is bound to have tied off all the issues :-) -- John. ___

Re: [Tutor] Reading a Text File with tkFileDialog, askopenfilename+enumerate

2009-02-15 Thread John Fouhy
2009/2/16 Alan Gauld : > for index, item in [9,8,7,6]: > print index, item > > > 0 9 > 1 8 > 2 7 > 3 6 You mean: for index, item in enumerate([9,8,7,6]): print index, item :-) -- John. ___ Tutor maillist - Tutor@python.or

Re: [Tutor] "Ctrl-C (unix)" in python

2009-02-18 Thread John Fouhy
nput('Type "quit" to quit:') if response.lower() == 'quit': self.done = True break Or even more simply: raw_input("Hit return to quit.") self.done = True It would also be easy to replace this with, say, Tkinter code to put a "Quit"

Re: [Tutor] re Format a file

2009-02-26 Thread John Fouhy
 a,b=tem.split(' ',1) > ??? de.write(line[:60]+a+'\n') > ??? line=b > except ValueError:pass So you have a while loop, whose condition depends on line. This will loop infinitely if the body of the loop does not change the

Re: [Tutor] Difference in minutes between two time stamps

2009-03-02 Thread John Fouhy
stamps. Although you will probably need to look at the time module to get the different codes -- the documentation isn't superbly organised in this area, I feel. Anyway, as a start: >>> import datetime >>> s = '09:35:23' >>> datetime.datetime.strptime(s,

Re: [Tutor] What is this [] construction?

2009-03-02 Thread John Fouhy
2009/3/3 Wayne Watson : > What is this: d = [ int(x) for x in s.split(":") ] It's a list comprehension: http://docs.python.org/tutorial/datastructures.html#list-comprehensions -- John. ___ Tutor maillist - Tutor@python.org http

Re: [Tutor] UNSUBSCRIPTABLE?

2009-03-08 Thread John Fouhy
, and board[3]. The error means that you're trying to use square brackets after something that doesn't support them. It's telling you that 'board' is a function (as opposed to a list or a dict, for example) and functions don't support []. Possibly you're meant t

Re: [Tutor] UNSUBSCRIPTABLE?

2009-03-08 Thread John Fouhy
eems to be 'get out the old curry comb' and go > letter by letter, between the monitor and the page. Headache time. I think Brett's suggestion is the most likely one. Look for a line that starts with: board = That's p

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

2009-03-17 Thread John Fouhy
sing this code to design a dialog for the larger > application program, so I don't need to get too fussy about how it ends. I > just want to see that I've got the elementary widgets place properly. I didn't notice any call to root.mainloop() in your original code. Are you

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

2009-03-17 Thread John Fouhy
pretty rusty, but I'm guessing that your dialog may not work if there is no event loop running. Try this: root = Tk() root.after_idle(DialogPrototype, root) root.mainloop() See docs here for the after_idle() method: http://effbot.org/tkinterbook/widget.htm -- John. ___

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

2009-03-18 Thread John Fouhy
return -1 ... elif len(x) > len(y): ... return 1 ... else: ... return cmp(x,y) ... >>> words.sort(cmp=wcmp) >>> words[words.index('a'):words.index('bb')+1] ['a', 'b', 'c', 'd', 'e', 'f'

Re: [Tutor] HI, #Include like in python

2009-03-19 Thread John Fouhy
lease reply me =) Drop the .py. Just type: import listen You can use the __import__ function if you want, but generally you want the import statement as above. The equivalent to 'import listen' is: listen = __import__('listen') See the tutorial here: http://docs.pytho

[Tutor] Syntax error

2009-03-22 Thread John Jenkinson
I am trying to write a program that displays the string expression "Game Over", in a console window that remains open. my code is as follows: # Game Over console window print "Game Over" raw input("\n\nPress the enter key to exit.") The error I am recieve is "There is an error in your progra

Re: [Tutor] Syntax error

2009-03-22 Thread John Jenkinson
uot; > raw_input("\n\nPress the enter key to exit.") > > In Python 3.x: > >print("Game Over") > input("\n\nPress the enter key to exit.") > > -Mark > > "John Jenkinson" wrote in message > news:58fd32380903222035

Re: [Tutor] Syntax error

2009-03-22 Thread John Jenkinson
2009 at 8:35 PM, John Jenkinson > wrote: > >> I am trying to write a program that displays the string expression "Game >> Over", in a console window that remains open. >> >> my code is as follows: >> >> # Game Over console window >

[Tutor] no output

2009-03-22 Thread John Jenkinson
My Code: # Game Over - Version 2.0 # Demonstrates the use of quotes in strings print "Program 'Game Over' 2.0" print \ """ - --- --- ---- / ___|/ | / |/ | | ___| | | / /| | / /| / | | |__ | | _ / ___ | / / |__/ |

Re: [Tutor] no output

2009-03-22 Thread John Jenkinson
On Mon, Mar 23, 2009 at 12:08 AM, John Jenkinson wrote: > My Code: > > # Game Over - Version 2.0 > # Demonstrates the use of quotes in strings > > print "Program &#x

Re: [Tutor] Syntax error

2009-03-23 Thread John Jenkinson
I am using Python 2.4.1. I am using the IDLE process, and I was not saving as ".py". Thank you, everyone, for your continued help. On Mon, Mar 23, 2009 at 3:35 AM, Alan Gauld wrote: > > "John Jenkinson" wrote > > I am trying to write a program that disp

Re: [Tutor] Binary Real to Decimal

2009-03-29 Thread John Fouhy
l help? >>> round(12345, -2) 12300.0 -- John. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Binary Real to Decimal

2009-03-29 Thread John Fouhy
would I join those to be a float again? The easiest way would be to convert decnum1 and decnum2 into strings, join them together, and then call float() on the result. e.g. myfloat = float('%s.%s' % (decnum1, decnum2)) -- John. ___ Tutor maill

Re: [Tutor] range() fractional increment

2009-03-30 Thread John Fouhy
0001, 11.6, 12.0] However, the builtin range() only works with integers. I think there is a range() function in the python cookbook that will do fractional step sizes. But really, there's nothing wrong with your while loop. -- John. ___ Tuto

[Tutor] Number cruncher

2009-04-22 Thread John Jenkinson
help me for this project. - John Jenkinson ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How to set up an Array?

2009-05-11 Thread John Fouhy
;1', '1', '1', '1', '1', '1', '1'], 'names': ['RA7', 'RA6', 'RA5', '-', 'RA3', 'RA2', 'RA1', 'RA0']} If regular expressions aren't powerful enough, you could look into a full-fledged parsing library. There are two I know of: simpleparse and pyparsing. SimpleParse works well if you're familiar with writing grammars: you write a grammar in the usual style, and simpleparse makes a parser out of it. pyparsing is more OO. -- John. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Parsing Bible verses

2009-05-21 Thread John Fouhy
2009/5/22 Eduardo Vieira : > I will be looking for lines like these: > Lesson Text: Acts 5:15-20, 25; 10:12; John 3:16; Psalm 23 > > So, references in different chapters are separated by a semicolon. My > main challenge would be make the program guess that 10:12 refers to > the

Re: [Tutor] Parsing Bible verses

2009-05-25 Thread John Fouhy
2009/5/26 Eduardo Vieira : > Now, a little farther on the topic of a Bible database. I'm not sure > how I should proceed. I don't really have the db file I need, I will > have to generate it somehow, from a bible software, because the > version I want is for Portuguese. I have found a bible in sql,

[Tutor] creating a dict-like class - asigning variables... this one may take some thought ; )

2009-05-28 Thread John [H2O]
Hello, I am trying to create a class to hold and reference things similar to matlab's structure. ## A class definition to hold things class stuff(object): """ holds stuff """ def __init__(): pass @classmethod def items(cls): stuff = [] for i in cls.__dict__

Re: [Tutor] 3.0 on Mac

2009-06-11 Thread John Fouhy
n) (oh, there is a third source for python: MacPorts. Are you using macports?) -- John. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Best Python Editor

2009-06-13 Thread John Fouhy
sure you could find many discussions on this topic in the list archives. -- John. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] filtering NaN values

2009-06-22 Thread John Fouhy
2009/6/23 Alan Gauld : > Interesting! How is a NaN stored in Python? > ie. How do you get to the point of having one in the first place? Well, you can do this: >>> float('nan') nan (try float('inf') too) -- John. _

Re: [Tutor] creating a dict-like class - asigning variables... this one may take some thought ; )

2009-06-26 Thread John [H2O]
Thanks everyone, all of this feedback is valuable! -- View this message in context: http://www.nabble.com/creating-a-dict-like-class---asigning-variables...-this-one-may-take-some-thought--%29-tp23759398p24218879.html Sent from the Python - tutor mailing list archive at Nabble.com. __

Re: [Tutor] creating a dict-like class - asigning variables... this one may take some thought ; )

2009-07-03 Thread John [H2O]
spir wrote: > > > What you're looking for is a dictionary... > s = {"cheese":"Brie", "country":"France", ...} > > Or maybe a kind of object type that works ~ like a dict, but with object > syntax (get rid of {} and "" for keys). Example: > > class Stuff(object): > def __iter__(self): >

[Tutor] using datetime and calculating hourly average

2009-07-07 Thread John [H2O]
Here's a function I wrote to calculate hourly averages: It seems a bit slow, however... any thoughts on how to improve it? def calc_hravg(X): """Calculates hourly average from input data""" X_hr = [] minX = X[:,0].min() hr = dt.datetime(*minX.timetuple()[0:4]) while hr

Re: [Tutor] using datetime and calculating hourly average

2009-07-07 Thread John [H2O]
points in the data. As for your comment regarding the invariant... would it be: while hr q: NOT while hr not q: The latter makes more sense to me, but I'm not familiar with this approach... Thanks, john Bob Gailer wrote: > > John [H2O] wrote: >> Here's a function I wro

Re: [Tutor] using datetime and calculating hourly average

2009-07-07 Thread John [H2O]
Alan Gauld wrote: > > > I assume there is a good reason to use a numpy array instead of > a regular list? ie You need a numpy array elsewhere in the code? > I've never used numpy bt there is a possibility that array access > is slower than list access, but I have no idea. It just adds an extra

Re: [Tutor] using datetime and calculating hourly average

2009-07-08 Thread John [H2O]
Sanders, The problem is I don't want date, I want the date AND hour, just not minutes. As for the comparison, in numpy here's what happens when I change the way I construct the where statements: --> 196 ind = np.where( (t1 < Y[:,0] < t2) ) #same result with/without inner parens 197

Re: [Tutor] Fixing "nearly ASCII" data file?

2009-08-10 Thread John Krukoff
//www.crummy.com/cgi-bin/msm/map.cgi/ASCII%2C+Dammit -- John Krukoff Land Title Guarantee Company ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Tutor Mailing List

2009-08-25 Thread John Jenkinson
For the time being, I would like to be removed from the Tutor Mailing List for Python Users. Thanks, - John Jenkinson ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Can a method be added to dictionary?

2009-11-19 Thread John Fouhy
e that's what your method returns. What you need to do is put an actual function in there, instead of a function call. Here's a toy example: >>> def say_hello(): ... print 'Hello world!' ... >>> myDict = { 1:say_hello }

[Tutor] Field/Variable References

2009-12-18 Thread John Filben
Can someone please let me know how to read a file one record at a time (just say fixed block for now - see small example below) and assign columns to fields.  Then reference the field names with if-then-else logic. Sample Fixed Block File: John98762 John82634 John11234 Thank you.  John Filben

[Tutor] removedirs ?

2004-12-16 Thread Ertl, John
-toplevel- os.removedirs("DAF") File "/home/ertlj/ertljVersion/lib/python2.3/os.py", line 167, in removedirs rmdir(name) OSError: [Errno 17] File exists: 'DAF' Thanks, John Ertl ___ Tutor maillist - [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/tutor

RE: [Tutor] removedirs ?

2004-12-16 Thread Ertl, John
...but the straight forward path might be the best. Thanks, John Ertl -Original Message- From: Jason Child [mailto:[EMAIL PROTECTED] Sent: Thursday, December 16, 2004 12:36 Cc: [EMAIL PROTECTED] Subject: Re: [Tutor] removedirs ? Ertl, John wrote: >I am trying to remove a directory t

[Tutor] Popen? or something else

2004-12-22 Thread Ertl, John
t see it. $ dtg 2004122212 Thanks, John Ertl ___ Tutor maillist - [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/tutor

RE: [Tutor] Popen? or something else

2004-12-22 Thread Ertl, John
you gave using the new 2.4 Popen? It looks like the older popen. I can get the older popen to work but not Popen. Thanks again. John Ertl -Original Message- From: Roger Merchberger [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 22, 2004 10:25 To: [EMAIL PROTECTED] Subject: Re

[Tutor] Is there a "better" way to do this?

2004-12-22 Thread Ertl, John
I am trying to do the usual thing of asking for an input and then checking it to see if it is valid. If the entry is not valid then ask again until you get the correct answer. I have come up with this class. I am trying to make a transition from procedural programming to object oriented. Is th

RE: [Tutor] Popen? or something else

2004-12-22 Thread Ertl, John
Hugo, That looks like it will work great. Thanks, John -Original Message- From: Hugo González Monteverde [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 22, 2004 12:41 To: [EMAIL PROTECTED] Cc: Ertl, John Subject: Re: [Tutor] Popen? or something else You may use the 'com

RE: [Tutor] What am I doing wrong...

2004-12-23 Thread John Purser
elow there's a space between the function name (main) and the parenthesis. I don't believe that's supposed to be there. Good Luck. John Purser -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ken Stevens Sent: Thursday, December 23, 2004 09:33 T

RE: [Tutor] happy holidays!

2004-12-24 Thread John Purser
their rightful place in a peaceful community! And I got my Christmas wish when UPS delivered my very own RS/6000! Happiness is being root on your very own 'nix box! Merry Solstice Season everybody! John Purser -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf

Re: [Tutor] happy holidays!

2004-12-24 Thread John Purser
sean dwyer wrote: On Fri, Dec 24, 2004 at 11:01:13AM -0800, John Purser wrote: And I got my Christmas wish when UPS delivered my very own RS/6000! Happiness is being root on your very own 'nix box! I've been lurking so long I almost forgot I could email, but I HAVE to ask, what

Re: [Tutor] Environment Variables On Windows

2004-12-26 Thread John Purser
g my setup I like to document things. Say running "set > Environment-Before.txt" in a nice safe directory. This will output your current setup so if things get weird you can at least bring things back to you starting point. Have a good one, John Purser ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Environment Variables On Windows

2004-12-26 Thread John Purser
environ["USERNAME"] Sorry, haven't done any CGI stuff with any languages. Can't help you there. John Purser ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

RE: [Tutor] O.T.

2004-12-27 Thread John Purser
king, have some certifications in Unix and Windows. I guess my status would be "involved". Nice to meet you Jacob. John Purser -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jacob S. Sent: Monday, December 27, 2004 13:31 To: tutor@python.org Subject

RE: [Tutor] try here for tkinter lessons

2004-12-29 Thread John Purser
Thanks. I've bounced off tkinter several times and have been looking for a new approach. I'll check it out as soon as I can. John Purser -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ron Alvarado Sent: Wednesday, December 29, 2004 13:52

Re: [Tutor] moving widgets around

2004-12-30 Thread John Miller
ere tkdnd.py is located simply type: pythonw tkdnd.py and it will work. If you find anything simpler or more bare bones, please let us know. John Miller On Dec 29, 2004, at 4:25 PM, Sean McIlroy <[EMAIL PROTECTED]> wrote: I'd like to get some example code showing how to move widge

RE: [Tutor] here documents

2005-01-03 Thread John Purser
I'd like to thank everyone who posted on this thread. I was reading a Korn shell manual the other day and could not figure out what a "here" document was. I'm going to take another run at it with this conversation in mind! Sometimes I can't see the path until I know wh

RE: [Tutor] How to run a script file

2005-01-04 Thread John Purser
is in /usr/bin. And that is a hash mark followed by an exclamation point. This is called "hash bang" in uningo. John Purser -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Patric Michael Sent: Tuesday, January 04, 2005 14:56 To: tutor@python.or

RE: [Tutor] How to run a script file

2005-01-04 Thread John Purser
I'm not sure why it fails "of course". How do you know it's failing at the first slash? Also you might want to look at your .profile file in your home directory and modify your path there. John Purser -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PRO

[Tutor] Looking for a firebird interface

2005-01-04 Thread John Fabiani
Hi, I'm using SUSE x86_64 Linux and unable to compile the KInterbasdb interface for Python.  I'm wondering if anyone has it compiled on either a 32bit or 64bit linux.  Of course I'm hoping someone is willing to post it. Or tell me where I might get it.  Thanks in

Re: [Tutor] Looking for a firebird interface

2005-01-05 Thread John Fabiani
Thanks all I fixed it. John On Tuesday 04 January 2005 21:30, John Fabiani wrote: > Hi, > I'm using SUSE x86_64 Linux and unable to compile the KInterbasdb interface > for Python.  I'm wondering if anyone has it compiled on either a 32bit or > 64bit linux.  Of course I'

RE: [Tutor] Python with MySQL ?

2005-01-11 Thread John Purser
A year of so ago I had a major data conversion project to deal with and used python, mysql, and the resources listed below to "get 'er done" (my abject apologies to the non-American readers who will not get that reference). It was very quick to get real results with this toolse

RE: [Tutor] Python with MySQL ?

2005-01-12 Thread John Purser
Great Link. Thanks for the reference! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Rock Sent: Tuesday, January 11, 2005 19:03 To: tutor@python.org Subject: Re: [Tutor] Python with MySQL ? * Danny Yoo <[EMAIL PROTECTED]> [2005-01-11 10:55]: > >

Re: [Tutor] Tix and Table printing

2005-01-13 Thread John Fouhy
Guillermo Fernandez Castellanos wrote: Is there any "table" frame that I am unaware of? or a way of changing the type of character so I can have a font with characters of equal width? You might see if this does what you want: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/5226

[Tutor] Help

2005-01-14 Thread john stanley
This is my first attempt at programing and my first program sort of did work hear is the program and if any one can tell me what i did wrong or forgot i would appreciate it a = input("Type in the Grose: ") b = input("type in the Miles: ") print "a * 0.74 / b is" a*0.74/b as you can see it sh

Re: [Tutor] py2exe

2005-01-18 Thread John Fouhy
log module) -- John. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Threaded Script Runs Find in IDLE, Never Terminates from Windows Command Prompt

2005-01-19 Thread Gooch, John
I have a threaded python ( Python 2.3.4 ) script that runs perfectly on Windows 2000 Server SP4 when it is executed from IDLE ( i.e. press 'F5' from the editor ), the threads do their work, halt, and the 'join' command picks them up. When I run the same script from windows command line ( cmd.exe ),

[Tutor] Popen and sending output to a file

2005-01-19 Thread Ertl, John
ter way built into Popen but I could not figure out the documentation. Any help would be appreciated. John ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

RE: [Tutor] Popen and sending output to a file

2005-01-19 Thread Ertl, John
That is too easy. I was looking at the examples of how to replace the old popen and I just did not get it but the page you sent is great. John -Original Message- From: Danny Yoo [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 19, 2005 10:34 To: Ertl, John Cc: tutor@python.org

Re: [Tutor] Clash of the Titans and Mundane Matters

2005-01-20 Thread John Fouhy
ut: Travel: $2300.00 Accommodation: $200.00 Food: $12.50 Food: $19.95 Food: $2.35 Travel: $500.00 and the same in the file 'myExpenses.txt'. The str() function automatically calls .__str__() on its argument (if you don't define __str__, it will call a boring default one). And the p

RE: [Tutor] Ooer, OT Lisp

2005-01-21 Thread John Purser
Very interesting sites. Thank you. John Purser -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alan Gauld Sent: Friday, January 21, 2005 14:33 To: Liam Clarke; Tutor Tutor Subject: Re: [Tutor] Ooer, OT Lisp > 1) Anyone here familiar with both? Yes

[Tutor] Threaded Script Runs Fine in IDLE, Never Terminates from Windows Command Prompt

2005-01-22 Thread Gooch, John
I have a threaded python ( Python 2.3.4 ) script that runs perfectly on Windows 2000 Server SP4 when it is executed from IDLE ( i.e. press 'F5' from the editor ), the threads do their work, halt, and the 'join' command picks them up. When I run the same script from windows command line ( cmd.exe ),

RE: [Tutor] sorting a 2 gb file

2005-01-25 Thread John Purser
e. Then I pulled the data out via python and wrote it to a new ISAM file. The whole thing took longer to code that way but boy it sure scaled MUCH better and was much quicker in the end. John Purser -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alan G

[Tutor] Diffing two files.

2005-01-28 Thread Ertl, John
explicitly with the lines? Thanks, John Ertl ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

RE: [Tutor] Diffing two files.

2005-01-28 Thread Ertl, John
territory for me. I will take a look at difflib. Thanks again John Ertl Simplified example of a text files. Sldfsdf Sdfsdfsf Sdfsdfsdfwefs Sdcfasdsgerg Vsadgfasgdbgdfgsdf -Beginning flag This Text Should be The Same in the other file. -Ending flag Sdfsdfsdfsd Sdfsdfsdfasd Sdfsadfsdf Sdfsadfasdf

RE: [Tutor] Diffing two files.

2005-01-31 Thread Ertl, John
Thanks, So simple...DAA just do an equivalency on the list...no need to do sets or step through each line. John -Original Message- From: Kent Johnson [mailto:[EMAIL PROTECTED] Sent: Saturday, January 29, 2005 06:05 Cc: Tutor@python.org Subject: Re: [Tutor] Diffing two files. OK

RE: [Tutor] Are you allowed to shoot camels? [kinda OT]

2005-02-02 Thread John Purser
s and rolled them into one. That's when I came across Python. Never looked back. John Purser -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Liam Clarke Sent: Wednesday, February 02, 2005 15:18 To: Tutor Tutor Subject: [Tutor] Are you allowed to sh

[Tutor] What is in the traceback object

2005-02-08 Thread Ertl, John
    print value     print tracebak   In the log file I get this:   exceptions.SystemError error return without exception set   How do I get the actual traceback so I can read it?   Thanks,   John Ertl   ___ Tutor maillist - Tutor

RE: [Tutor] What is in the traceback object

2005-02-08 Thread Ertl, John
Danny, That is great...every time I have a problem someone has already solved it...the other problem is finding that solution...Thanks again. John Ertl -Original Message- From: Danny Yoo [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 08, 2005 10:39 To: Ertl, John Cc: 'tutor@pytho

RE: [Tutor] Reading Tutor with gmail: monospace fonts

2005-02-24 Thread John Purser
Thanks for the tip. John Purser -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Dunn Sent: Thursday, February 24, 2005 14:43 To: tutor@python.org Subject: [Tutor] Reading Tutor with gmail: monospace fonts Hi all, This is slightly off topic

[Tutor] variable name based on variables (expansion?)

2005-02-28 Thread John Christian
a python 2.3 noob asks: # I have some lists GameLogic.varList0=[1,1,1,1] GameLogic.varList1=[1,1,1,1] GameLogic.varList3=[1,1,1,1] # I want to change specific list elements GameLogic.varList0[2]=0 print GameLogic.varList0 [1,1,0,1] # But I want the assignment # to be based on variables LIST=1 PO

[Tutor] Python and a web image map

2005-02-28 Thread Ertl, John
a HTML / Java script issue. Thanks, John Ertl ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

RE: [Tutor] Python and a web image map

2005-02-28 Thread Ertl, John
Liam, Thanks for the code chunk and the advice. Java script here I come. John Ertl -Original Message- From: Liam Clarke [mailto:[EMAIL PROTECTED] Sent: Monday, February 28, 2005 13:27 To: Tutor Tutor Subject: Re: [Tutor] Python and a web image map I would say it's best done

Re: [Tutor] to employ Tkinter

2005-03-01 Thread John Fouhy
tkMessageBox.showerror('Error', '%s: File not found!' % prog) return args = filter(None, [arg1, arg2, arg3]) os.system(' '.join([prog] + args)) Button(tk, text='Run', command=runProgram).grid() tk.mainloop() ---

Re: [Tutor] Linked List

2005-03-06 Thread John Fouhy
item): bisect.insort(self.queue, item) # usage queue = PriorityQueue(0) queue.put((2, "second")) queue.put((1, "first")) queue.put((3, "third")) priority, value = queue.get() -- John. ___ Tutor maillist - Tutor@python.org http

RE: [Tutor] Acessing files in Windows 2000

2005-03-08 Thread John Purser
Try c:\\my documents\\memo.txt John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave S Sent: Tuesday, March 08, 2005 14:24 To: Python Tutor Subject: [Tutor] Acessing files in Windows 2000 I have a script that converts data relating to my work. It

RE: [Tutor] Acessing files in Windows 2000

2005-03-08 Thread John Purser
I agree with a previous poster, check your path. I think either the path doesn't exist or you don't have permission to get to it. John -Original Message- From: Dave S [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 08, 2005 14:50 To: [EMAIL PROTECTED] Cc: 'Python Tut

<    1   2   3   4   5   6   7   8   9   10   >