Python is easy?

Bengt Richter bokr at oz.net
Thu Aug 15 10:18:59 CEST 2002


On 15 Aug 2002 06:58:58 GMT, bokr at oz.net (Bengt Richter) wrote:
[...]
>
>Here's a recipe to give you a right-click popup menu item called "Run in Persistent Console"
>in the explorer for NT4:
>
[...]
>Then add this under shell at the same level as Edit with Idel and open:
>
>        Run in Persistent Console
>            command
>                Data: cmd.exe /x /k D:\Python22\python.exe "%1"
> 
>
If you add
         Run Python Console in same Dir 
             command
                 Data: cmd.exe /x /k D:\Python22\python.exe

I.e., the same under a different name, with the arg "%1" left off,
you get something useful too: It will start a persistent DOS window
and run Python for an interactive prompt in the same directory as the
file you right clicked. Which means you can just import the file
interactively, no matter where it happens to be. If you found it
with explorer, it's like starting the console window and cd-ing
to the same place as you are looking at with the explorer and then
starting python there. But with just a right click and select.

And when you exit Python, you'll be there in the Console window,
in the directory of th selected file. Kind of handy sometimes.

Regards,
Bengt Richter



More information about the Python-list mailing list