python on window
sandeep patil
san.gujar at gmail.com
Fri Mar 23 03:25:52 EDT 2007
i have install python on window xp os.
C:/program files/python
i have done print program it working but .py can't working
help me to how i will execute this file this file where i will save
it.
path execution how .
tell me about any envorment veriable in python to set before python
editor run,it path. etc
************************************************************
>>> print ' sandeep patil'
sandeep patil
>>> print ' sandeep "bhagwan " patil ,msc. java j2ee developer"
SyntaxError: EOL while scanning single-quoted string
>>> print ' sandeep "bhagwan " patil ,msc. java j2ee developer'
sandeep "bhagwan " patil ,msc. java j2ee developer
>>> import posix
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
import posix
ImportError: No module named posix
>>> phonebook = {'sandeep':9325,'amit':9822,'anand':9890}
>>> phonebook = {'titu':9423,'dadu':9422,'giri':9326}
>>> inverted_phonebook=invert(phonebook)
Traceback (most recent call last):
File "<pyshell#7>", line 1, in <module>
inverted_phonebook=invert(phonebook)
NameError: name 'invert' is not defined
>>> def invert(table):
index={}
for key in table.key():
value=table[key]
if not index.has_key(value):
index[value]=[]
index[value].append(key)
return index
************************************************************************
More information about the Python-list
mailing list