<p></p>
<p>IDLE will have the <code>sample</code> module already loaded and as it passes its <code>sys.modules</code> to the subprocess that runs <code>test.py</code> it is found.</p>
<p>You will probably find that it will not work outside Idle anywhere, eg at the command line, if <code>test.py</code> is run from <code>Desktop</code>.  Thats not a Geany thing, its how Python works.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/2631#issuecomment-713891023">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ3Z3PBX4XOP7VMTJZ3SL5H2XANCNFSM4SZZQ6DA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAIOWJ2UEI56DWUH24A7ODLSL5H2XA5CNFSM4SZZQ6DKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFKGRZTY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/issues/2631#issuecomment-713891023",
"url": "https://github.com/geany/geany/issues/2631#issuecomment-713891023",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>