We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eacadb1 commit 92fc961Copy full SHA for 92fc961
Doc/library/sys.rst
@@ -2007,12 +2007,15 @@ local and remote interpreters must be the same exact version.
2007
import tempfile
2008
import sys
2009
2010
- with tempfile.NamedTemporaryFile(mode='w', suffix='.py', delete=False) as f:
+ with tempfile.NamedTemporaryFile(
2011
+ mode='w',
2012
+ suffix='.py',
2013
+ delete_on_close=False,
2014
+ ) as f:
2015
f.write("print('Hello from remote!')")
2016
f.flush()
2017
os.chmod(f.name, 0o644) # Readable by group/other
2018
sys.remote_exec(pid, f.name)
- os.unlink(f.name) # Cleanup
2019
2020
See :ref:`remote-debugging` for more information about the remote debugging
2021
mechanism.
0 commit comments