Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #47704
| X-Received | by 10.224.200.202 with SMTP id ex10mr11738413qab.8.1370985935798; Tue, 11 Jun 2013 14:25:35 -0700 (PDT) |
|---|---|
| X-Received | by 10.49.39.196 with SMTP id r4mr951421qek.8.1370985935781; Tue, 11 Jun 2013 14:25:35 -0700 (PDT) |
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!ch1no4098727qab.0!news-out.google.com!y6ni1724qax.0!nntp.google.com!ch1no4098723qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.lang.python |
| Date | Tue, 11 Jun 2013 14:25:35 -0700 (PDT) |
| In-Reply-To | <b1ouhdF70r8U1@mid.individual.net> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=192.111.68.75; posting-account=JmeKMgoAAABECkkccvjSCwzIdz7Y_ZwK |
| NNTP-Posting-Host | 192.111.68.75 |
| References | <0bfe7bee-3df2-4fb8-8aad-c2124792b8b6@googlegroups.com> <mailman.2987.1370897988.3114.python-list@python.org> <a0902635-60ca-4c93-a296-88f1740ac8fe@googlegroups.com> <mailman.2990.1370903766.3114.python-list@python.org> <e0a8943b-d851-491d-ad88-5fe1c7241e09@googlegroups.com> <b1ouhdF70r8U1@mid.individual.net> |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <3391a098-22e1-4d8b-a360-939fb4e77b74@googlegroups.com> (permalink) |
| Subject | Re: py_compile vs. built-in compile, with __future__ |
| From | dhyams <dhyams@gmail.com> |
| Injection-Date | Tue, 11 Jun 2013 21:25:35 +0000 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Xref | csiph.com comp.lang.python:47704 |
Show key headers only | View raw
On Tuesday, June 11, 2013 11:37:17 AM UTC-4, Neil Cerutti wrote: > On 2013-06-10, dhyams <dhyams@gmail.com> wrote: > > > On Monday, June 10, 2013 6:36:04 PM UTC-4, Chris Angelico wrote: > > >> Can you read the file into a string, prepend a future directive, and > > >> > > >> then compile the string? > > > > > > Technically yes, except that now there is complication of > > > writing the modified module back to a file so that I can still > > > use py_compile.compile() to byte compile that code. > > > > You would use StringIO instead of writing a temp file. > I don't think that would work...py_compile takes a filename as input, not a file object.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
py_compile vs. built-in compile, with __future__ dhyams <dhyams@gmail.com> - 2013-06-10 08:33 -0700
Re: py_compile vs. built-in compile, with __future__ Terry Jan Reedy <tjreedy@udel.edu> - 2013-06-10 16:59 -0400
Re: py_compile vs. built-in compile, with __future__ dhyams <dhyams@gmail.com> - 2013-06-10 15:27 -0700
Re: py_compile vs. built-in compile, with __future__ Chris Angelico <rosuav@gmail.com> - 2013-06-11 08:36 +1000
Re: py_compile vs. built-in compile, with __future__ dhyams <dhyams@gmail.com> - 2013-06-10 16:31 -0700
Re: py_compile vs. built-in compile, with __future__ Neil Cerutti <neilc@norwich.edu> - 2013-06-11 15:37 +0000
Re: py_compile vs. built-in compile, with __future__ dhyams <dhyams@gmail.com> - 2013-06-11 14:25 -0700
Re: py_compile vs. built-in compile, with __future__ Neil Cerutti <neilc@norwich.edu> - 2013-06-12 13:30 +0000
csiph-web