Re: [Tutor] what's wrong with this ?

2015-04-21 Thread Alan Gauld
On 21/04/15 06:22, lei yang wrote: start_time = "2014-7-1" revlines = commands.getoutput("git log --pretty=format:'%ad:%an' --date=short --since='%s' --no-merges" %start_time).strip().split('\n') Traceback (most recent call last): File "", line 1, in ValueError: unsupported format character

Re: [Tutor] what's wrong with this ?

2015-04-21 Thread Danny Yoo
On Apr 21, 2015 12:27 AM, "lei yang" wrote: > > >>>start_time = "2014-7-1" > >>> revlines = commands.getoutput("git log --pretty=format:'%ad:%an' > --date=short --since='%s' --no-merges" %start_time).strip().split('\n') > Traceback (most recent call last): > File "", line 1, in > ValueError: un

[Tutor] what's wrong with this ?

2015-04-21 Thread lei yang
>>>start_time = "2014-7-1" >>> revlines = commands.getoutput("git log --pretty=format:'%ad:%an' --date=short --since='%s' --no-merges" %start_time).strip().split('\n') Traceback (most recent call last): File "", line 1, in ValueError: unsupported format character 'a' (0x61) at index 26 >>> if

Re: [Tutor] What's wrong with this?

2007-05-04 Thread Alan Gauld
"Jason Coggins" <[EMAIL PROTECTED]> wrote > I have the following function in a program: > > os.popen('filename.py') So what happened? Did you get an error message? If so what? > What I want to do is launch the program in the os.popen() function. Do you want to lasunch it or interact with it.

Re: [Tutor] What's wrong with this?

2007-05-04 Thread Andreas Kostyrka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andre Roberge wrote: > Perhaps the following might be helpful: > > http://groups.google.com/group/comp.lang.python/browse_thread/thread/f1b60f4739591d6b/4417f807848b4b5d?lnk=gst&q=launching&rnum=4#4417f807848b4b5d > > (if the link does not work, go

Re: [Tutor] What's wrong with this?

2007-05-03 Thread Andre Roberge
Perhaps the following might be helpful: http://groups.google.com/group/comp.lang.python/browse_thread/thread/f1b60f4739591d6b/4417f807848b4b5d?lnk=gst&q=launching&rnum=4#4417f807848b4b5d (if the link does not work, google for "launching python program cross-platform" or go to http://aspn.activest

[Tutor] What's wrong with this?

2007-05-03 Thread Jason Coggins
I have the following function in a program: os.popen('filename.py') What I want to do is launch the program in the os.popen() function. The file I am trying to launch is located in the same directory as the program the function is contained in. I also use Linux if that makes a difference. Ja

Re: [Tutor] What's wrong with this code?

2005-07-07 Thread Andre Engels
On 7/7/05, Nathan Pinno <[EMAIL PROTECTED]> wrote: > Hi all, > > I meant to ask why the main part after the password is not working right. > No one has answered that yet. When I run the code and try to load a file > that has been saved, a TypeError appears. How do I fix the code so no more > e

Re: [Tutor] Why is this error showing up? (Original Message: (Tutor) What's wrong with this code?) Ignore previous post.

2005-07-07 Thread Ewald Ertl
Hello! I just looked a little over the code, what it is perhaps ment to do now. As allready mentioned by Ziyad in your former post: just call "main_menu()" don't print main_menu() This calls the funciton main_men(), which prints it menu and after this the print-Command in this line

Re: [Tutor] What's wrong with this code?

2005-07-07 Thread Liam Clarke
And please, please, post the whole error message, as it specifies where the error occurred. Oh, yes, and I think I answered this - " I meant to ask why the main part after the password is not working right. No one has answered that yet. When I run the code and try to load a file that has been sa

Re: [Tutor] Why is this error showing up? (Original Message: (Tutor) What's wrong with this code?) Ignore previous post.

2005-07-07 Thread ZIYAD A. M. AL-BATLY
On Thu, 2005-07-07 at 00:54 -0600, Nathan Pinno wrote: > Hi all, > > Here's one of the messages that pops up: > > Traceback (most recent call last): > File "D:\password.py", line 77, in ? > filename == raw_input("Filename to load: ") > NameError: name 'filename' is not defined > > Why i

Re: [Tutor] What's wrong with this code?

2005-07-07 Thread Danny Yoo
Hi Nathan, Other folks are pointing out why you're getting certain error messages. You may also want to consider breaking up the long second-half of the program into into its own set of functions. I believe that the second half could look something like this: ## while menu_choice != 9:

Re: [Tutor] Why is this error showing up? (Original Message: (Tutor) What's wrong with this code?) Ignore previous post.

2005-07-07 Thread Nathan Pinno
error showing up? (Original Message: (Tutor) What's wrong with this code?) Ignore previous post. > Hi! > > > on Thu, 7 Jul 2005 01:13:48 -0600 "Nathan Pinno" <[EMAIL PROTECTED]> wrote : > --

Re: [Tutor] Why is this error showing up? (Original Message: (Tutor) What's wrong with this code?) Ignore previous post.

2005-07-07 Thread Ewald Ertl
Nathan Pinno Nathan Pinno > - Original Message - Nathan Pinno > From: "Wolfram Kraus" <[EMAIL PROTECTED]> Nathan Pinno > To: Nathan Pinno > Sent: Thursday, July 07, 2005 1:02 AM Nathan Pinno > Subject: Re: [Tutor] Why is this error showing up? (Or

Re: [Tutor] Why is this error showing up? (Original Message: (Tutor) What's wrong with this code?) Ignore previous post.

2005-07-07 Thread Nathan Pinno
o fix it? Thanks, Nathan Pinno - Original Message - From: "Wolfram Kraus" <[EMAIL PROTECTED]> To: Sent: Thursday, July 07, 2005 1:02 AM Subject: Re: [Tutor] Why is this error showing up? (Original Message: (Tutor) What's wrong with this code?) Ignore previous post.

Re: [Tutor] Why is this error showing up? (Original Message: (Tutor) What's wrong with this code?) Ignore previous post.

2005-07-07 Thread Wolfram Kraus
You wrote filename == raw_input("Filename to load: ") instead of filename = raw_input("Filename to load: ") HTH, Wolfram Nathan Pinno wrote: > Hi all, > > Here's one of the messages that pops up: > > Traceback (most recent call last): > File "D:\password.py", line 77, in ? > filename ==

[Tutor] Why is this error showing up? (Original Message: (Tutor) What's wrong with this code?) Ignore previous post.

2005-07-06 Thread Nathan Pinno
Hi all,   Here's one of the messages that pops up:   Traceback (most recent call last):  File "D:\password.py", line 77, in ?    filename == raw_input("Filename to load: ")NameError: name 'filename' is not defined   Why is it popping up whenever I try to load a file?   Here's the latest code:

Re: [Tutor] What's wrong with this code?

2005-07-06 Thread Nathan Pinno
hoose an option: ") elif menu_choice == 6: filename == raw_input("Filename to load: ") load_login(list,filename) menu_choice = input("Choose an option: ") print "Have a nice day!" Thanks for the input so far, Nathan Pinno

Re: [Tutor] What's wrong with this code?

2005-07-05 Thread Brian van den Broek
Andre Engels said unto the world upon 05/07/2005 02:44: >>From the program:: > > answer = raw_input("What is the password? ") > while password != answer: > print "The password is incorrect." > I think you intended to make it so that > the program kept asking for passwords until the right on

Re: [Tutor] What's wrong with this code?

2005-07-04 Thread Andre Engels
>From the program:: answer = raw_input("What is the password? ") while password != answer: print "The password is incorrect." If the user submits a wrong password, the while-loop will be entered. The program prints "The password is incorrect." then tests whether the password is still not equa

Re: [Tutor] What's wrong with this code?

2005-07-04 Thread Liam Clarke
Also - menu_choice = input("Choose an option: ") input() is always bad. Use int(raw_input(""Choose an option: ")) instead. input() evaluates your input as a Python _expression_ - I could select 9 by entering 5+4 or, I could enter sys.exit() and drop to DOS (or whatever it's running on.) or f

Re: [Tutor] What's wrong with this code?

2005-07-04 Thread Liam Clarke
What error messages are you getting? Please post the full message.On 7/5/05, Nathan Pinno <[EMAIL PROTECTED] > wrote: What's wrong with this code? I'm using 2.2.3 if this helps.   #This is for a password protected program to store passwords. password = "hello"print "The Password Prog

[Tutor] What's wrong with this code?

2005-07-04 Thread Nathan Pinno
What's wrong with this code? I'm using 2.2.3 if this helps.   #This is for a password protected program to store passwords. password = "hello"print "The Password Program"print "Copywrite 2005. All Rights Reserved."printanswer = raw_input("What is the password? ")while password !=