Re: How to import other modules from my own code?

2013-06-30 Thread Steffen Macke
Hi Bao, On 30.06.2013 03:56, Bao Niu wrote: dia_rotate.py is located in Home/.dia/python . The code doesn't work. If I try importing from the python console, it simply gives me an ImportError, simply can't find them. What should I do to import it? That's strange. Have you checked that your

Re: How to import other modules from my own code?

2013-06-30 Thread Bao Niu
I found out the problem, it was me. I threw in some Python 3 specific idiom into the original source and that prevented it from being loaded correctly. My fault. Now it is solved as soon as I tried the original one. Thank you very much Steffen, for your detailed help. On Sun, Jun 30, 2013 at

How to import other modules from my own code?

2013-06-29 Thread Bao Niu
I wanted to import dia_rotate.py from my own code. I wrote this as the beginning of my code: import dia import dia_rotate class ModKeys: .. dia_rotate.py is located in Home/.dia/python . The code doesn't work. If I try importing from the python console, it simply gives me an