[Tutor] run command

Eric Dorsey dorseye at gmail.com
Sat Sep 5 05:32:44 CEST 2009


Make sure you are in the same directory as your hello.py, then run the
interpreter/shell

Try this:
>>>import hello

then you can do things like:
>>>dir(hello)

and
>>>help(hello)

I'm not sure if that's what you were asking, but "import" is how you ..
import. HTH.




On Fri, Sep 4, 2009 at 5:31 PM, upasara wulung <
upasara.wulung.1980 at gmail.com> wrote:

> hello,
>
> Wish you would not mind a really beginner question. I am trying to use
> 'run' command, but didnot success yet. How I did it:
>
> (1) In a certain working folder, I produced simple python file, for an
> example, hello.py, which is free of error.
> (2) I called python from the same working folder using command 'python'
> (3) In the python shell, I executed: >>> run hello.py
>
> But I got only an error message: SyntaxError: invalid syntax.
>
> Please tell me a clue? I did those stuffs in Linux Debian.
>
> Thx a lot
>
> Upa.
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090904/907c7fe3/attachment.htm>


More information about the Tutor mailing list