SourceForge logo
SourceForge logo
Menu

matplotlib-devel

From: Benjamin R. <ben...@ou...> - 2012年07月19日 19:25:27
Working on my refactor of axes.py, I needed to use defaultdict and possibly
OrderedDict from the collections standard module. Problem is that
matplotlib already has a collections.py module in lib/matplotlib. This
file takes precedence in the import process and gets in my way. Does
anybody know of any way to force the import to do what I want? This has
completely stumped me.
Thanks,
Ben Root
From: Eric F. <ef...@ha...> - 2012年07月19日 19:32:45
On 07/19/2012 09:24 AM, Benjamin Root wrote:
> Working on my refactor of axes.py, I needed to use defaultdict and
> possibly OrderedDict from the collections standard module. Problem is
> that matplotlib already has a collections.py module in lib/matplotlib.
> This file takes precedence in the import process and gets in my way.
> Does anybody know of any way to force the import to do what I want?
> This has completely stumped me.
Looking at http://www.python.org/dev/peps/pep-0328/ it appears that for 
2.6 and later, using
from __future__ import absolute_import
should cause "import collections" to refer to the standard library.
Eric
>
> Thanks,
> Ben Root
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>
>
>
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
From: Benjamin R. <ben...@ou...> - 2012年07月19日 19:37:42
On Thu, Jul 19, 2012 at 2:32 PM, Eric Firing <ef...@ha...> wrote:
> On 07/19/2012 09:24 AM, Benjamin Root wrote:
> > Working on my refactor of axes.py, I needed to use defaultdict and
> > possibly OrderedDict from the collections standard module. Problem is
> > that matplotlib already has a collections.py module in lib/matplotlib.
> > This file takes precedence in the import process and gets in my way.
> > Does anybody know of any way to force the import to do what I want?
> > This has completely stumped me.
>
> Looking at http://www.python.org/dev/peps/pep-0328/ it appears that for
> 2.6 and later, using
>
> from __future__ import absolute_import
>
> should cause "import collections" to refer to the standard library.
>
> Eric
>
>
Good to know. But aren't we supporting 2.5, or did we decide on 2.6?
Ben
From: Eric F. <ef...@ha...> - 2012年07月19日 19:46:06
On 07/19/2012 09:37 AM, Benjamin Root wrote:
>
>
> On Thu, Jul 19, 2012 at 2:32 PM, Eric Firing <ef...@ha...
> <mailto:ef...@ha...>> wrote:
>
> On 07/19/2012 09:24 AM, Benjamin Root wrote:
> > Working on my refactor of axes.py, I needed to use defaultdict and
> > possibly OrderedDict from the collections standard module.
> Problem is
> > that matplotlib already has a collections.py module in
> lib/matplotlib.
> > This file takes precedence in the import process and gets in my way.
> > Does anybody know of any way to force the import to do what I want?
> > This has completely stumped me.
>
> Looking at http://www.python.org/dev/peps/pep-0328/ it appears that for
> 2.6 and later, using
>
> from __future__ import absolute_import
>
> should cause "import collections" to refer to the standard library.
>
> Eric
>
>
> Good to know. But aren't we supporting 2.5, or did we decide on 2.6?
 >=2.6 only from now on. This is so that we can support 3.2+ in the 
same codebase.
Eric
>
> Ben
>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /