Shortcut to run Python script in PyShell without Launch

Request Features and Feature Changes

Shortcut to run Python script in PyShell without Launch

Postby Halst » Sun Jun 19, 2011 9:12 pm

I see launcher as universal thing to launch stuff, however, in IDLE it is so nice to be able to launch scripts in IDLE shell itself. I think it would be a great feature to have a shortcut to launch whatever is in current tab (saved/unsaved, .py or not) and execute it in PyShell itself, instead of Launcher.

This way when you develop something with python you don't need to switch between Launch and PySell.

Also I thought of a funny thing, when I write some scripts I (very often) copy a function from a file into PyShell to play with it, debug or test. I would definitely love to be able to select a function (or some text) in editor, press a shortcut, and see the selected part of script executed in current PySell.

What do you think? For both executing the current file in PyShell and executing selected part of it, there could be a shortcut (maybe the same for both of them). It is a pity that F5 is already used by Launch.
Halst
User
 
Posts: 9
Joined: Mon Apr 19, 2010 9:00 pm

Re: Shortcut to run Python script in PyShell without Launch

Postby cody » Mon Jun 20, 2011 1:48 am

Its a really bad idea to execute anything beyond small snippets in PyShell. PyShell executes all code in the same process as Editra is running so if your script gets stuck in an infinite loop it will cause Editra to lock up.

Not against having PyShell add a context menu option to the buffer to copy the selection into the shell.
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron