[Tutor] Packaging questions

Mats Wichmann mats at wichmann.us
Wed Dec 15 12:56:48 EST 2021


On December 13, 2021 6:52:23 PM MST, Dennis Lee Bieber <wlfraed at ix.netcom.com> wrote:
>On Tue, 14 Dec 2021 10:10:20 +1100, Cameron Simpson <cs at cskk.id.au>
>declaimed the following:
>
>>with no special actions. If you want "module-run.py" as a command (a) it 
>>needs execute permission and (b) it needs to be in your $PATH (on 
>>UNIXlike systems).
>>
>	And just to provide the dark side... On Windows one needs suitable
>FTYPE and ASSOC assignments -- eg:
>
>C:\Users\Wulfraed>assoc .py
>.py=Python.File
>
>C:\Users\Wulfraed>ftype python.file
>python.file="C:\WINDOWS\py.exe" "%L" %*

As I've just found out, the value of ftype is fairly useless now, you need to look a lot deeper.



>C:\Users\Wulfraed>py
>Python ActivePython 3.8.2 (ActiveState Software Inc.) based on
> on win32
>Type "help", "copyright", "credits" or "license" for more information.
>>>>
>
>	Going further, if one doesn't want to provide the .py suffix and just
>use "module-run", one needs to add it to the PATHEXT variable (hmm, I need
>to clean mine up -- looks like updating Visual Studio added some...)
>
>C:\Users\Wulfraed>set pathext
>PATHEXT=.PY;.PY3;.PYC;.PYO;.PYW;.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.py;.pyw;.rexx;.rex;.rx
>
>C:\Users\Wulfraed>
>
>


-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


More information about the Tutor mailing list