Re: how to run python2.6 module with absolute imports stand alone

2012-09-10 Thread Jean-Michel Pichavant
Gelonida N wrote: On 09/08/2012 02:13 AM, Mark Lawrence wrote: [snip] I hope this helps http://stackoverflow.com/questions/3616952/how-to-properly-use-relative-or-absolute-imports-in-python-modules It seems the safest bet seems to be to not use relative imports. That's what I figured as

Re: how to run python2.6 module with absolute imports stand alone

2012-09-08 Thread Gelonida N
On 09/08/2012 02:13 AM, Mark Lawrence wrote: On 07/09/2012 23:04, Gelonida N wrote: Hi, many of my modules contain following section at the end def main(): do_something() if __name__ == '__main__': main() This allows me to run some basic example code or some small test in a stand a

Re: how to run python2.6 module with absolute imports stand alone

2012-09-07 Thread Mark Lawrence
On 07/09/2012 23:04, Gelonida N wrote: Hi, many of my modules contain following section at the end def main(): do_something() if __name__ == '__main__': main() This allows me to run some basic example code or some small test in a stand alone mode. My new modules contain following

how to run python2.6 module with absolute imports stand alone

2012-09-07 Thread Gelonida N
Hi, many of my modules contain following section at the end def main(): do_something() if __name__ == '__main__': main() This allows me to run some basic example code or some small test in a stand alone mode. My new modules contain following line at the beginning: from __future__ im