[Tutor] Fwd: Sending Email - Outlook 2003 / Overcome Security Warning!

2009-05-09 Thread Alex Feddor
Hi I would like to send email inside my Python code. On PC I have installed Outlook 2003. On the web I found code bellow which is working however I need every time manual clicked outlook security warning - alerting that outside process would like to send email. Please advise how the security warni

Re: [Tutor] Triggering code on 1 minute intervale ..

2009-05-09 Thread Dayo Adewunmi
Alex Feddor wrote: .. What will be the best solution to trigger python code every minute as soon as PC in on. Cheers, Alex ___ Tutor maillist - Tutor@python.org http://mai

Re: [Tutor] Different Command Result Executing in Shell vs. Program

2009-05-09 Thread Dave Angel
robert mcquirt wrote: Hi. I've not been working with Python very long and have run into a puzzling thing. I'm working on a program that needs to identify the filetype of files without extensions. Using the file command in the shell works fantastic, as in: rob...@ubuntu:~$ file -b linu

Re: [Tutor] Triggering code on 1 minute intervale ..

2009-05-09 Thread W W
On Sat, May 9, 2009 at 3:26 PM, Alex Feddor wrote: > .. What will be the best solution to trigger python code every minute as > soon as PC in on. > an autorun script... and in your script use the time.sleep(60) I believe. HTH, Wayne ___ Tutor maillist

[Tutor] Triggering code on 1 minute intervale ..

2009-05-09 Thread Alex Feddor
.. What will be the best solution to trigger python code every minute as soon as PC in on. Cheers, Alex ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Different Command Result Executing in Shell vs. Program

2009-05-09 Thread Alan Gauld
"robert mcquirt" wrote import os os.system('file -b /home/robert/linuxlogotag') This also works fine. The problem is that when I try to replace the hard coded path/name with a string variable for looping, the results are not the same as the shell's. import os, glob path = '/home/robert

Re: [Tutor] paramiko again

2009-05-09 Thread Matt Herzog
On Sun, May 10, 2009 at 12:53:49AM +0100, Alan Gauld wrote: > Have you used normal ftp in its command line version? > The put command specifies the location on the remote machine > where you want to store the files. This is normal ftp behaviour. The server supports only sftp. Yeah, I could turn o

Re: [Tutor] Parsing Question

2009-05-09 Thread Alan Gauld
"Michael Morrissey" wrote a text file that looks like this: 1 the 126 name 2 of 127 very Each has 2 numbers and 2 words on it. Each number is related to the word that comes after it. So "1" and "the" are connected (kinda like a dictionary), and "126" and "name" are related. Using the above t

Re: [Tutor] Parsing Question

2009-05-09 Thread Emile van Sebille
On 5/9/2009 4:23 PM Michael Morrissey said... Forgive me if I'm asking something stupid, but I'm not sure how to do this (there are so many options in Python, I'm overwhelmed and confused). Look into the split method of string objects (which are what you should be reading from the file), the

Re: [Tutor] paramiko again

2009-05-09 Thread Alan Gauld
"Matt Herzog" wrote This code comes straight from the http://oreilly.com/catalog/9780596515829/ book. The only actual code I changed was s/get/put on the second to last line. The author says I ought to be able to do this and have it Just Work. There are several things I don't understand.

[Tutor] Different Command Result Executing in Shell vs. Program

2009-05-09 Thread robert mcquirt
Hi. I've not been working with Python very long and have run into a puzzling thing. I'm working on a program that needs to identify the filetype of files without extensions. Using the file command in the shell works fantastic, as in: rob...@ubuntu:~$ file

[Tutor] Parsing Question

2009-05-09 Thread Michael Morrissey
Forgive me if I'm asking something stupid, but I'm not sure how to do this (there are so many options in Python, I'm overwhelmed and confused). I have a text file that looks like this: 1 the 126 name 2 of 127 very 3 to 128 through 4 and 129 just 5 a 130 form 6 in 131 much 7 is 132 great etc... Eac

Re: [Tutor] paramiko again

2009-05-09 Thread David
Matt Herzog wrote: Hello again. This code comes straight from the http://oreilly.com/catalog/9780596515829/ book. The only actual code I changed was s/get/put on the second to last line. The author says I ought to be able to do this and have it Just Work. There are several things I don't und

[Tutor] paramiko again

2009-05-09 Thread Matt Herzog
Hello again. This code comes straight from the http://oreilly.com/catalog/9780596515829/ book. The only actual code I changed was s/get/put on the second to last line. The author says I ought to be able to do this and have it Just Work. There are several things I don't understand. Would be nic

Re: [Tutor] Code Dosent work.

2009-05-09 Thread David
Jacob Mansfield wrote: not sure why i was using pygame, anyway the problem is with the saveing, press exit, the program will save to databox.txt, then start the program again giveing it the filename that it saved to, then look at the records. Post the code you have now and I am sure someone ca

Re: [Tutor] Pythonic way to normalize vertical whitespace

2009-05-09 Thread spir
Le Fri, 08 May 2009 13:03:47 -0400, pyt...@bdurham.com s'exprima ainsi: [...] > Approaches: > 1. split text to list of lines that get stripped then: > a. walk this list building a new list of lines that track and > ignore extra blank lines > -OR- > b. re-join lines and replace '\n\n\n' wth' \n\n'

Re: [Tutor] Optparse question: if only certain values are acceptable

2009-05-09 Thread Kent Johnson
On Fri, May 8, 2009 at 9:09 PM, Terry Carroll wrote: > It's exactly what I was looking for.  Thanks very much. > > Now I'm going to have to re-read the docs and see why I couldn't pick that > up from them. You have to read pretty far down, to the sections on Option attributes and Standard Optio

Re: [Tutor] Optparse question: if only certain values are acceptable

2009-05-09 Thread Alan Gauld
"Terry Carroll" wrote The toy summary is that I want to have the following command format: prognam -f FORMAT Where FORMAT, if specified, must be one of "X", "Y", or "Z". In otherwords, if the user enters: progname -f X It runs, producing its output in format X. Similar if "Y" or "Z" is