Re: [Tutor] Recieving emails in python

2008-01-13 Thread Michael Langford
imap: http://docs.python.org/lib/module-imaplib.html pop: http://docs.python.org/lib/module-poplib.html or mbox: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/157437 Milters also look like they might be apropos: http://www.bmsi.com/python/milter.html --Michael On 1/14/08, [EMAIL P

Re: [Tutor] Daemonizing Scripts

2008-01-13 Thread Michael Langford
I've had this work before: http://support.microsoft.com/kb/251192 Cygwin also has a service maker, but I'm unaware of the details of using it. --Michael On 1/14/08, Lawrence Barrott <[EMAIL PROTECTED]> wrote: > > >>Hello, > >> > >>How can a make a python script run in "deamon mode"? (on a

Re: [Tutor] Recieving emails in python

2008-01-13 Thread mobiledreamers
ok i dont want to write an mta i want to use another mta to recieve emails on say - [EMAIL PROTECTED] so can i start reading the emails to python from that mta How to set this up to read messages from the mta sending out email we are using sendmail so we ll continue using that for now thanks It

Re: [Tutor] Daemonizing Scripts

2008-01-13 Thread Lawrence Barrott
>>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 it via it's PID, the machine shuts >>down, or the p

Re: [Tutor] Recieving emails in python

2008-01-13 Thread Michael Langford
It depends. If you're trying to write a MTA, think about looking at and stealing parts of mailmain and smtpd.py Mailman: http://www.gnu.org/software/mailman/index.html Smtpd:http://barry.warsaw.us/software/Code/smtpd.py If you're going to use someone else as a MTA then just use IMAP or POP to ge

[Tutor] Recieving emails in python

2008-01-13 Thread mobiledreamers
I m trying to create something simple a mailing list similar to yahoo groups I m stumbling at the part where the python recieves messages via say [EMAIL PROTECTED] how to make python recieve emails and process it after that it is straight forward processing in python inserting in db etc __

Re: [Tutor] new guy problem, what's wrong with this program.

2008-01-13 Thread Michael Langford
I suggest using pychecker. It helps if you have spelling issues like I do: pychecker.sourceforge.net/ Its sorta like lint for python. --Michael On 1/13/08, John Fouhy <[EMAIL PROTECTED]> wrote: > On 14/01/2008, bill.wu <[EMAIL PROTECTED]> wrote: > > mumber = 23 > > running = Ture > [...

Re: [Tutor] new guy problem, what's wrong with this program.

2008-01-13 Thread John Fouhy
On 14/01/2008, bill.wu <[EMAIL PROTECTED]> wrote: > mumber = 23 > running = Ture [...] > when i run it, interactive window show: > > Traceback (most recent call last): [...] > NameError: name 'Ture' is not defined Hi Bill, The error message means that python doesn't know what "Ture" is. In this

Re: [Tutor] new guy problem, what's wrong with this program.

2008-01-13 Thread Eric Abrahamsen
mumber = 23 running = Ture Both these lines have spelling errors: 'mumber' should be 'number', and 'Ture' should be 'True'. You can see where the problem is coming from by the end of your traceback: NameError: name 'Ture' is not defined A NameError with something being 'not defined'

[Tutor] new guy problem, what's wrong with this program.

2008-01-13 Thread bill.wu
mumber = 23 running = Ture while running: guess = int(raw_input('Enter an integer :')) if guess == number: print 'congratulations, you guessed it.' running = False elif guess < number: print 'no, it is a little higher than that' else: print 'no

Re: [Tutor] Pyhon Mac/Pc

2008-01-13 Thread Ricardo Aráoz
Kent Johnson wrote: > Hendrik Verlinden wrote: >> Yes I'm using the files from this link >> http://relro.net/racer/dofexport.html :) >> >> Do you now what the problem is with these files on a mac? >> Otherwise how do I have to change the carriage return or

Re: [Tutor] Why Won't My Pizza Fall?

2008-01-13 Thread Ricardo Aráoz
Alan Gauld wrote: > However, I do agree that an init method is probably the wrong > place to have a dx/dy pair since we should, I would ex[pect, > be positioning the object initially before trying to move it. > Thus I'd expect a move metjod someplasce that took the > dx and dy. Something like: >

Re: [Tutor] Pyhon Mac/Pc

2008-01-13 Thread Kent Johnson
Hendrik Verlinden wrote: > Yes I'm using the files from this link > http://relro.net/racer/dofexport.html :) > > Do you now what the problem is with these files on a mac? > Otherwise how do I have to change the carriage return or line feed? Looking at the

Re: [Tutor] New 2 Python- Script 'kill' function/Ubuntu File Browser hide hidden files

2008-01-13 Thread Ian Egland
Thanks, you helped more than you know. -Ian On Jan 13, 2008 3:58 PM, bob gailer <[EMAIL PROTECTED]> wrote: > Ian Egland wrote: > > Hello, I am new to Python (and OO programming in general) and I have a > > script that I made through a tutorial. > > > > # -*- coding: utf-8 -*- > > # Copyright (C)

Re: [Tutor] New 2 Python- Script 'kill' function/Ubuntu File Browser hide hidden files

2008-01-13 Thread bob gailer
Ian Egland wrote: > Hello, I am new to Python (and OO programming in general) and I have a > script that I made through a tutorial. > > # -*- coding: utf-8 -*- > # Copyright (C) 2007-2008 Ian Egland > # From the Non-Programmer's Guide to Python By Josh Cogliati > # 5.3 Exercise 1 > # Modify the pa

[Tutor] New 2 Python- Script 'kill' function/Ubuntu File Browser hide hidden files

2008-01-13 Thread Ian Egland
Hello, I am new to Python (and OO programming in general) and I have a script that I made through a tutorial. # -*- coding: utf-8 -*- # Copyright (C) 2007-2008 Ian Egland # From the Non-Programmer's Guide to Python By Josh Cogliati # 5.3 Exercise 1 # Modify the password guessing program to keep tr

Re: [Tutor] Pyhon Mac/Pc

2008-01-13 Thread Kent Johnson
Hendrik Verlinden wrote: > Is the programming language for windows and mac the same? The language is the same. There are some differences between the platforms. Well-written Python programs can be portable across platforms. One difference between platforms is the default line ending. Windows us

[Tutor] Pyhon Mac/Pc

2008-01-13 Thread Hendrik Verlinden
Is the programming language for windows and mac the same? I use a python script in Blender (3d program) to export it as a DOF-format. I get a dof-file but I can't do anything with it. When I use a dof-file from windows (made the same way) it works. Perhaps I have to change some characters in th

[Tutor] PIL: preserving exif data

2008-01-13 Thread Eric Abrahamsen
Can any PIL people out there tell me if it's possible to save a jpeg image with exif data? I'm opening an image file, making changes to it, and then resaving it: apparently calling save() chops off its exif data, and there doesn't appear to be a way to re-attach it via a parameter to the sa