Re: [Tutor] Comments appreciated

2004-12-26 Thread Jacob S.
> The only thing that's missing is that this script can't handle paths > like ~/dir/junkthis I believe you're looking for os.path.expanduser("~/dir/junkthis") BTW, trashcan IS a module level variable because it's defined at the module level. Why it says it's local is beyond me. HTH, Jacob Schmid

Re: [Tutor] Environment Variables On Windows

2004-12-26 Thread John Purser
script itself... I tried to do this: import os import cgitb; cgitb.enable() print "Content-type: text/html\n\n" print "Hi there, ",os.system("echo %USERNAME%") But I don't get anything in the browser (500 error - Internal Server Error) and when I run the script in IDLE I get: Hi there, 0 I guess

Re: [Tutor] Environment Variables On Windows

2004-12-26 Thread Mark Kels
> Morning Mark, > > Happy New Year, Merry Christmas, and a jolly Winter Solstice Season! > > Whenever you're talking about how to do something in Windows it REALLY > helps when you include WHICH windows you're working with. > > I believe the following will allow you to manipulate windows > envir

RE: [Tutor] Debugging in emacs

2004-12-26 Thread Marilyn Davis
Hi Toby, You still here? I'm finally trying (again) to get debugging going. On Mon, 22 Nov 2004, McLaughlin, Toby wrote: > Thanks Marilyn, > > Debugging in emacs is obviously not the hottest topic around here. > > Luckily, I have something working now. For anyone who is interested, > here i

Re: [Tutor] Environment Variables On Windows

2004-12-26 Thread John Purser
Mark Kels wrote: Hello to all :-) I'm writing a CGI script (one of my first ever CGI programs and I'm using this tutor to learn CGI: http://www.oreilly.com/openbook/cgi/ This isn't a python tutor, but the introductions says that any language will be good for this tutor. Anyway, I got to the Using E

Re: [Tutor] Comments appreciated

2004-12-26 Thread Luis N
Hi, Jeff Shanon, thanks for your help. I was wondering if there was a function to automatically get the user on a *nix system, and had tried the if __name__ == __main__ but didn't really get it until your example. The only thing I'm not clear about is how 'trashcan' can be a local variable inside

[Tutor] Environment Variables On Windows

2004-12-26 Thread Mark Kels
Hello to all :-) I'm writing a CGI script (one of my first ever CGI programs and I'm using this tutor to learn CGI: http://www.oreilly.com/openbook/cgi/ This isn't a python tutor, but the introductions says that any language will be good for this tutor. Anyway, I got to the Using Environment Varia

Re: [Tutor] A better way to do it.

2004-12-26 Thread Alan Gauld
> --- "Jacob S." <[EMAIL PROTECTED]> wrote: > > I have a couple of questions. > > 1) How do I change the title of the window? My tutors case study shows this, the critical but of code is here: class GrammarApp(Frame): def __init__(self, parent=0): Frame.__init__(self,parent) self.type =