Re: [Tutor] Writing Scripts.

2010-10-24 Thread John
Autumn, Here's a basic script, if you save this in a file called hello.py and type 'python hello.py' at the prompt, or as others are saying using the python launcher, you should get some output. hth, john SCRIPT (include lines below here): #!/usr/bin/env python import os user = os.environ.get(

Re: [Tutor] Writing Scripts.

2010-10-23 Thread Jack Uretsky
Hi- Python is case sensitive. If you type "IDLE" (without the quotes) in a terminal window (not Idle) you should, after a few seconds, get a separate screen on which to type. Regards, Jack "Trust me. I have a lot of exp

Re: [Tutor] Writing Scripts.

2010-10-20 Thread Connor Neblett
Alternately, I believe that MacPython comes packaged with an application called "Python Launher". If you right click a python file (.py) once this is app is installed, you can select "Open With -> Python Launcher" This method is more for people that are uncomfortable with the command line (Termi

Re: [Tutor] Writing Scripts.

2010-10-20 Thread Alan Gauld
"Autumn Cutter" wrote I just started learning Python last night and I'm a little stuck on how to write a Python script. I'm using Python 2.5.0 on a Mac OS X 10.6.4. To create the program you use any standard text editor - although one that supports programming will be better. So you can us

Re: [Tutor] Writing Scripts.

2010-10-20 Thread शंतनू
Save the file. e.g. my_test_prog.py. Open 'terminal'. Run following command 'python my_test_prog.py' On my 10.6.4 version of Mac OSX, I get following version of python. === $ /usr/bin/python Python 2.6.1 (r261:67515, Dec 17 2009, 00:59:15) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin === On 2

[Tutor] Writing Scripts.

2010-10-20 Thread Autumn Cutter
I just started learning Python last night and I'm a little stuck on how to write a Python script. I'm using Python 2.5.0 on a Mac OS X 10.6.4. I've tried using programs like Idle, Applescript and Textmate but I'm still unable to write a script and run it successfully. I'm wondering if I'm using

Re: [Tutor] Writing scripts and apps for Internet consumption

2010-08-01 Thread Timo
On 01-08-10 00:40, Eric Hamiter wrote: On Sat, Jul 31, 2010 at 4:48 PM, bob gailer > wrote: Please post that code, and the URL you use to invoke it. test.py: this works on my laptop but not on the server http://pastebin.com/ChjUzLRU Just a wild guess, but maybe

Re: [Tutor] Writing scripts and apps for Internet consumption

2010-07-31 Thread bob gailer
On 7/31/2010 11:03 PM, Eric Hamiter wrote: On Sat, Jul 31, 2010 at 9:53 PM, bob gailer > wrote: Main difference I see is lack of any html tags in test.py! Try adding 1. print "" 2. print "Publix Aide" 3. print ""

Re: [Tutor] Writing scripts and apps for Internet consumption

2010-07-31 Thread Eric Hamiter
On Sat, Jul 31, 2010 at 9:53 PM, bob gailer wrote: > > Main difference I see is lack of any html tags in test.py! Try adding > >1. print "" > 2. print "Publix Aide" > 3. print "" > 4. # the store map print statements go here > 5. print "" > > I understand t

Re: [Tutor] Writing scripts and apps for Internet consumption

2010-07-31 Thread bob gailer
On 7/31/2010 6:40 PM, Eric Hamiter wrote: On Sat, Jul 31, 2010 at 4:48 PM, bob gailer > wrote: Please post that code, and the URL you use to invoke it. test.py: this works on my laptop but not on the server http://pastebin.com/ChjUzLRU test-working.py: this wor

Re: [Tutor] Writing scripts and apps for Internet consumption

2010-07-31 Thread Dave Angel
Eric Hamiter wrote: On Sat, Jul 31, 2010 at 4:48 PM, bob gailer wrote: Please post that code, and the URL you use to invoke it. test.py: this works on my laptop but not on the server http://pastebin.com/ChjUzLRU test-working.py: this works on both laptop & server http://pastebin

Re: [Tutor] Writing scripts and apps for Internet consumption

2010-07-31 Thread Alan Gauld
"Eric Hamiter" wrote the most rudimentary level of the basics. What I keep reading is how Python is most powerful on server side applications, in the cloud, so to speak. The portability of Python is also widely evangelized. I'm not sure I'd agree with that assertion. Python is a geeral pur

Re: [Tutor] Writing scripts and apps for Internet consumption

2010-07-31 Thread Eric Hamiter
On Sat, Jul 31, 2010 at 4:48 PM, bob gailer wrote: > > Please post that code, and the URL you use to invoke it. > test.py: this works on my laptop but not on the server http://pastebin.com/ChjUzLRU test-working.py: this works on both laptop & server http://pastebin.com/iLNTrGdW both availab

Re: [Tutor] Writing scripts and apps for Internet consumption

2010-07-31 Thread bob gailer
On 7/31/2010 2:45 PM, Eric Hamiter wrote: Get a linux hosting account, and a web address, most linux hosting comes with python, so practice in the 'cloud'. I have that-- an account with Dreamhost. This hasn't solved my problems yet though. Like I said, I can have it write a simple H

Re: [Tutor] Writing scripts and apps for Internet consumption

2010-07-31 Thread David Hutto
On Sat, Jul 31, 2010 at 2:56 PM, David Hutto wrote: > On Sat, Jul 31, 2010 at 2:45 PM, Eric Hamiter wrote: >>> Get a linux hosting account, and a web address, most linux hosting >>> comes with python, so practice in the 'cloud'. >> >> I have that-- an account with Dreamhost. This hasn't solved my

Re: [Tutor] Writing scripts and apps for Internet consumption

2010-07-31 Thread David Hutto
On Sat, Jul 31, 2010 at 2:45 PM, Eric Hamiter wrote: >> Get a linux hosting account, and a web address, most linux hosting >> comes with python, so practice in the 'cloud'. > > I have that-- an account with Dreamhost. This hasn't solved my problems yet > though. Like I said, I can have it write a

Re: [Tutor] Writing scripts and apps for Internet consumption

2010-07-31 Thread Eric Hamiter
> > Get a linux hosting account, and a web address, most linux hosting > comes with python, so practice in the 'cloud'. > I have that-- an account with Dreamhost. This hasn't solved my problems yet though. Like I said, I can have it write a simple Hello, World! ...but if I make it do anything mo

Re: [Tutor] Writing scripts and apps for Internet consumption

2010-07-31 Thread David Hutto
On Sat, Jul 31, 2010 at 2:34 PM, David Hutto wrote: > On Sat, Jul 31, 2010 at 2:27 PM, Eric Hamiter wrote: >> Not sure if this is the right place for this, since this is a tutor list, >> but I think it is because it involves learning Python and the application of >> knowledge. >> >> I've just sta

Re: [Tutor] Writing scripts and apps for Internet consumption

2010-07-31 Thread David Hutto
On Sat, Jul 31, 2010 at 2:27 PM, Eric Hamiter wrote: > Not sure if this is the right place for this, since this is a tutor list, > but I think it is because it involves learning Python and the application of > knowledge. > > I've just started learning it as my initial programming language as of tw

[Tutor] Writing scripts and apps for Internet consumption

2010-07-31 Thread Eric Hamiter
Not sure if this is the right place for this, since this is a tutor list, but I think it is because it involves learning Python and the application of knowledge. I've just started learning it as my initial programming language as of two months ago. I like to think I'm making steady progress, and I