Menu

RemoteEngines

Featured (5)
Anonymous

Remote Interpreter and Debugger

In addition to using the internal integrated Python engine, PyScripter offers you the option to use one of three remote Python engines. These remote engines run in a separate process, so, when using them, script errors should not affect the stability of PyScripter. You can select the python engine that will be active from the Python Engine submenu of the Run menu. Here is a brief explanation of the Python engine options:

Python Engines:

Internal

This Python engine is faster than the other options however if there are problems with the scripts you are running or debugging they could affect the reliability of PyScripter and could cause crashes. Another limitation of this engine is that it cannot run or debug GUI scripts nor it can be reinitialized.

Remote

This the default Python engine of PyScripter and is the recommended engine for most Python development tasks. It runs in a child process and communicates with PyScripter using rpyc. It can be used to run and debug any kind of script including GUI scripts. However if you run or debug GUI scripts you may have to reinitialize the engine after each run.

Remote Tk

This remote Python engine is specifically created to run and debug Tkinter applications including pylab using the Tkagg backend. It also supports running pylab in interactive mode. The engine activates a Tkinter mainloop and replaces the mainloop with a dummy function so that the Tkinter scripts you are running or debugging do not block the engine. You may even develop and test Tkinter widgets using the interactive console.

Remote Wx

This remote Python engine is specifically created to run and debug wxPython applications including pylab using the WX and WXAgg backends. It also supports running pylab in interactive mode. The engine activates a wx MainLoop and replaces the MainLoop with a dummy function so that the wxPython scripts you are running or debugging do not block the engine. You may even develop and test wxPython Frames and Apps using the interactive console. Please note that this engine prevents the redirection of wxPython output since that would prevent the communication with Pyscripter. When using the Tk and Wx remote engines you can of course run or debug any other non-GUI Python script. However bear in mind that these engines may be slightly slower than the standard remote engine since they also contain a GUI main loop.

Debugging Wx and Tkinter scirpts using the remote Wx and Tk engines

As mentioned above the Wx and Tk engines activate a main loop and replace the MainLoop with a dummy function. Therefore, when debugging Gui scripts using these engines, as soon as you reach the MainLoop statement debugging ends and you can then test the running application but without further debugging support. This means two things:

  • Breakpoints and debugging would work up to the point the script enters the MainLoop routine
  • You will not be able to debug event triggered code using these two engines.

