By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,333 Members | 1,860 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,333 IT Pros & Developers. It's quick & easy.

problem at installing phyton on windows

P: n/a
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...

Mar 25 '07 #1
Share this Question
Share on Google+
11 Replies


P: n/a
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

Mar 25 '07 #2

P: n/a
On 25 Mart, 20:16, "Paul Boddie" <p...@boddie.org.ukwrote:
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.

Mar 25 '07 #3

P: n/a
On Mar 25, 1:06 pm, "gslm" <slm_gu...@hotmail.comwrote:
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.

Mar 25 '07 #4

P: n/a
En Sun, 25 Mar 2007 15:40:14 -0300, gslm <sl*******@hotmail.comescribió:
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

Mar 25 '07 #5

P: n/a
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
Mar 25 '07 #6

P: n/a
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...

Mar 25 '07 #7

P: n/a
On Mar 25, 6:23 pm, "gslm" <slm_gu...@hotmail.comwrote:
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


Mar 25 '07 #8

P: n/a
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/window...-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

Mar 25 '07 #9

P: n/a
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

Mar 25 '07 #10

P: n/a
>
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
Mar 26 '07 #11

P: n/a
On 26 Mart, 00:50, "Stephen Eilert" <spedr...@gmail.comwrote:
On Mar 25, 6:23 pm, "gslm" <slm_gu...@hotmail.comwrote:


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!

Mar 26 '07 #12

This discussion thread is closed

Replies have been disabled for this discussion.