Python 3 minor irritation

Gib Bogle g.bogle at
Thu Feb 4 21:50:29 CET 2010

Gabriel Genellina wrote:
> But the associated program might change the current directory - that's 
> not the case with the default associations created by the Python 
> installer, but one should verify this.
> To the OP: please create this small test script
> import os
> print("curdir=", os.getcwd())
> print("__file__=", __file__)
> input()
> and post what you get when you double-click on it.
> Also, from the command line, execute:
> D:\temp>reg query HKCR\.py
>     <Sin nombre>        REG_SZ  Python.File
>     Content Type        REG_SZ  text/plain
> HKEY_CLASSES_ROOT\.py\PersistentHandler

I'm interested in this, because I'm using Windows XP, and when I execute this 
command I see the first part but not the second (with PersistentHandler).  Is 
this related to the fact that when I double-click on a .py file the command 
window disappears after the execution is completed?

More information about the Python-list mailing list