Re: [Tutor] Running python from windows command prompt

2013-04-11 Thread Arijit Ukil
certainty. IT Services Business Solutions Outsourcing From: Alan Gauld alan.ga...@btinternet.com To: tutor@python.org Date: 04/10/2013 10:58 PM Subject: Re: [Tutor] Running python from windows command

Re: [Tutor] Running python from windows command prompt

2013-04-11 Thread Asokan Pichai
On Thu, Apr 11, 2013 at 11:38 AM, Arijit Ukil arijit.u...@tcs.com wrote: Thanks for the help. Now I have modifed the code as: import sys def main(argv): data = int(sys.argv[1]) avg = average (data) print Average:, avg def average(num_list): return

Re: [Tutor] Running python from windows command prompt

2013-04-11 Thread Alan Gauld
On 11/04/13 07:08, Arijit Ukil wrote: Thanks for the help. Now I have modifed the code as: import sys def main(argv): data = int(sys.argv[1]) avg = average (data) print Average:, avg def average(num_list): return sum(num_list)/len(num_list) if __name__ == __main__:

Re: [Tutor] Running python from windows command prompt

2013-04-11 Thread Prasad, Ramit
On 11/04/13 07:08, Arijit Ukil wrote: Thanks for the help. Now I have modifed the code as: import sys def main(argv): data = int(sys.argv[1]) avg = average (data) print Average:, avg def average(num_list): return sum(num_list)/len(num_list) Note that in Python

[Tutor] running python from windows command prompt

2013-04-10 Thread Arijit Ukil
I like to run a python program my_python.py from windows command prompt. This program ( a function called testing) takes input as block data (say data = [1,2,3,4] and outputs processed single data. import math def avrg(data): return sum(data)/len(data) def testing (data): val =

Re: [Tutor] running python from windows command prompt

2013-04-10 Thread Dave Angel
(Please don't hijack a thread with an unrelated question. You're no doing yourself any favors, as any decent thread-viewer will hide your new subject line, and group the whole thread with its original title. That can cause your query to be ignored by many of the readers.) To start a new

[Tutor] Running python from windows command prompt

2013-04-10 Thread Arijit Ukil
I like to run a python program my_python.py from windows command prompt. This program ( a function called testing) takes input as block data (say data = [1,2,3,4] and outputs processed single data. import math def avrg(data): return sum(data)/len(data) def testing (data): val =

Re: [Tutor] Running python from windows command prompt

2013-04-10 Thread Amit Saha
On Wed, Apr 10, 2013 at 10:32 PM, Arijit Ukil arijit.u...@tcs.com wrote: I like to run a python program my_python.py from windows command prompt. This program ( a function called testing) takes input as block data (say data = [1,2,3,4] and outputs processed single data. import math def

Re: [Tutor] Running python from windows command prompt

2013-04-10 Thread Amit Saha
On Wed, Apr 10, 2013 at 10:32 PM, Arijit Ukil arijit.u...@tcs.com wrote: I like to run a python program my_python.py from windows command prompt. This program ( a function called testing) takes input as block data (say data = [1,2,3,4] and outputs processed single data. import math def

Re: [Tutor] Running python from windows command prompt

2013-04-10 Thread Dave Angel
On 04/10/2013 08:32 AM, Arijit Ukil wrote: I like to run a python program my_python.py from windows command prompt. This program ( a function called testing) takes input as block data (say data = [1,2,3,4] and outputs processed single data. import math def avrg(data): return

Re: [Tutor] Running python from windows command prompt

2013-04-10 Thread eryksun
On Wed, Apr 10, 2013 at 8:32 AM, Arijit Ukil arijit.u...@tcs.com wrote: python my_python.py 1 3 2 Adding Python's installation directory to PATH is for starting the interpreter with specific options (-O, -vv, etc), running a module on Python's sys.path (-m), running a command (-c), or starting

Re: [Tutor] Running python from windows command prompt

2013-04-10 Thread Alan Gauld
On 10/04/13 13:32, Arijit Ukil wrote: I like to run a python program my_python.py from windows command prompt. This program ( a function called testing) takes input as block data (say data = [1,2,3,4] and outputs processed single data. Hopefully the code below is not your entire program. If

[Tutor] Running python on windows

2011-04-11 Thread Mike Silverson
Hi, I need to know if there is any way to run a python file without Python installed on the target computer. I am trying to send a program to a friend using windows and he does not have python installed, and does not want to take the time to install it. Is there any way to send him the file (or

Re: [Tutor] Running python on windows

2011-04-11 Thread Nicholas Holley
On Mon, 11 Apr 2011 21:01:37 +0800 Mike Silverson msilvers...@gmail.com wrote: Hi, I need to know if there is any way to run a python file without Python installed on the target computer. I am trying to send a program to a friend using windows and he does not have python installed, and does

Re: [Tutor] Running python on windows

2011-04-11 Thread James Reynolds
I use http://cx-freeze.sourceforge.net/ personally. I found py2exe to be a headache compared to cx. On Mon, Apr 11, 2011 at 9:01 AM, Mike Silverson msilvers...@gmail.comwrote: Hi, I need to know if there is any way to run a python file without Python installed on the target computer. I am

Re: [Tutor] Running python on windows

2011-04-11 Thread Alan Gauld
Mike Silverson msilvers...@gmail.com wrote installed on the target computer. I am trying to send a program to a friend using windows and he does not have python installed, and does not want to take the time to install it. Given how quickly Python installs compared to many other apps I can

Re: [Tutor] Running python on windows

2011-04-11 Thread James Reynolds
At least in my case it was about simplicity. If it was a simple matter of using a base python program, that would be one thing, but the last program i distributed here at work used pygtk as it's GUI (which at the time required four different packages, I believe they have consolidated this down to

Re: [Tutor] Running python on windows

2011-04-11 Thread ALAN GAULD
At least in my case it was about simplicity. If it was a simple matter of using a base python program, that would be one thing, but the last program i distributed here at work used pygtk as it's GUI Valid comment although its not much more work to build a custom installer that

Re: [Tutor] Running python on windows

2011-04-11 Thread Wayne Werner
On Mon, Apr 11, 2011 at 4:24 PM, ALAN GAULD alan.ga...@btinternet.comwrote: It doesn't make sense to say, go here, install this, ok, now drop this in this folder, ok now drop this in that folder, ok now open your command prompt and type this string Agreed, we need to package our apps so