Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #46348
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2013-05-28 16:04 -0700 |
| References | <mailman.2317.1369770400.3114.python-list@python.org> |
| Message-ID | <aabfb355-7210-44a5-9576-357bc82abb47@googlegroups.com> (permalink) |
| Subject | Re: Python #ifdef |
| From | 88888 Dihedral <dihedral88888@gmail.com> |
Carlos Nepomuceno於 2013年5月29日星期三UTC+8上午3時46分37秒寫道: > Are there Python 'preprocessor directives'? > > I'd like to have something like '#ifdef' to mix code from Python 2 and 3 in a single file. > > Is that possible? How? Use execfile(filename) at the beginning to get what you want. The .pyc version is preferred.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Python #ifdef Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-28 22:46 +0300 Re: Python #ifdef 88888 Dihedral <dihedral88888@gmail.com> - 2013-05-28 16:04 -0700
csiph-web