Re: [Tutor] Notepad++ question

2012-06-14 Thread Alexander Quest
Thanks Walter; I believe I understand the reasoning behind it, though not all of the mechanics, but for now, your answer is more than sufficient. -Alex On Thu, Jun 14, 2012 at 4:10 PM, Walter Prins wrote: > Hi Alex, > > On 14 June 2012 23:18, Alexander Quest wrote: > > if __name__ == '__main__

Re: [Tutor] Notepad++ question

2012-06-14 Thread Alan Gauld
On 14/06/12 23:18, Alexander Quest wrote: so far, there is no variable called "_name_", and even if there was, why is it comparing it to "_main_"? Why can't the main function just Note that in both cases there are two '_' characters before and after the name. __name__ and '__main__'.

Re: [Tutor] Notepad++ question

2012-06-14 Thread Emile van Sebille
On 6/14/2012 3:18 PM Alexander Quest said... [Resending because I messed up on last email] My question was regarding a piece of boilerplate code: if __name__ == '__main__': main() __name__ within a python module is either '__main__' when invoked directly from a command line, or contains

Re: [Tutor] Notepad++ question

2012-06-14 Thread Walter Prins
Hi Alex, On 14 June 2012 23:18, Alexander Quest wrote: > if __name__ == '__main__': >   main() > > This calls the main function, but I don't understand what the 'if' statement > is doing here. In the simple programs that I've seen this so far, there is > no variable called "_name_", and even if t

Re: [Tutor] Notepad++ question

2012-06-14 Thread Dave Angel
On 06/14/2012 06:18 PM, Alexander Quest wrote: > [Resending because I messed up on last email] > > My question was regarding a piece of boilerplate code: > > if __name__ == '__main__': > main() > > This calls the main function, but I don't understand what the 'if' > statement is doing here. In

Re: [Tutor] Notepad++ question

2012-06-14 Thread Alexander Quest
[Resending because I messed up on last email] My question was regarding a piece of boilerplate code: if __name__ == '__main__': main() This calls the main function, but I don't understand what the 'if' statement is doing here. In the simple programs that I've seen this so far, there is no vari

Re: [Tutor] Notepad++ question

2012-06-14 Thread Alexander Quest
Got it Dave- sorry about not sending it to the newsgroup as well. My question was regarding a piece of boilerplate code: if __name__ == '__main__': main() This calls the main function, but I don't understand what the 'if' statement is doing here. In the simple programs that I've seen this so f

Re: [Tutor] Trouble running Python on Windows Vista

2012-06-14 Thread Alan Gauld
On 14/06/12 20:19, Tom Avos wrote: Yes, If I open the file from the IDLE and then I press "f5" it works, but I want to know why it does not work if I write the filename after the ">>>" prompt . That way is much more handy, I would like to make it work. Its not really the same but you can just

Re: [Tutor] Trouble running Python on Windows Vista

2012-06-14 Thread Tom Avos
Thanks!! De: Emile van Sebille Para: tutor@python.org Enviado: jueves, 14 de junio de 2012 16:35 Asunto: Re: [Tutor] Trouble running Python on Windows Vista On 6/14/2012 12:19 PM Tom Avos said... > Yes, If I open the file from the IDLE and then I press "f5"

Re: [Tutor] Trouble running Python on Windows Vista

2012-06-14 Thread Emile van Sebille
On 6/14/2012 12:19 PM Tom Avos said... Yes, If I open the file from the IDLE and then I press "f5" it works, but I want to know why it does not work if I write the filename after the ">>>" prompt . That way is much more handy, I would like to make it work. Once you've got the >>> prompt you're

Re: [Tutor] Trouble running Python on Windows Vista

2012-06-14 Thread Tom Avos
Yes, If I open the file from the IDLE and then I press "f5" it works, but I want to know why it does not work if I write the filename after the ">>>" prompt . That way is much more handy, I would like to make it work.   De: Kwpolska Para: Tom Avos Enviado:

Re: [Tutor] Trouble running Python on Windows Vista

2012-06-14 Thread Tom Avos
De: Tom Avos Para: "Flynn, Stephen (L & P - IT)" Enviado: jueves, 14 de junio de 2012 13:19 Asunto: Re: [Tutor] Trouble running Python on Windows Vista Great! You're right.. It works from the Command Line :-)   So, how should I call it inside the IDLE?? ...

Re: [Tutor] Trouble running Python on Windows Vista

2012-06-14 Thread Alan Gauld
On 14/06/12 16:30, Tom Avos wrote: It works fine when working in Interactive Mode or by Opening a .py file from the IDLE and then running it by pressing F5, but I can not run .py files by invoking them from the prompt (neither from IDLE nor Dos Command Line); It looks like you are trying to r

Re: [Tutor] Trouble running Python on Windows Vista

2012-06-14 Thread Kwpolska
On Thu, Jun 14, 2012 at 5:30 PM, Tom Avos wrote: > Hi there, > I'm learning Python. I have to work with a Notebook running Widows Vista > Home Premium.(have no other choice) > It works fine when working in Interactive Mode or by  Opening a .py file > from the IDLE and then running it by pressing F

[Tutor] Trouble running Python on Windows Vista

2012-06-14 Thread Tom Avos
Hi there, I'm learning Python. I have to work with a Notebook running Widows Vista Home Premium.(have no other choice) It works fine when working in Interactive Mode or by  Opening a .py file from the IDLE and then running it by pressing F5, but I can not run .py files by invoking them from the

Re: [Tutor] entering text on web site

2012-06-14 Thread Timo
Op 14-06-12 04:44, Benjamin Fishbein schreef: Thanks. I'm trying to automatically post text to a web page from Python and retrieve the resultant page. It's not just name and password, though; I need to do it over and over again with chunks of info from a list. The page seems to be using POST.

Re: [Tutor] entering text on web site

2012-06-14 Thread Alan Gauld
On 14/06/12 03:44, Benjamin Fishbein wrote: etc. I guess Python didn't come standard with a module that could do what I wanted... Which is the best module to get for this? Python does come with low level modules that you can use but its a lot of work. The suggested add ins are generally easie