[Pythonmac-SIG] My first Python Program

John Parker parkjv1 at gmail.com
Sat Jan 22 23:02:30 CET 2011


Thanks to all for your help.

I was able to successfully run my first program all be it was very simple.

I have ordered a Python for Dummies book from Amazon but it hasn't arrived
yet.  I think that will help initially until I get familiar with this
environment.

Thank you all for your information and empowering me to run my program.

Happy Python Programming to All!!

Aloha,

John



On 1/22/11 11:47 AM, "Massimo Di Stefano" <massimodisasha at gmail.com> wrote:

> Hi John,
> 
> 
> to run a python (.py) file, from the shell type :
> 
> 
> python /path/to/your/file.py  (just drug'n'drop the file inside the terminal
> shell)
> 
> to know the directory where your shell is running type the command :
> 
>> pwd
> 
> it will show you the path.
> 
> to go inside the directory type :
> 
>> cd /path/to/the/directory
> 
> this [1] is a simple list of the bash commands in osx :
> 
> [1] http://ss64.com/osx/
> 
> and this [2] the standard python tutorial :
> 
> [2] http://docs.python.org/tutorial/
> 
> you can also try to buy a book about python that will help you to get started
> there are a large number of book dedicated to python programming.
> 
> 
> Il giorno 22/gen/2011, alle ore 15.56, John Parker ha scritto:
> 
>> Hello All,
>> 
>> I'm a complete novice to Python and I just created my first program for an
>> assignment in a Python class that I'm taking at the local community college.
>> 
>> The instructor didn't give us a book so, I'm trying to figure out one
>> important item.
>> 
>> How to run my program.  I know this is so basic for everyone but I just
>> started this class and this is my first exposure ever to this type of
>> environment.
>> 
>> I have an iMac, running python V2.6.1
>> 
>> My program is located in this directory:
>> 
>> File location: /Users/parkjv1/Birth_Month.py
>> 
>> When I open the terminal:
>> 
>> I'm presented with this info: cpe-66-75-97-27: ~parkjv1$
>> 
>> Is this my /users/parkjv1 directory?
>> 
>> When I type my file name Birth_Month.py I get an error indicating that
>> command not found.
>> 
>> So, where do I call my program so that it will run?
>> 
>> Thanks,
>> 
>> John
>> 
>> 
>> _______________________________________________
>> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
>> http://mail.python.org/mailman/listinfo/pythonmac-sig
>> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
>> 
>> 
>> 
>> On 1/21/11 8:40 AM, "Bill Janssen" <janssen at parc.com> wrote:
>> 
>>> Charles Hartman <cohar at conncoll.edu> wrote:
>>> 
>>>> it would seem to be short-sighted for anyone interested in Python on
>>>> the Mac not to support py2app as fully as possible.
>>> 
>>> You calling me short-sighted, Charles?
>>> 
>>> That's OK -- it's true, you know; I've been wearing thick glasses since
>>> I was a kid :-).  But I don't know that it has much to do with py2app.
>>> I think py2app is great, and I believe I even used it, once -- wanted to
>>> make a Preference Pane with Python, and couldn't figure out how to do it
>>> otherwise.
>>> 
>>> But in general I've not needed it -- I just use Xcode and the system
>>> Python, and there's no need to bundle another Python with that approach.
>>> I should probably figure out how to use py2app with that approach,
>>> though; it might be more bullet-proof.
>>> 
>>> Bill
>>> _______________________________________________
>>> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
>>> http://mail.python.org/mailman/listinfo/pythonmac-sig
>>> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
>> 
>> 
>> _______________________________________________
>> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
>> http://mail.python.org/mailman/listinfo/pythonmac-sig
>> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
> 




More information about the Pythonmac-SIG mailing list