Newbie questions on import & cmd line run

Chris Rebert clp2 at rebertia.com
Thu May 17 00:29:59 EDT 2012


On Wed, May 16, 2012 at 6:45 PM, gwhite <gwhite at ti.com> wrote:
> Hi,
>
> I am a newbie running the latest pythonxy (2.7.2.1) & spyder and
> python 2.7.2.   I suspect my questions are mostly basic to python, and
> not specific to Spyder or iPython.
>
> Note: Up until now, I mainly used MATLAB, and thus need to de-program
> myself appropriately.
>
> I use Win7-64.
>
> I wrote the following .py file:
>
> -----------------
> #! <what is supposed to go here?>

That's a shebang line. See http://en.wikipedia.org/wiki/Shebang_(Unix)
It's doesn't matter at all since you're on Windows. On Unix-like
systems, one typically writes:
    #!/usr/bin/env python

> # Filename: newbie00.py
>
> if __name__ == '__main__':

Cheers,
Chris



More information about the Python-list mailing list