Re: [Tutor] opening files

2006-09-25 Thread John Purser
hon.org/mailman/listinfo/tutor Hello Max, my_file = open('c:\\path\to\file\file.txt', 'r') my_file.readlines() my_file.close() Really, it's so simple it's hard to come up with directions. Just do it. John Purser ___

Re: [Tutor] Hi All

2006-09-02 Thread John Purser
- Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor What he said! John Purser -- Be careful! Is it classified? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Grepping a file for words in a list

2006-02-24 Thread John Purser
On Fri, 24 Feb 2006 12:23:22 -0800 (PST) Danny Yoo <[EMAIL PROTECTED]> wrote: > > > On Fri, 24 Feb 2006, John Purser wrote: > > > I'm writing a system admin script in python that checks recently > > accessed files for keywords like "failed, denied, err

[Tutor] Grepping a file for words in a list

2006-02-24 Thread John Purser
Hello, I'm writing a system admin script in python that checks recently accessed files for keywords like "failed, denied, error,..." etc. I'm using popen to call grep -F but it's VERY slow. Can anyone suggest a faster method to do this? Thanks, John Purse

Re: [Tutor] Handling binary file

2005-08-25 Thread John Purser
to Windows.  Worked just fine.   John Purser From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Julie LaiSent: Wednesday, August 24, 2005 18:20To: tutor@python.orgSubject: [Tutor] Handling binary file I have opened a file in binary mode. The 9th, 10th and 11th bytes contain

Re: [Tutor] Hello

2005-08-24 Thread John Purser
You know, I got that backwards and I can't tell you how much it's bugging me! All.Hail('Guido') Thanks. John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Purser Sent: Wednesday, August 24, 2005 16:52 To: 'Eric Walker&#

Re: [Tutor] Hello

2005-08-24 Thread John Purser
In Python that's Guido.Hail('All') -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eric Walker Sent: Wednesday, August 24, 2005 16:49 To: tutor@python.org Subject: [Tutor] Hello all, Hello... I just finished a class given by Mark Lutz and I love python.

Re: [Tutor] Quickest way to find a folder on windows

2005-07-26 Thread John Purser
e current user's "My Documents" directory would be to determine the current value of the %HOME% variable. John Purser From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jorge Louis De Castro Sent: Tuesday, July 26, 2005 04:32 To: tutor@pytho

Re: [Tutor] question about programmers

2005-06-22 Thread John Purser
If that's your only question about programmers then you aint been around them much. I'm 45. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, June 22, 2005 14:38 To: tutor@python.org Subject: [Tutor] question abo

Re: [Tutor] Python Resources

2005-05-13 Thread John Purser
while back. Python is cross platform but there are platform specific issues and communities that can help with them. Just a thought. Thanks for being out there and making us look good. John Purser -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Greg Lind

Re: [Tutor] Debian install problems.

2005-05-11 Thread John Purser
David, If you don't get an answer here on tutor.python.org then you might want to try: http://www.debian.org/MailingLists/ - where you'll find a link to http://lists.debian.org/debian-python/ - the mailing list for debian-python. Don't forget to search the archive

RE: [Tutor] Acessing files in Windows 2000

2005-03-08 Thread John Purser
or' Subject: Re: [Tutor] Acessing files in Windows 2000 John Purser wrote: >Try c:\\my documents\\memo.txt > > >John > > Unfortunately thats a no go ... palm.py palm memo.txt to oocalc data.csv convertor, written by lentil ;) [EMAIL PROTECTED] - enter "palm softwar

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 w

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

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

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

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

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] 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] 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

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] 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] 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] 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] 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] 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] 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] 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] 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