problem at installing phyton on windows

G

gslm

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...
 
P

Paul Boddie

gslm said:
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
 
G

gslm

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


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.
 
T

tac-tics

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.
 
G

Gabriel Genellina

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/
 
H

Hertha Steck

gslm said:
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
 
G

gslm

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...
 
S

Stephen Eilert

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
 
B

bryan rasmussen

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
 
S

Steve Holden

gslm said:
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
 
P

Paul Boddie

gslm said:
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
 
G

gslm

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!
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top