Re: [Tutor] run in "deamon" mode?

2008-01-10 Thread Eric Brunson
Allen Fowler wrote: > Thank you for all the great tips... I'll try a few and see what works. > > I must say that I'm a bit surprised that the Python Std library does not have > a module for this. Are all python scripts expected to be small user-mode > utilities? > I really agree with you on t

Re: [Tutor] run in "deamon" mode?

2008-01-10 Thread Allen Fowler
Thank you for all the great tips... I'll try a few and see what works. I must say that I'm a bit surprised that the Python Std library does not have a module for this. Are all python scripts expected to be small user-mode utilities? _

Re: [Tutor] shutils.copytree

2008-01-10 Thread Kent Johnson
Tony Cappellini wrote: > I'm using shutils for the first time, and I've un into a problem. > The docs for copytree are pretty sparse and don't mention any problem > situations > > Under WinXP, I'm trying to copy a directory tree to a USB device using > copytree, but copytree doesn't like a drive

[Tutor] shutils.copytree

2008-01-10 Thread Tony Cappellini
I'm using shutils for the first time, and I've un into a problem. The docs for copytree are pretty sparse and don't mention any problem situations Under WinXP, I'm trying to copy a directory tree to a USB device using copytree, but copytree doesn't like a drive letter as a destination. copytree('

Re: [Tutor] import sys; sys.exit()