To debug event code of Wx and Tkinter scripts use the standard remote engine. You may wonder why should you ever use the Wx and Tk specific remote engines. Here is a few reasons:

  • These engine allow you to interactively develop and test frames and widgets. (possible because they run their own main loop.
  • They support running pylab in interactive mode like IPython does, which was a request from many Pyscripter users.
  • There is no need to reinitialize the engines after running Gui scripts.
  • Pyscripter does not stay in running mode while the Gui Windows are showing but instead it returns in ready mode allowing further work and runs.

Requirements for the Remote Engines

The remote engines are only available with Python 2.4 or later. They make use of rpyc, which is bundled by PyScripter and so no separate installation is required.

Troubleshooting

  • If the remote Python engine becomes unresponsive you can try to reinitialize the engine from the Python Engine submenu of the Run menu (also available in the context menu of the interactive interpreter).
  • If Pyscripter fails to start or appears locked when starting this may be due to remote python engines from earlier runs still being active. This could happen after a Pyscripter crash. In such cases you should kill these python engines using the Windows Task Manager. Look in the Processes tab for processes with image name "pythonw.exe".

Related

Home: Home
Wiki: FAQ
Wiki: PyScripter
Wiki: Sidebar

Discussion

  • Anonymous

    Anonymous - 2009-07-11

    Originally posted by: victoryhb

    Thank you all for the marvelous job you've done!

     

    Last edit: Anonymous 2019-01-24
  • Anonymous

    Anonymous - 2010-03-07

    Originally posted by: linna...@gmail.com

    When I tried to debug django app with remote python engine mode, I found that my pyscripter only stopped at break points in file manage.py, and ignored other break points in my views.py. I felt that after django's developer server started, the debug function would not take effect upon the browser input.

    My environment is windows xp, python 2.5.1, pyscripter 1.9.9.7.

     

    Last edit: Anonymous 2019-01-24
  • Anonymous

    Anonymous - 2010-08-26

    Originally posted by: sslivit...@gmail.com

    Love pyscripter.

    Is the support for Qt application planned? I'm using the TK engine as they gave me less errors.

     

    Last edit: Anonymous 2019-01-24
  • Anonymous

    Anonymous - 2010-11-08

    Originally posted by: pyscripter

    Currently it is not possible to debug a script on a remote machine from PyScripter. This is a planned feature thought. You may be able to use winpdb.

     

    Last edit: Anonymous 2019-01-24
  • Anonymous

    Anonymous - 2011-11-30

    Originally posted by: radslice...@gmail.com

    Destruction of objects is not working with remote python engine, but works with internal python engine! E.g. Try running the following:

    class X(object):
        def __init__(self, x):
            self.x = x
            print 'Created', self.x
        def __del__(self):
            print 'Destroying', self.x
    
    x1 = X(1)
    print 1/0
    
     

    Last edit: Anonymous 2019-01-24
  • Anonymous

    Anonymous - 2012-01-12

    Originally posted by: st...@steveperkins.net

    If you use PyScripter on a Linux machine using Wine, is it possible to run scripts on the native Linux Python engine... or are you limited to the Windows Python environment running through Wine?

     

    Last edit: Anonymous 2019-01-24
  • Anonymous

    Anonymous - 2012-04-05

    Originally posted by: rob.clew...@gmail.com

    Thanks for this great tool. I'm trying to offer pyscripter as part of a virtual machine image at my uni, using VCL. It seems that changing to peRemoteTk as image admin does not stay permanent for users loading the image (they need to use pylab interactively). Is that setting saved permanently to an RC file of some kind? I can't find info about such a thing. Thanks.

     

    Last edit: Anonymous 2019-01-24
  • Anonymous

    Anonymous - 2013-02-19

    Originally posted by: shepa...@gmail.com

    I have a python script that runs fine if I run it straight from Windows Explorer (just double click) or from Visual Studio (using the pytools plugin). However, many of my users have pyscripter installed so I would like to be able to run it from there too. The problem is that when I run it I get an error 'ImportError?: DLL load failed: %1 is not a valid Win32 application'. The file that pyscripter then loads is numpy and it highlights 'import multiarray'. I get that there can be problems with 32 v 64-bit applications, but I don't get why I can run this succesfully from Windows Explorer, but it fails in pyscripter. I tried changing the Engine options but those all gave me the same error. Any ideas? Is there a way to check which .exe pyscripter is using to run the script? Would it be any different than the default .exe?

     

    Last edit: Anonymous 2019-01-24
  • Spyros Fakiridis

    Hi, I am running Python 2.7.13 and PyScripter 2.6.0.0 x86 on a windows 7 laptop.
    Whenever I try to load either of the Tk or Wx remote engines I get the message "Could not connect to the remote python engine server. The remote interpreter and debugger is not available".
    Is there a way to fix this or is it a perma-problem? I could not find any workaround myself and am a newb. Thank you.

     

    Last edit: Spyros Fakiridis 2017-03-21
    • PyScripter

      PyScripter - 2017-10-19

      Hi Spyro,

      Sorry for the late reply.
      It works here fine with version 3.0 from
      https://sourceforge.net/projects/pyscripter/files/. Are Tk or Wx properly
      installed in your machine?

      For instance does

      import tkinter

      work from the Interpreter window?

      Regards

      Kiriakos

      On 21 March 2017 at 13:16, Spyros Fakiridis esquivelspy@users.sf.net
      wrote:

      Hi, I am running Python 2.7.13 and PyScripter 2.6.0.0 x86
      Whenever I try to load either of the Tk or Wx remote engines I get the
      message "Could not connect to the remote python engine server. The remote
      interpreter and debugger is not available".
      Is there a way to fix this or is it a perma-problem? I could not find any
      workaround myself and am a newb. Thank you.


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/pyscripter/wiki/RemoteEngines/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.