Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #95450
| Path | csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.ag!87.79.20.101.MISMATCH!newsreader4.netcologne.de!news.netcologne.de!bcyclone01.am1.xlned.com!bcyclone01.am1.xlned.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail |
|---|---|
| Return-Path | <srkunze@mail.de> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.069 |
| X-Spam-Evidence | '*H*': 0.86; '*S*': 0.00; 'subject:Python': 0.05; 'url:github': 0.09; 'thread': 0.10; 'interpreter': 0.15; 'magic': 0.16; 'running:': 0.16; 'import': 0.24; 'module': 0.25; 'header :User-Agent:1': 0.26; 'idea': 0.28; 'somebody': 0.30; 'run': 0.33; 'this?': 0.34; 'received:10.0': 0.34; 'best,': 0.35; 'i.e.': 0.35; 'beginning': 0.36; 'to:addr:python-list': 0.36; 'received:10': 0.37; 'things': 0.38; 'hi,': 0.38; 'test': 0.39; 'does': 0.39; 'to:addr:python.org': 0.40; 'received:de': 0.40; 'great': 0.63; 'hand': 0.82; 'subject:Import': 0.84; 'dirty': 0.93 |
| Date | Tue, 18 Aug 2015 00:26:33 +0200 |
| From | "Sven R. Kunze" <srkunze@mail.de> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Python Import Hooks and __main__ |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-purgate | clean |
| X-purgate | This mail is considered clean (visit http://www.eleven.de for further information) |
| X-purgate-type | clean |
| X-purgate-Ad | Categorized by eleven eXpurgate (R) http://www.eleven.de |
| X-purgate | This mail is considered clean (visit http://www.eleven.de for further information) |
| X-purgate | clean |
| X-purgate-size | 580 |
| X-purgate-ID | 154282::1439850395-00000883-F47E6B83/0/0 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.66.1439850402.4764.python-list@python.org> (permalink) |
| Lines | 16 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1439850402 news.xs4all.nl 26622 [2001:888:2000:d::a6]:48840 |
| X-Complaints-To | abuse@xs4all.nl |
| X-Received-Bytes | 3019 |
| X-Received-Body-CRC | 2720563455 |
| Xref | csiph.com comp.lang.python:95450 |
Show key headers only | View raw
Hi, following up on this thread on StackOverflow http://stackoverflow.com/questions/16515347/python-import-hooks-and-main does somebody has a great idea how to manage this? The issue at hand is, that I would like to apply a specific import hook right from the beginning of the interpreter run (here, a simple test case), i.e. also affecting the import/exec of the module __main__. Hook: https://github.com/srkunze/fork/blob/2e7ecd4b0a/fork.py#L429 Dirty Magic to get things running: https://github.com/srkunze/fork/blob/2e7ecd4b0a/fork.py#L425 Best, Sven
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Python Import Hooks and __main__ "Sven R. Kunze" <srkunze@mail.de> - 2015-08-18 00:26 +0200
csiph-web