Thread: [Pydev-code] Jython Scripting - is this limited to v2.2?
Brought to you by:
fabioz
|
From: Fran B. <fra...@gm...> - 2013-03-23 01:47:31
|
I have been playing with the Jython scripting interface which I just discovered & have been very excited about, however I find that it seems to be limited to v2.2, is that true? I have 2.7b1 installed & can launch an interactive console with that version, however this isn't what is used for the scripts & I can't see a way to set it for the scripts? Many thanks for any help, Fran. |
|
From: Fabio Z. <fa...@es...> - 2013-03-23 02:02:00
|
Hi Fran, Unfortunately yes, right now it's limited to Jython 2.2 (which is the internal version used). There are currently no plans to upgrade that version (mostly because it'd raise the size of PyDev a lot -- the jython jar is currently 1.5 MB, and the update would make it around 8 MB... The whole PyDev with Jython is right now 7 MB, so, it'd double the size just for that update). I'd consider adding it only if it makes the startup of the PyDev editor much faster (right now, the first time you open a PyDev editor, it has a delay: that's Jython loading... I'm almost considering removing it because of that delay -- or at least making it optional, in which case it might be worth putting it in a separate plugin -- then, maybe it'd be worth updating the version, as users that don't want it don't need to get it). Cheers, Fabio On Fri, Mar 22, 2013 at 10:47 PM, Fran Boon <fra...@gm...> wrote: > I have been playing with the Jython scripting interface which I just > discovered & have been very excited about, however I find that it > seems to be limited to v2.2, is that true? > I have 2.7b1 installed & can launch an interactive console with that > version, however this isn't what is used for the scripts & I can't see > a way to set it for the scripts? > > Many thanks for any help, > Fran. > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > _______________________________________________ > pydev-code mailing list > pyd...@li... > https://lists.sourceforge.net/lists/listinfo/pydev-code > |
|
From: Fran B. <fra...@gm...> - 2013-03-23 02:08:29
|
On 23 March 2013 02:01, Fabio Zadrozny <fa...@es...> wrote: > Unfortunately yes, right now it's limited to Jython 2.2 (which is the > internal version used). There are currently no plans to upgrade that version > (mostly because it'd raise the size of PyDev a lot -- the jython jar is > currently 1.5 MB, and the update would make it around 8 MB... The whole > PyDev with Jython is right now 7 MB, so, it'd double the size just for that > update). I did spot the size bump & wondered if that was a factor. > I'd consider adding it only if it makes the startup of the PyDev editor much > faster (right now, the first time you open a PyDev editor, it has a delay: > that's Jython loading... I'm almost considering removing it because of that > delay -- or at least making it optional, in which case it might be worth > putting it in a separate plugin -- then, maybe it'd be worth updating the > version, as users that don't want it don't need to get it). Makes sense - I've been a happy PyDev user for a couple of years without touching Jython, but am seeing the Scripting as being a majorly useful feature. Being able to plug-in any Jython version would be ideal...how hard would it be to separate out the bridging code to enable pointing to any Jython install? Many thanks, Fran. > Cheers, > > Fabio > > > On Fri, Mar 22, 2013 at 10:47 PM, Fran Boon <fra...@gm...> wrote: >> >> I have been playing with the Jython scripting interface which I just >> discovered & have been very excited about, however I find that it >> seems to be limited to v2.2, is that true? >> I have 2.7b1 installed & can launch an interactive console with that >> version, however this isn't what is used for the scripts & I can't see >> a way to set it for the scripts? >> >> Many thanks for any help, >> Fran. >> >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_d2d_mar >> _______________________________________________ >> pydev-code mailing list >> pyd...@li... >> https://lists.sourceforge.net/lists/listinfo/pydev-code > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > _______________________________________________ > pydev-code mailing list > pyd...@li... > https://lists.sourceforge.net/lists/listinfo/pydev-code > |
|
From: Fabio Z. <fa...@es...> - 2013-03-23 02:20:32
|
Not sure how hard, but it's definitely not trivial. As it's one of the things that slows down the editor startup, I was considering taking a look at it as a part of the funding at http://igg.me/at/liclipse, but it'll depend if the funding succeeds. Cheers, Fabio On Fri, Mar 22, 2013 at 11:08 PM, Fran Boon <fra...@gm...> wrote: > On 23 March 2013 02:01, Fabio Zadrozny <fa...@es...> wrote: > > Unfortunately yes, right now it's limited to Jython 2.2 (which is the > > internal version used). There are currently no plans to upgrade that > version > > (mostly because it'd raise the size of PyDev a lot -- the jython jar is > > currently 1.5 MB, and the update would make it around 8 MB... The whole > > PyDev with Jython is right now 7 MB, so, it'd double the size just for > that > > update). > > I did spot the size bump & wondered if that was a factor. > > > I'd consider adding it only if it makes the startup of the PyDev editor > much > > faster (right now, the first time you open a PyDev editor, it has a > delay: > > that's Jython loading... I'm almost considering removing it because of > that > > delay -- or at least making it optional, in which case it might be worth > > putting it in a separate plugin -- then, maybe it'd be worth updating the > > version, as users that don't want it don't need to get it). > > Makes sense - I've been a happy PyDev user for a couple of years > without touching Jython, but am seeing the Scripting as being a > majorly useful feature. > Being able to plug-in any Jython version would be ideal...how hard > would it be to separate out the bridging code to enable pointing to > any Jython install? > > Many thanks, > Fran. > > > Cheers, > > > > Fabio > > > > > > On Fri, Mar 22, 2013 at 10:47 PM, Fran Boon <fra...@gm...> > wrote: > >> > >> I have been playing with the Jython scripting interface which I just > >> discovered & have been very excited about, however I find that it > >> seems to be limited to v2.2, is that true? > >> I have 2.7b1 installed & can launch an interactive console with that > >> version, however this isn't what is used for the scripts & I can't see > >> a way to set it for the scripts? > >> > >> Many thanks for any help, > >> Fran. > >> > >> > >> > ------------------------------------------------------------------------------ > >> Everyone hates slow websites. So do we. > >> Make your web apps faster with AppDynamics > >> Download AppDynamics Lite for free today: > >> http://p.sf.net/sfu/appdyn_d2d_mar > >> _______________________________________________ > >> pydev-code mailing list > >> pyd...@li... > >> https://lists.sourceforge.net/lists/listinfo/pydev-code > > > > > > > > > ------------------------------------------------------------------------------ > > Everyone hates slow websites. So do we. > > Make your web apps faster with AppDynamics > > Download AppDynamics Lite for free today: > > http://p.sf.net/sfu/appdyn_d2d_mar > > _______________________________________________ > > pydev-code mailing list > > pyd...@li... > > https://lists.sourceforge.net/lists/listinfo/pydev-code > > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > _______________________________________________ > pydev-code mailing list > pyd...@li... > https://lists.sourceforge.net/lists/listinfo/pydev-code > |
|
From: Fran B. <fra...@gm...> - 2013-03-23 02:54:01
|
On 23 March 2013 02:20, Fabio Zadrozny <fa...@es...> wrote: > Not sure how hard, but it's definitely not trivial. As it's one of the > things that slows down the editor startup, I was considering taking a look > at it as a part of the funding at http://igg.me/at/liclipse, but it'll > depend if the funding succeeds. ok, I'm now a PyDev Knight ;) Is the only way to launch scripts the OfflineAction, or can we create menu entries/toolbar buttons? Is there a wiki page to share snippets? What are people doing with scripting? I just created a script to stop the active debugger, then clean my app (database, sessions, etc) & then restart the debugger. Generic part: from org.eclipse.debug.core import DebugPlugin, ILaunchManager singleton = DebugPlugin.getDefault() launchManager = singleton.getLaunchManager() launches = launchManager.getLaunches() if len(launches): launchConfig = launches[0].getLaunchConfiguration() print "Stopping Debug" launchManager.removeLaunches(launches) else: launchConfig = None # (clean app happens in here, but not included) if launchConfig: print "Starting Debug" launch = launchConfig.launch(ILaunchManager.DEBUG_MODE, None) launchManager.addLaunch(launch) Changes to the script only seem to take effect when I restart Eclipse (4.2.2) - the docs suggested that no restart was required? Thanks, Fran. |
|
From: Fabio Z. <fa...@es...> - 2013-03-23 03:13:00
|
On Fri, Mar 22, 2013 at 11:53 PM, Fran Boon <fra...@gm...> wrote: > On 23 March 2013 02:20, Fabio Zadrozny <fa...@es...> wrote: > > Not sure how hard, but it's definitely not trivial. As it's one of the > > things that slows down the editor startup, I was considering taking a > look > > at it as a part of the funding at http://igg.me/at/liclipse, but it'll > > depend if the funding succeeds. > > ok, I'm now a PyDev Knight ;) > Thank you :) > > Is the only way to launch scripts the OfflineAction, or can we create > menu entries/toolbar buttons? > I must say I've always created it in the plugin, so I'm not sure... googling a bit for "eclipse create menu programatically" brought me: http://www.wickedshell.net/blog/?p=48 may be what you want... > > Is there a wiki page to share snippets? > Not really... usually I get patches for those, but if you have something that can't be added to the core I can put something up to point to a github with the code. > What are people doing with scripting? > Well, most of the patches related to scripting I receive are usually for doing some special text manipulation (such as the ctrl+2, w which word-wraps a paragraph) > > I just created a script to stop the active debugger, then clean my app > (database, sessions, etc) & then restart the debugger. > > Generic part: > from org.eclipse.debug.core import DebugPlugin, ILaunchManager > singleton = DebugPlugin.getDefault() > launchManager = singleton.getLaunchManager() > launches = launchManager.getLaunches() > if len(launches): > launchConfig = launches[0].getLaunchConfiguration() > print "Stopping Debug" > launchManager.removeLaunches(launches) > else: > launchConfig = None > > # (clean app happens in here, but not included) > > if launchConfig: > print "Starting Debug" > launch = launchConfig.launch(ILaunchManager.DEBUG_MODE, None) > launchManager.addLaunch(launch) > > > Changes to the script only seem to take effect when I restart Eclipse > (4.2.2) - the docs suggested that no restart was required? > Hummm... if you're dealing with multiple files, the restart may be required (as it'll only reload the main script), but if you're dealing with a single script, it really should be reloaded... (I'd have to see the whole script as it may be something in the way it's structured). Cheers, Fabio > Thanks, > Fran. > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > _______________________________________________ > pydev-code mailing list > pyd...@li... > https://lists.sourceforge.net/lists/listinfo/pydev-code > |
|
From: Mason W. <mas...@gm...> - 2013-03-23 03:48:30
|
I'm using Jython 2.5.3 with PyDev. I just forced it on top of it. I'm running just fine at this point. Not sure what you're trying to do with it but for a Jythin development environment, it works fine. I'm using some newer Python features, I believe. Mason On Mar 22, 2013, at 8:13 PM, Fabio Zadrozny <fa...@es...> wrote: On Fri, Mar 22, 2013 at 11:53 PM, Fran Boon <fra...@gm...> wrote: > On 23 March 2013 02:20, Fabio Zadrozny <fa...@es...> wrote: > > Not sure how hard, but it's definitely not trivial. As it's one of the > > things that slows down the editor startup, I was considering taking a > look > > at it as a part of the funding at http://igg.me/at/liclipse, but it'll > > depend if the funding succeeds. > > ok, I'm now a PyDev Knight ;) > Thank you :) > > Is the only way to launch scripts the OfflineAction, or can we create > menu entries/toolbar buttons? > I must say I've always created it in the plugin, so I'm not sure... googling a bit for "eclipse create menu programatically" brought me: http://www.wickedshell.net/blog/?p=48 may be what you want... > > Is there a wiki page to share snippets? > Not really... usually I get patches for those, but if you have something that can't be added to the core I can put something up to point to a github with the code. > What are people doing with scripting? > Well, most of the patches related to scripting I receive are usually for doing some special text manipulation (such as the ctrl+2, w which word-wraps a paragraph) > > I just created a script to stop the active debugger, then clean my app > (database, sessions, etc) & then restart the debugger. > > Generic part: > from org.eclipse.debug.core import DebugPlugin, ILaunchManager > singleton = DebugPlugin.getDefault() > launchManager = singleton.getLaunchManager() > launches = launchManager.getLaunches() > if len(launches): > launchConfig = launches[0].getLaunchConfiguration() > print "Stopping Debug" > launchManager.removeLaunches(launches) > else: > launchConfig = None > > # (clean app happens in here, but not included) > > if launchConfig: > print "Starting Debug" > launch = launchConfig.launch(ILaunchManager.DEBUG_MODE, None) > launchManager.addLaunch(launch) > > > Changes to the script only seem to take effect when I restart Eclipse > (4.2.2) - the docs suggested that no restart was required? > Hummm... if you're dealing with multiple files, the restart may be required (as it'll only reload the main script), but if you're dealing with a single script, it really should be reloaded... (I'd have to see the whole script as it may be something in the way it's structured). Cheers, Fabio > Thanks, > Fran. > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > _______________________________________________ > pydev-code mailing list > pyd...@li... > https://lists.sourceforge.net/lists/listinfo/pydev-code > ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar _______________________________________________ pydev-code mailing list pyd...@li... https://lists.sourceforge.net/lists/listinfo/pydev-code |
|
From: Fran B. <fra...@gm...> - 2013-03-23 12:05:22
|
On 23 March 2013 03:48, Mason Wardle <mas...@gm...> wrote: > I'm using Jython 2.5.3 with PyDev. I just forced it on top of it. I'm > running just fine at this point. Not sure what you're trying to do with it > but for a Jythin development environment, it works fine. I'm using some > newer Python features, I believe. Hi Mason, Thanks, yes I can use alternate Jython interpreters for developing other packages...this limitation is just for using the internal Jython scripting: http://pydev.org/manual_articles_scripting.html Best Wishes, Fran. |