Relative imports only work with the "from ... import ..." form.
— SpaghettiToastBook
On Mon, Jul 1, 2013 at 3:54 PM, Tobiah wrote:
>> Are you familiar with absolute and relative imports:
>> http://docs.python.org/release/2.5/whatsnew/pep-328.html
>
>
> Doesn't seem to work:
>
> Python 2.7.3 (de
Steven D'Aprano writes:
> On Mon, 01 Jul 2013 14:38:50 -0700, rusi wrote:
>> 2. The __future__ is not necessary in python 2.7 [Not necessary or not
>> allowed I not know :-) ]
>
> Not necessary.
IIRC that it is needed, to solve the OP problem: one thing is the
syntax, which under Python 2.7 is e
On 1 Jul 2013 20:58, "Tobiah" wrote:
>>
>> Are you familiar with absolute and relative imports:
>> http://docs.python.org/release/2.5/whatsnew/pep-328.html
>
>
> Doesn't seem to work:
>
> Python 2.7.3 (default, May 10 2012, 13:31:18)
> [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)] on linux2
> Type "help", "
On Mon, 01 Jul 2013 14:38:50 -0700, rusi wrote:
> On Tuesday, July 2, 2013 1:24:30 AM UTC+5:30, Tobiah wrote:
>> > Are you familiar with absolute and relative imports:
>> > http://docs.python.org/release/2.5/whatsnew/pep-328.html
>>
>> Doesn't seem to work:
>> Python 2.7.3 (default, May 10 2012,
On Tuesday, July 2, 2013 1:24:30 AM UTC+5:30, Tobiah wrote:
> > Are you familiar with absolute and relative imports:
> > http://docs.python.org/release/2.5/whatsnew/pep-328.html
>
> Doesn't seem to work:
> Python 2.7.3 (default, May 10 2012, 13:31:18)
> [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)] on linux
Are you familiar with absolute and relative imports:
http://docs.python.org/release/2.5/whatsnew/pep-328.html
Doesn't seem to work:
Python 2.7.3 (default, May 10 2012, 13:31:18)
[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
On Monday, July 1, 2013 11:59:35 PM UTC+5:30, Tobiah wrote:
> So today, I created a file called 'formatter.py',
> and my program broke. It turned out that I was
> also import 'gluon' from web2py, which in turn,
> somewhere, imported the regular python formatter.py
> with which I was not familiar.
So today, I created a file called 'formatter.py',
and my program broke. It turned out that I was
also import 'gluon' from web2py, which in turn,
somewhere, imported the regular python formatter.py
with which I was not familiar.
So the question is: Does one simply always have
to be knowledgeable