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.