Popular recipes tagged "remote"http://code.activestate.com/recipes/tags/remote/popular/2017-01-24T20:23:45-08:00ActiveState Code RecipesTkinter remote debugging (Python) 2017-01-24T20:23:45-08:00Miguel Martínez Lópezhttp://code.activestate.com/recipes/users/4189907/http://code.activestate.com/recipes/580721-tkinter-remote-debugging/ <p style="color: grey"> Python recipe 580721 by <a href="/recipes/users/4189907/">Miguel Martínez López</a> (<a href="/recipes/tags/debugging/">debugging</a>, <a href="/recipes/tags/remote/">remote</a>, <a href="/recipes/tags/tkinter/">tkinter</a>). Revision 6. </p> <p>This trick requires rpyc.</p> <p>You can install rpyc typing:</p> <blockquote> <p>pip install rpyc</p> </blockquote> <p>Run the code below and in another interpreter write:</p> <pre class="prettyprint"><code>import rpyc c = rpyc.classic.connect("localhost") c.execute("from Tkinter import Label; label=Label(app, text='a label')") c.execute("label.pack()") app = c.eval("app") app.responsive_button.invoke() </code></pre> Execute remote commands on windows like psexec (Python) 2011-11-18T11:54:42-08:00Ofer Helmanhttp://code.activestate.com/recipes/users/4179914/http://code.activestate.com/recipes/577945-execute-remote-commands-on-windows-like-psexec/ <p style="color: grey"> Python recipe 577945 by <a href="/recipes/users/4179914/">Ofer Helman</a> (<a href="/recipes/tags/command/">command</a>, <a href="/recipes/tags/remote/">remote</a>, <a href="/recipes/tags/windows/">windows</a>). Revision 4. </p> <p>This code attempts to implement psexec in python code, using wmi. As part of a project of mine I had to run remote commands on remote Windows machines from other Windows machine. At first I used psexec for that with subprocess.Popen. The reason in this code for creating .bat files and running them remotely is because complicated commands do not run properly with Win32_Process.Create</p> <p>In this code I used this code: <a href="http://code.activestate.com/recipes/442521/history/3/" rel="nofollow">http://code.activestate.com/recipes/442521/history/3/</a></p> <p>required installations:</p> <p>pywin32 - <a href="http://sourceforge.net/projects/pywin32/files/pywin32/Build216/" rel="nofollow">http://sourceforge.net/projects/pywin32/files/pywin32/Build216/</a></p> <p>wmi - <a href="http://timgolden.me.uk/python/downloads/" rel="nofollow">http://timgolden.me.uk/python/downloads/</a></p> LoggingWebMonitor - a central logging server and monitor. (Python) 2010-02-02T01:56:42-08:00Gabriel Genellinahttp://code.activestate.com/recipes/users/924636/http://code.activestate.com/recipes/577025-loggingwebmonitor-a-central-logging-server-and-mon/ <p style="color: grey"> Python recipe 577025 by <a href="/recipes/users/924636/">Gabriel Genellina</a> (<a href="/recipes/tags/client_server/">client_server</a>, <a href="/recipes/tags/debugging/">debugging</a>, <a href="/recipes/tags/distributed/">distributed</a>, <a href="/recipes/tags/logging/">logging</a>, <a href="/recipes/tags/remote/">remote</a>, <a href="/recipes/tags/sysadmin/">sysadmin</a>, <a href="/recipes/tags/web/">web</a>). Revision 3. </p> <p>LoggingWebMonitor listens for log records sent from other processes running in the same box or network. Collects and saves them concurrently in a log file. Shows a summary web page with the latest N records received.</p> RSH with timeout (Python) 2010-09-13T06:49:35-07:00Shrinidhi Raohttp://code.activestate.com/recipes/users/4174946/http://code.activestate.com/recipes/577390-rsh-with-timeout/ <p style="color: grey"> Python recipe 577390 by <a href="/recipes/users/4174946/">Shrinidhi Rao</a> (<a href="/recipes/tags/command/">command</a>, <a href="/recipes/tags/execution/">execution</a>, <a href="/recipes/tags/remote/">remote</a>, <a href="/recipes/tags/rsh/">rsh</a>, <a href="/recipes/tags/sysadmin/">sysadmin</a>, <a href="/recipes/tags/timeout/">timeout</a>). </p> <p>RSH sometimes hangs if it cannot resolve to a given host. So here is a quick recipe in python </p> Debugging a running python process by interrupting and providing an interactive prompt (Python) 2008-09-25T11:23:29-07:00Brian McErleanhttp://code.activestate.com/recipes/users/111980/http://code.activestate.com/recipes/576515-debugging-a-running-python-process-by-interrupting/ <p style="color: grey"> Python recipe 576515 by <a href="/recipes/users/111980/">Brian McErlean</a> (<a href="/recipes/tags/debug/">debug</a>, <a href="/recipes/tags/interactive/">interactive</a>, <a href="/recipes/tags/remote/">remote</a>, <a href="/recipes/tags/signal/">signal</a>). Revision 2. </p> <p>This provides code to allow any python program which uses it to be interrupted at the current point, and communicated with via a normal python interactive console. This allows the locals, globals and associated program state to be investigated, as well as calling arbitrary functions and classes.</p> <p>To use, a process should import the module, and call listen() at any point during startup. To interrupt this process, the script can be run directly, giving the process Id of the process to debug as the parameter.</p> CallPipe: Call the methods of an object in a remote process (Python) 2008-09-17T17:33:36-07:00david decotignyhttp://code.activestate.com/recipes/users/4129454/http://code.activestate.com/recipes/576509-callpipe-call-the-methods-of-an-object-in-a-remote/ <p style="color: grey"> Python recipe 576509 by <a href="/recipes/users/4129454/">david decotigny</a> (<a href="/recipes/tags/call/">call</a>, <a href="/recipes/tags/multiprocessing/">multiprocessing</a>, <a href="/recipes/tags/pipe/">pipe</a>, <a href="/recipes/tags/processing/">processing</a>, <a href="/recipes/tags/remote/">remote</a>). Revision 6. </p> <p>I am process A and I own object Obj. Now I decide to fork(): process B is born.</p> <p>How do I do to make process B call the methods of A's object Obj (and not the methods of its own copy of Obj...) ?</p> <p>This is what this module does: you create the "CallPipe" for Obj prior to fork()ing, and then process B can call any method of A's object Obj through it.</p>