2008-01-10 Thread Alan Gauld
"Andrew Volmensky" <[EMAIL PROTECTED]> wrote > warewerks-01:~ andrew$ python > Python 2.4.4 (#1, Oct 18 2006, 10:34:39) > [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin > Type "help", "copyright", "credits" or "license" for more > information. > >>> import sys > >>> sys.exit() > warewer

Re: [Tutor] import sys; sys.exit()

2008-01-10 Thread Steve Willoughby
On Thu, Jan 10, 2008 at 01:17:20PM -0800, Andrew Volmensky wrote: > When typing the commands [statements?] in the terminal I get this: > > Last login: Sat Jan 5 22:20:44 on ttyp2 > Welcome to Darwin! > warewerks-01:~ andrew$ python > Python 2.4.4 (#1, Oct 18 2006, 10:34:39) > [GCC 4.0.1 (Apple Co

Re: [Tutor] import sys; sys.exit()

2008-01-10 Thread Eric Brunson
Kent Johnson wrote: > Andrew Volmensky wrote: > > >> ...and get an error. I have tried saving as exit.py from the editor >> and trying to run it and also entering the commands directly into the >> shell. My understanding is that this is supposed to exit the program, >> but that does not ap

Re: [Tutor] import sys; sys.exit()

2008-01-10 Thread Andrew Volmensky
Thanks Alan, When typing the commands [statements?] in the terminal I get this: Last login: Sat Jan 5 22:20:44 on ttyp2 Welcome to Darwin! warewerks-01:~ andrew$ python Python 2.4.4 (#1, Oct 18 2006, 10:34:39) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin Type "help", "copyright", "cre

Re: [Tutor] replacing CreateProcess command for Vista compatibility?

2008-01-10 Thread Tiger12506
> WindowsError: [Errno 193] %1 is not a valid Win32 application This line says that %1 is not a valid application. Windows uses %1 to mean the first argument on the command line to the program. Without seeing any code, it would be difficult to tell where this is being introduced, but the explan

Re: [Tutor] import sys; sys.exit()

2008-01-10 Thread Kent Johnson
Andrew Volmensky wrote: > ...and get an error. I have tried saving as exit.py from the editor > and trying to run it and also entering the commands directly into the > shell. My understanding is that this is supposed to exit the program, > but that does not appear to be happening. sys.exit(

[Tutor] replacing CreateProcess command for Vista compatibility?

2008-01-10 Thread Kirk Vander Meulen
Hi, I'm running the program Pymol (written in python) on Windows Vista, and in trying to run one of its plugins, I em encountering the following error: Error: 3 WindowsError Exception in Tk callback Function: at 0x027C6DF0> (type: ) Args: () Traceback (innermost last): File "C:\Program File

Re: [Tutor] import sys; sys.exit()

2008-01-10 Thread Alan Gauld
"Andrew Volmensky" <[EMAIL PROTECTED]> wrote > I am going through the tutorial "Simple Sequences" here: http:// > www.freenetpages.co.uk/hp/alan.gauld/ Good choice ;-) > ...and get an error. I have tried saving as exit.py from the editor > and trying to run it How are you running it? You need t

[Tutor] import sys; sys.exit()

2008-01-10 Thread Andrew Volmensky
I am going through the tutorial "Simple Sequences" here: http:// www.freenetpages.co.uk/hp/alan.gauld/ ...and get an error. I have tried saving as exit.py from the editor and trying to run it and also entering the commands directly into the shell. My understanding is that this is supposed t

[Tutor] Opening a window to fit an image

2008-01-10 Thread James Newton
Hi Python Pros, I want to create a window to fit an image that I read in on the fly. I'm using pygame to load images and to create the window. I find I have to use pygame.display.set_mode() twice: once to allow me to use pygame.image.loadfile(), and once to reset the window size after I have been

Re: [Tutor] run in "deamon" mode?

2008-01-10 Thread Reed O'Brien
On Jan 10, 2008, at 12:41 AM, Allen Fowler wrote: > Hello, > > How can a make a python script run in "deamon mode"? (on a linux box) > > That is, I want to run the program via "python myfile.py" and have > it drop me back to the command line. The program should continue > running until I kill

Re: [Tutor] getting filen basename without extension

2008-01-10 Thread Timmie
> > What I found is this: > > import os > > myfile_name_with_path = 'path/to/my/testfile.txt' > > basename = os.path.basename(myfile_with_path) > > filename = os.path.splitext(basename) > > myfile_name_without_suffix = filename[0] > > The last two can be easily combined as: > > > myfile_name_with

Re: [Tutor] getting filen basename without extension

2008-01-10 Thread Alan Gauld
"Timmie" <[EMAIL PROTECTED]> wrote > What is the easiest and fastes way to get the basename > of a file wihout extension? > > What I found is this: > import os > myfile_name_with_path = 'path/to/my/testfile.txt' > basename = os.path.basename(myfile_with_path) > filename = os.path.splitext(basen

Re: [Tutor] getting filen basename without extension

2008-01-10 Thread Rolando Pereira
Timmie wrote: > Hello, > I would like to get the name of a file without it's extension/suffix. > > What is the easiest and fastes way to get the basename > of a file wihout extension? > > What I found is this: > import os > myfile_name_with_path = 'path/to/my/testfile.txt' > basename = os.path.ba

Re: [Tutor] how to run a timer in window using TKINTER

2008-01-10 Thread Alan Gauld
"brindly sujith" <[EMAIL PROTECTED]> wrote >i want to run a timer in a window > > plz guide me how to do this There is a timer facility in Tkinter for this. In your window constructor add a call to self.after() Add a callback function/lambda that closes the window. > send me the Tkinter code

[Tutor] getting filen basename without extension

2008-01-10 Thread Timmie
Hello, I would like to get the name of a file without it's extension/suffix. What is the easiest and fastes way to get the basename of a file wihout extension? What I found is this: import os myfile_name_with_path = 'path/to/my/testfile.txt' basename = os.path.basename(myfile_with_path) filename

[Tutor] how to run a timer in window using TKINTER

2008-01-10 Thread brindly sujith
i want to run a timer in a window plz guide me how to do this after some 5 seconds i want to close the same window automatically send me the Tkinter code for this ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] run in "deamon" mode?

2008-01-10 Thread Hiếu Hoàng
On Jan 10, 2008 12:41 PM, Allen Fowler <[EMAIL PROTECTED]> wrote: > > How can a make a python script run in "deamon mode"? (on a linux box) > The comments on this post sum up a lot of daemonizing modules. I haven't tried any of them out if th

Re: [Tutor] run in "deamon" mode?

2008-01-10 Thread Remco Gerlich
Hi, A few days ago, someone posted a "daemon.py" to Reddit, that's supposed to do everything needed. Haven't used it myself, but here it is: http://hathawaymix.org/Software/Sketches/daemon.py Remco On Jan 10, 2008 6:41 AM, Allen Fowler <[EMAIL PROTECTED]> wrote: > Hello, > > How can a make a py

Re: [Tutor] run in "deamon" mode?

2008-01-10 Thread Aditya Lal
On Jan 10, 2008 11:11 AM, Allen Fowler <[EMAIL PROTECTED]> wrote: > Hello, > > How can a make a python script run in "deamon mode"? (on a linux box) > > That is, I want to run the program via "python myfile.py" and have it drop > me back to the command line. The program should continue running un

Re: [Tutor] run in "deamon" mode?

2008-01-10 Thread Alan Gauld
"Allen Fowler" <[EMAIL PROTECTED]> wrote > How can a make a python script run in "deamon mode"? (on a linux > box) ISTR that there is a recipe for this on the ActiveState cookbook site? > That is, I want to run the program via "python myfile.py" > and have it drop me back to the command line.

Re: [Tutor] [tutor] Zoom in and zoom out capability

2008-01-10 Thread Alan Gauld
"Varsha Purohit" <[EMAIL PROTECTED]> wrote > Yeah i read about them. i tried using the resize function but i > was > having difficulty with clarity of the image. I remeber. That was because you were trying to zoom into a small JPG image. You can't put more detail into an image than is there