Re: How to import module whose filename starts number

2012-12-12 Thread Benjamin Kaplan
On Dec 12, 2012 9:47 AM, "Yong Hu" wrote: > > I have a few scripts whose file names start with numbers. For example, 01_step1.py, 02_step2.py > > I tried to import them in another script by "import 01_step1" or "from 01_step1 import *". Both failed, saying "SyntaxError: invalid syntax" > > Is ther

Re: How to import module whose filename starts number

2012-12-12 Thread Peter Otten
Yong Hu wrote: > I have a few scripts whose file names start with numbers. For example, > 01_step1.py, 02_step2.py > > I tried to import them in another script by "import 01_step1" or "from > 01_step1 import *". Both failed, saying "SyntaxError: invalid syntax" > > Is there anyway to import thos

Re: How to import module whose filename starts number

2012-12-12 Thread Dave Angel
On 12/12/2012 12:42 PM, Yong Hu wrote: > I have a few scripts whose file names start with numbers. For example, > 01_step1.py, 02_step2.py > > I tried to import them in another script by "import 01_step1" or "from > 01_step1 import *". Both failed, saying "SyntaxError: invalid syntax" > > Is ther