Seite 2 von 2

Verfasst: Montag 3. Mai 2010, 14:54
von jbs

Code: Alles auswählen

import sys

print sys.argv

Code: Alles auswählen

C:\Users\jbs\Desktop>test.py a b c
['C:\\Users\\jbs\\Desktop\\test.py']

C:\Users\jbs\Desktop>python test.py a b c
['test.py', 'a', 'b', 'c']

C:\Users\jbs\Desktop>test a b c
['C:\\Users\\jbs\\Desktop\\test.py']
Windows 7 mit python 2.6.5 :evil:

Verfasst: Montag 3. Mai 2010, 16:51
von ms4py
jbs hat geschrieben:Windows 7 mit python 2.6.5
dito

Code: Alles auswählen

C:\Users\marc\Desktop>test.py a b c
['C:\\Users\\marc\\Desktop\\test.py', 'a', 'b', 'c']
Da scheint was in deiner Registry kaputt zu sein ;)

Edit: So muss das aussehen:

Unter HKEY_CLASSES_ROOT\Python.File\shell\open\command
muss der Standard-Eintrag so lauten:
"C:\Python26\python.exe" "%1" %*

Verfasst: Montag 3. Mai 2010, 17:12
von jbs
Er lautet `"C:\Python26\python.exe" "%1" %*`