A very, very newbie question :)

Sean Blakey sblakey at freei.com
Wed Aug 23 12:55:21 EDT 2000


On Wed, Aug 23, 2000 at 12:37:25PM -0700, The Jazz Singer wrote:
> Thank you so much. I'm checking out some of those editors now.
> 
> Sean Blakey wrote:
> 
> >   <snip>
> > 3) (I don't remember all the details of how to do this, don't have a
> > Windows box in front of me).  There is a way to create a file
> > association for Python files so that when you right-click on them, you
> > can select "test".  "test" will run python with the -i flag, which will
> > cause the script to run, then dump you into the interactive interpreter.
> > I'll try to get back to you with more info.
> >

I found the documentation for this trick on deja at 
http://x54.deja.com/[ST_rn=fs]/getdoc.xp?AN=518917432&CONTEXT=967049242.2085879848&hitnum=5

It was originally posted by Jeffrey Kunce
<kuncej at mail.conservation.state.mo.us>

The relevant bits are:


 Action Name: test
 Application: "C:\Program Files\Python\python.exe" -i "%1"
 Description: Runs the python script in an MSDOS window. Leaves
 the window open, and the interpreter running, when the script
 finishes. Good for debugging, esp when using the pdb module.

  ...

 
 To define an action for a ".py" files:
   -open Windows [NT] Explorer
   -from the "View" menu, select "Options"
   -select the "File Types" tab
   -from "Registered File Types", select "Python File"   -click the "Edit"
 button
   -click the "New" button
   -for "Action", enter the action name to be 
 displayed in the popup menu
   -for "Application used", enter the command 
 line (as in the examples above)
   -click "OK", etc...
  
  -Sean

P.S. Jeffrey suggested a year ago that this be added to a FAQ somewhere.
-- 
Sean Blakey, sblakey at freei.com
Software Developer, FreeInternet.com
(253)796-6500x1025
"It ain't so much the things we don't know that get us in trouble.  It's the
things we know that ain't so."
-- Artemus Ward aka Charles Farrar Brown




More information about the Python-list mailing list