Re: [Tutor] (no subject)

2005-07-06 Thread Light
You could use this: import os fp = open(os.path.expanduser('~')+r'\Desktop\myFile', 'r') Light > In python under windows, how can I create and access a file on the > Desktop? The following do NOT work: fp = open(r'Desktop\myFile','r&#x

Re: [Tutor] search through a list

2005-07-03 Thread Light
e: #if the log file is not new,     Hi, nephish. I've read Brian's letter. He has given a solution for this problem. And below is another solution for it. StrLog = " ".join([LogsRead[LogsRead.index(line)+1].strip() for line in LogsRead if line.strip() == i]) And I think &

Re: [Tutor] String to List and back?

2005-07-02 Thread Light
Hi, Lee. You could using: >>> bts = ''.join(strlist) Then you would get: >>> bts'abc'   Light   FOX.GIF Description: GIF image ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] HANDLING ERRORS

2005-06-30 Thread Light
HI Move the "except ..." outside the "if...". Try this one: print "Type Control C or -1 to exit" def print_menu(): print '1. Print Phone Numbers' print '2. Add a Phone Number' print '3. Remove a Phone Number' print '4. Lookup a Phone Number' print '5. Quit' print numbers =

Re: [Tutor] Debian install problems.

2005-05-11 Thread Light
You need to install python-devel package. > I don't know is this is the proper place to post this but I need some > help. > > I am running Damn Small Linux at the moment. I enabled apt-get and > adjusted the list file to use the testing branch so I could install > python2.4. The apt-get went fine,

Re: [Tutor] distutils problem

2005-04-16 Thread Light
I think he may need to install python-devel. > I have written a script that is available at: > > https://sourceforge.net/projects/rtf2xml/ > > This script has gotten about 1600 downloads and I have not got many > bug complaints. However, recently I got the bug complaint listed > below. > > This bu