Message75296
| Author | gpolo |
|---|---|
| Recipients | exarkun, gpolo |
| Date | 2008-10-28.17:43:54 |
| SpamBayes Score | 9.112105e-06 |
| Marked as misclassified | No |
| Message-id | <1225215835.44.0.0766994804455.issue4223@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
Well anyway, some sample code:
import zipfile
z = zipfile.ZipFile('aaa.zip', mode='w')
z.writestr('aa.py', 'def x(): print "hi there"\n\ndef y(): print "hi"')
z.close()
and then:
import sys
import inspect
sys.path.append('aaa.zip')
import aa
inspect.getsource(aa.x)
inspect.getsource(aa.y)
Doesn't that work for you ? |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008-10-28 17:43:55 | gpolo | set | recipients: + gpolo, exarkun |
| 2008-10-28 17:43:55 | gpolo | set | messageid: <1225215835.44.0.0766994804455.issue4223@psf.upfronthosting.co.za> |
| 2008-10-28 17:43:54 | gpolo | link | issue4223 messages |
| 2008-10-28 17:43:54 | gpolo | create | |