Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #46328 > unrolled thread
| Started by | Carlos Nepomuceno <carlosnepomuceno@outlook.com> |
|---|---|
| First post | 2013-05-28 22:46 +0300 |
| Last post | 2013-05-28 16:04 -0700 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.python
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
| From | Carlos Nepomuceno <carlosnepomuceno@outlook.com> |
|---|---|
| Date | 2013-05-28 22:46 +0300 |
| Subject | Python #ifdef |
| Message-ID | <mailman.2317.1369770400.3114.python-list@python.org> |
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?
[toc] | [next] | [standalone]
| From | 88888 Dihedral <dihedral88888@gmail.com> |
|---|---|
| Date | 2013-05-28 16:04 -0700 |
| Message-ID | <aabfb355-7210-44a5-9576-357bc82abb47@googlegroups.com> |
| In reply to | #46328 |
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.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web