Re: [python-win32] Interactive Code to Script File

2014-09-17 Thread Tim Roberts
Abhay Anant Jahagirdar wrote: You are doing it right but, for the URL string use (double quotes). you should be fine https://docs.python.org/2.0/ref/strings.html You do understand that there is absolutely no difference between a single-quoted string and a double-quoted string in Python,

[python-win32] Interactive Code to Script File

2014-09-16 Thread DJ Webre
I am trying to convert a program from interactive to script file. The program consists of the following 2 lines: import webbrowser webbrowser.open_new('http://www.google') When I run it interactively, it works but if I run it as a scrip file, it produces an error unless I import webbrowser

Re: [python-win32] Interactive Code to Script File

2014-09-16 Thread Bob Hood
Hi, DJ. On 9/16/2014 1:13 PM, DJ Webre wrote: I am trying to convert a program from interactive to script file. The program consists of the following 2 lines: import webbrowser webbrowser.open_new('http://www.google') When I run it interactively, it works but if I run it as a scrip

Re: [python-win32] Interactive Code to Script File

2014-09-16 Thread Vernon D. Cole
Dear D.J.: First, let me mention that you violated several of the unwritten rules of asking for help. For example, the code you typed into for email is not the same as the code in the picture you sent as an attachment (using a proprietary format). Code samples should be cut-and-paste, not

Re: [python-win32] Interactive Code to Script File

2014-09-16 Thread Abhay Anant Jahagirdar
Hi, You are doing it right but, for the URL string use (double quotes). you should be fine https://docs.python.org/2.0/ref/strings.html import webbrowser webbrowser.open_new(https://www.google.org/;) Thanks, Abhay On Tue, Sep 16, 2014 at 12:13 PM, DJ Webre d_we...@yahoo.com.dmarc.invalid

Re: [python-win32] Interactive Code to Script File

2014-09-16 Thread Zachary Ware
On Tue, Sep 16, 2014 at 2:13 PM, DJ Webre d_we...@yahoo.com.dmarc.invalid wrote: I am trying to convert a program from interactive to script file. The program consists of the following 2 lines: import webbrowser webbrowser.open_new('http://www.google') When I run it interactively, it works

Re: [python-win32] Interactive Code to Script File

2014-09-16 Thread Nathan McCorkle
On Sep 16, 2014 5:27 PM, Zachary Ware zachary.ware+py...@gmail.com wrote: By the way, it's usually best to just copy and paste your code and error messages as text in the body of the email rather than attaching an image, and embedding the image in a Word document just makes it harder to see

Re: [python-win32] Interactive Code to Script File

2014-09-16 Thread Zachary Ware
Responding on-list: On Tue, Sep 16, 2014 at 9:30 PM, DJ Webre d_we...@yahoo.com wrote off-list: That was it. Thanks all for the assistance. I will also incorporate the suggestions in future request for help. Thanks again. Glad I could be of help :). Regards, -- Zach