problem at installing phyton on windows

Discussion in 'Python' started by gslm, Mar 25, 2007.

  1. gslm

    gslm Guest

    Hi!
    I'm too new on phyton.I have installed phyton.But when I write phyton
    command, unfortunately, i can't run.I suppose that it is bacause of
    setting path.But i can't solve.
    Can you help?

    Another thing is, when i double click the .py file, there are the
    project form and the command line.How can i provide to view only the
    project?
    Thanks...
     
    gslm, Mar 25, 2007
    #1
    1. Advertising

  2. gslm

    Paul Boddie Guest

    gslm wrote:
    > Hi!
    > I'm too new on phyton.I have installed phyton.But when I write phyton
    > command, unfortunately, i can't run.I suppose that it is bacause of
    > setting path.But i can't solve.
    > Can you help?


    It's "python" you should be typing, of course. If that doesn't work
    then it may be a PATH issue, yes.

    > Another thing is, when i double click the .py file, there are the
    > project form and the command line.How can i provide to view only the
    > project?


    I think you need to rename the .py file so that it ends with .pyw -
    this stops the command line window from opening, but it's only useful
    if you are running a graphical program, obviously.

    Paul
     
    Paul Boddie, Mar 25, 2007
    #2
    1. Advertising

  3. gslm

    gslm Guest

    On 25 Mart, 20:16, "Paul Boddie" <> wrote:
    > gslm wrote:
    > > Hi!
    > > I'm too new on phyton.I have installed phyton.But when I write phyton
    > > command, unfortunately, i can't run.I suppose that it is bacause of
    > > setting path.But i can't solve.
    > > Can you help?

    >
    > It's "python" you should be typing, of course. If that doesn't work
    > then it may be a PATH issue, yes.
    >
    > > Another thing is, when i double click the .py file, there are the
    > > project form and the command line.How can i provide to view only the
    > > project?

    >
    > I think you need to rename the .py file so that it ends with .pyw -
    > this stops the command line window from opening, but it's only useful
    > if you are running a graphical program, obviously.
    >
    > Paul


    First, thaks a lot.
    But I'm sorry.I haven't understood what i must do for ruunnig phyton
    command.I delete path from proportiesof my computer.Then i open
    command line of phyton.But when i write phyton these view below:
    Traceback<most recent call last>:
    File "<stdin>"; line 1 in <module>
    NameError: name phyton is not defined
    Sorry may be you think i'm comic but i am not be able to correct.
     
    gslm, Mar 25, 2007
    #3
  4. gslm

    tac-tics Guest

    On Mar 25, 1:06 pm, "gslm" <> wrote:
    > Hi!
    > I'm too new on phyton.I have installed phyton.But when I write phyton
    > command, unfortunately, i can't run.I suppose that it is bacause of
    > setting path.But i can't solve.
    > Can you help?


    You need to set what is called your PATH environment variable. See:
    http://www.computerhope.com/issues/ch000549.htm
    and add C:\python\ (or wherever your python package is installed) to
    your PATH.

    >
    > Another thing is, when i double click the .py file, there are the
    > project form and the command line.How can i provide to view only the
    > project?


    I don't quite understand what you're asking here.
     
    tac-tics, Mar 25, 2007
    #4
  5. En Sun, 25 Mar 2007 15:40:14 -0300, gslm <> escribió:

    > But I'm sorry.I haven't understood what i must do for ruunnig phyton
    > command.I delete path from proportiesof my computer.Then i open
    > command line of phyton.But when i write phyton these view below:
    > Traceback<most recent call last>:
    > File "<stdin>"; line 1 in <module>
    > NameError: name phyton is not defined
    > Sorry may be you think i'm comic but i am not be able to correct.


    So, you *already* have started the Python interpreter. You don't have to
    type any more thing to start!
    If you see a console like this:

    Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)]
    on win
    32
    Type "help", "copyright", "credits" or "license" for more information.
    >>>


    you are inside the Python interpreter.
    You may use IDLE, an integrated editor+debugger+other things (Start menu,
    All programs, Python, Idle).
    Or install the Python for Windows extensions, by Mark Hammond, that comes
    with its own editor (PythonWin) and may be better suited for a Windows
    environment https://sourceforge.net/projects/pywin32/
    Try reading some introductory texts. The book "Dive into Python" may be
    useful: www.diveintopython.org
    There is a wiki with more resources: http://wiki.python.org/moin/

    --
    Gabriel Genellina
     
    Gabriel Genellina, Mar 25, 2007
    #5
  6. gslm

    Hertha Steck Guest

    gslm schrieb:
    > First, thaks a lot.
    > But I'm sorry.I haven't understood what i must do for ruunnig phyton
    > command.I delete path from proportiesof my computer.Then i open
    > command line of phyton.But when i write phyton these view below:
    > Traceback<most recent call last>:
    > File "<stdin>"; line 1 in <module>
    > NameError: name phyton is not defined


    Such an answer comes from Python, I think you must already be in the
    interactive interpreter. Do you see something similar to this, with your
    cursor after the ">>>"?

    Python 2.5 (r25:51908, Oct 6 2006, 15:22:41)
    [GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu4)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>>


    At this point you can enter valid Python statements, but you can't call
    Python from Python (wouldn't make sense anyway).

    I'd look at this page first:

    http://www.python.org/about/gettingstarted/

    HTH
    Hertha
     
    Hertha Steck, Mar 25, 2007
    #6
  7. gslm

    gslm Guest

    Please, can you read again?
    Yes, I understand that in phyton interpreter, i can't call phyton
    command.Thanks...

    But how can i run '.py' files from this command line?I wanted to use
    the phyton command for this.

    When i click a py extended file, for example calendar.py in lib
    directory, file opens, then suddenly close,except graphical ones.Why?
    How can i see the results?

    And where can i learn which library must i import for whic class?

    Sorry, i ask much:(But after learning these starting knowledeges, i
    read tutorials, manuals etc.
    But now i haven't found my answers yet.
    Regards...
     
    gslm, Mar 25, 2007
    #7
  8. On Mar 25, 6:23 pm, "gslm" <> wrote:
    > Please, can you read again?
    > Yes, I understand that in phyton interpreter, i can't call phyton
    > command.Thanks...
    >
    > But how can i run '.py' files from this command line?I wanted to use
    > the phyton command for this.
    >
    > When i click a py extended file, for example calendar.py in lib
    > directory, file opens, then suddenly close,except graphical ones.Why?
    > How can i see the results?
    >
    > And where can i learn which library must i import for whic class?
    >
    > Sorry, i ask much:(But after learning these starting knowledeges, i
    > read tutorials, manuals etc.
    > But now i haven't found my answers yet.
    > Regards...


    For god's sake. It's PYTHON, not PHYTON.

    Use IDLE and run your files from there. That way you won't have to
    mess with the hideous windows console.

    However, if you really want to use the windows console, keep in mind
    that it will always close automatically when the program ends. That is
    true for Python, C, whatever, unless it was open before. So, Start-
    >run, type "cmd" then run python filename.py. If that does not work,

    it's because the path is not set correctly.

    And that's probably because you keep mispelling Python. See below:

    " But I'm sorry.I haven't understood what i must do for ruunnig phyton
    command.I delete path from proportiesof my computer.Then i open
    command line of phyton.But when i write phyton these view below:
    Traceback<most recent call last>:
    File "<stdin>"; line 1 in <module>
    NameError: name phyton is not defined "
    ^^^^^^^

    Obviously, "Phyton" will never be defined.


    Stephen
     
    Stephen Eilert, Mar 25, 2007
    #8
  9. >
    > Obviously, "Phyton" will never be defined.
    >


    Indeed I remember in the climactic showdown between Phyton and the
    rest of the gamma ranger FooDroids and he kept doing the mega kick
    move. and I was thinking wow Phyton will never be defined, he will
    just keep kicking ass.

    I hear they're gonna make a Phyton Commandant movie.

    Cheers,
    Bryan Rasmussen
     
    bryan rasmussen, Mar 25, 2007
    #9
  10. gslm

    Steve Holden Guest

    gslm wrote:
    > Please, can you read again?
    > Yes, I understand that in phyton interpreter, i can't call phyton
    > command.Thanks...
    >
    > But how can i run '.py' files from this command line?I wanted to use
    > the phyton command for this.
    >
    > When i click a py extended file, for example calendar.py in lib
    > directory, file opens, then suddenly close,except graphical ones.Why?
    > How can i see the results?
    >
    > And where can i learn which library must i import for whic class?
    >
    > Sorry, i ask much:(But after learning these starting knowledeges, i
    > read tutorials, manuals etc.
    > But now i haven't found my answers yet.
    > Regards...
    >


    http://www.python.org/doc/faq/windows.html#how-do-i-run-a-python-program-under-windows

    regards
    Steve
    --
    Steve Holden +44 150 684 7255 +1 800 494 3119
    Holden Web LLC/Ltd http://www.holdenweb.com
    Skype: holdenweb http://del.icio.us/steve.holden
    Recent Ramblings http://holdenweb.blogspot.com
     
    Steve Holden, Mar 25, 2007
    #10
  11. gslm

    Paul Boddie Guest

    gslm wrote:
    > Please, can you read again?
    > Yes, I understand that in phyton interpreter, i can't call phyton
    > command.Thanks...
    >
    > But how can i run '.py' files from this command line?I wanted to use
    > the phyton command for this.


    Once you are in the Python interpreter you can run Python files, but
    the best way to run files is one of the following:

    * From the command prompt (DOS prompt); type something like this:

    python file.py

    * In the file manager (Windows Explorer, not Internet Explorer), open/
    run file.py.

    If you *really* want to run files in the interpreter, you can do
    something like this:

    execfile("file.py")

    > When i click a py extended file, for example calendar.py in lib
    > directory, file opens, then suddenly close,except graphical ones.Why?
    > How can i see the results?


    For things that don't open windows you really need to run them from
    the command prompt.

    > And where can i learn which library must i import for whic class?


    Look at the library reference: each of the listed libraries are named,
    and for the calendar module you'd put this in your program (or type it
    at the Python prompt):

    import calendar

    Note that in Python programs or at the Python prompt you do not refer
    to it as calendar.py or C:\Python24\Lib\calendar.py (or wherever it
    lives): Python knows where to look and knows to add the .py on the end
    of the file.

    Note also that this doesn't run the calendar module, so it isn't quite
    the same as running the calendar.py file as described above.

    > Sorry, i ask much:(But after learning these starting knowledeges, i
    > read tutorials, manuals etc.
    > But now i haven't found my answers yet.


    I hope this helps a little.

    Paul
     
    Paul Boddie, Mar 25, 2007
    #11
  12. gslm

    gslm Guest

    On 26 Mart, 00:50, "Stephen Eilert" <> wrote:
    > On Mar 25, 6:23 pm, "gslm" <> wrote:
    >
    >
    >
    >
    >
    > > Please, can you read again?
    > > Yes, I understand that in phyton interpreter, i can't call phyton
    > > command.Thanks...

    >
    > > But how can i run '.py' files from this command line?I wanted to use
    > > the phyton command for this.

    >
    > > When i click a py extended file, for example calendar.py in lib
    > > directory, file opens, then suddenly close,except graphical ones.Why?
    > > How can i see the results?

    >
    > > And where can i learn which library must i import for whic class?

    >
    > > Sorry, i ask much:(But after learning these starting knowledeges, i
    > > read tutorials, manuals etc.
    > > But now i haven't found my answers yet.
    > > Regards...

    >
    > For god's sake. It's PYTHON, not PHYTON.
    >
    > Use IDLE and run your files from there. That way you won't have to
    > mess with the hideous windows console.
    >
    > However, if you really want to use the windows console, keep in mind
    > that it will always close automatically when the program ends. That is
    > true for Python, C, whatever, unless it was open before. So, Start->run, type "cmd" then run python filename.py. If that does not work,
    >
    > it's because the path is not set correctly.
    >
    > And that's probably because you keep mispelling Python. See below:
    >
    > " But I'm sorry.I haven't understood what i must do for ruunnig phyton
    > command.I delete path from proportiesof my computer.Then i open
    > command line of phyton.But when i write phyton these view below:
    > Traceback<most recent call last>:
    > File "<stdin>"; line 1 in <module>
    > NameError: name phyton is not defined "
    > ^^^^^^^
    >
    > Obviously, "Phyton" will never be defined.
    >
    > Stephen- Alýntýyý gizle -
    >
    > - Alýntýyý göster -


    Thanks to all of you!Sorry, I must be more careful!
    You're right, my problem is of course this:writing the word python
    wrong.
    Now it's ok!Thanks again and again!
     
    gslm, Mar 26, 2007
    #12
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. P.C.

    Had Phyton suggested

    P.C., Feb 8, 2004, in forum: Python
    Replies:
    16
    Views:
    546
  2. mr. ice

    onverting c++ to phyton

    mr. ice, May 18, 2004, in forum: Python
    Replies:
    1
    Views:
    304
    Jason Mobarak
    May 19, 2004
  3. odlfox
    Replies:
    1
    Views:
    298
    robert
    Jan 10, 2007
  4. Replies:
    1
    Views:
    254
    Tzury Bar Yochay
    May 3, 2008
  5. Sven Schimmel

    Calling a XML-RPC-Service of phyton with vb.net

    Sven Schimmel, Sep 22, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    148
    Sven Schimmel
    Sep 22, 2004
Loading...

Share This Page