[Tutor] some web and python version questions

Dave Angel davea at davea.name
Tue Mar 5 06:14:47 CET 2013


On 03/04/2013 11:57 PM, eryksun wrote:
> On Mon, Mar 4, 2013 at 10:54 PM, Lolo Lolo <losermeloser at yahoo.com> wrote:
>> no if i double click the .py file, Python 3.3 opens all of my python 3
>> files. A lot of 3.0 files won't run but that's okay. Now on my command line
>> if i enter the correct version's directory, and use: python myfile.py then
>> the correct version's .exe opens the file. When i said "it works fine", i
>> was just suprised why my files lost their python icon but are still opened
>> by python when i double click them
>
> Installing 3.3 associated .py files with %windir%\py.exe,

Lolo -

Assuming eryksun is correct, all you need is to add shebang lines to the 
files that you want to run 3.0

The line must be the very first line in the file, and it consists of the 
characters "#!"  followed by the path to the executable.

Try:

#!c:\python3.3\python.exe     (or wherever the installation directory 
actually is)

or what Eryksun suggested:

#!/usr/bin/env python3.0


I can't tell which would be right, since I don't run Windows.  Any more.

-- 
DaveA


More information about the Tutor mailing list