Invalid path for Python with Windows


Y

keyboard_arrow_up
0
keyboard_arrow_down


First Post yotta
Posts: 1 - Registered: 2011-06-03 16:56:21

Hi
i am a new with python and trying to execute a script on my computer with windows OS.
in the example that i am running the first line of the script indicate the path of the python /usr/bin/python but because i am using windows that don't work , can you help me with that to execute my script correctly.

SCRIPT
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Affichage d'un formulaire HTML simplifié :

print "Content-Type: text/html\n"
print """
<H3><FONT COLOR="Royal blue">
Page web produite par un script Python
</FONT></H3>
<FORM ACTION="print_result.py" METHOD="post">
<P>Veuillez entrer votre nom dans le champ ci-dessous, s.v.p. :</P>
<P><INPUT NAME="visiteur" SIZE=20 MAXLENGTH=20 TYPE="text"></P>
<P>Veuillez également me fournir une phrase quelconque :</P>
<TEXTAREA NAME="phrase" ROWS=2 COLS=50>Mississippi</TEXTAREA>
<P>J'utiliserai cette phrase pour établir un histogramme.</P>
<INPUT TYPE="submit" NAME="send" VALUE="Action">
</FORM>
"""


CODE HTML
<HTML>
<HEAD><TITLE>Using Python</TITLE></HEAD>

<BODY>
<DIV ALIGN="center">
<IMG SRC="penguin.gif">
<H2>Page Web interactive</H2>
<P>Cette page est associée à un script Python</P>
<FORM ACTION="../test/input_query.py" METHOD="post">
<INPUT TYPE="submit" NAME="send" VALUE="Exécuter le script">
</FORM>
</DIV></BODY></HTML>



0 Replies




JOIN DEVPPL

It looks like you are new here. If you want to get involved, click on Join below!




MENU
Advertising