Re: [Tutor] Question on "import foobar" vs "from foobar import *"

2010-01-10 Thread Eric Pavey
On Sat, Jan 9, 2010 at 9:08 PM, Lie Ryan wrote: > On 1/10/2010 11:23 AM, Eric Pavey wrote: > >> I should add (that as I understand it), when you do a 'from foo import >> blah', or 'from foo import *', this is doing a /copy/ (effectively) of >> that mo

Re: [Tutor] Question on "import foobar" vs "from foobar import *"

2010-01-09 Thread Eric Pavey
I should add (that as I understand it), when you do a 'from foo import blah', or 'from foo import *', this is doing a *copy* (effectively) of that module's attributes into the current namespace. Doing "import foo" or "import foo as goo" is keeping a *reference *to the imported module rather than a

Re: [Tutor] Python at my work

2009-12-03 Thread Eric Pavey
On Thu, Dec 3, 2009 at 10:13 AM, Steve Bricker wrote: > We have Python applications for work with testing reports printed to PDF > files. Don't know if you have that needed. > > Steve Bricker > Now blogging at srbricker.blogspot.com > > On Thu 09/12/03 11:46 , skrab...@comcast.net sent: > > My de

Re: [Tutor] Querying a packages modules?

2009-11-20 Thread Eric Pavey
On Fri, Nov 20, 2009 at 12:28 PM, Kent Johnson wrote: > On Fri, Nov 20, 2009 at 3:05 PM, Dave Angel wrote: > > Eric Pavey wrote: > > >> lol, in usual fashion, after I hack through it, while in the docs, I > find > >> the 'fancy' solution: >

Re: [Tutor] Querying a packages modules?

2009-11-20 Thread Eric Pavey
On Fri, Nov 20, 2009 at 10:58 AM, Eric Pavey wrote: > On Fri, Nov 20, 2009 at 10:40 AM, Dave Angel wrote: > >> Eric Pavey wrote: >> >>> On Fri, Nov 20, 2009 at 4:09 AM, Kent Johnson wrote: >>> >>> >>> >>>> On Thu, Nov 19, 2

Re: [Tutor] Querying a packages modules?

2009-11-20 Thread Eric Pavey
On Fri, Nov 20, 2009 at 10:40 AM, Dave Angel wrote: > Eric Pavey wrote: > >> On Fri, Nov 20, 2009 at 4:09 AM, Kent Johnson wrote: >> >> >> >>> On Thu, Nov 19, 2009 at 9:31 PM, Eric Pavey wrote: >>> >>> >>>> Say

Re: [Tutor] Querying a packages modules?

2009-11-20 Thread Eric Pavey
On Fri, Nov 20, 2009 at 4:09 AM, Kent Johnson wrote: > On Thu, Nov 19, 2009 at 9:31 PM, Eric Pavey wrote: > > Say I have this package layout > > > > \myPackage > > > > __init__.py > > moduleA.py > > moduleB.py > > > > Is there a way

[Tutor] Querying a packages modules?

2009-11-19 Thread Eric Pavey
Say I have this package layout - \myPackage - __init__.py - moduleA.py - moduleB.py Is there a way (and I'm sure there is...) to query, for a given package level, which modules live under it? I thought I could do it like so: import myPackage goodQualityInfo = dir(myPackage) Th

Re: [Tutor] Querying a module's package path?

2009-11-11 Thread Eric Pavey
> > Eric Pavey wrote: >> >>> Presume I have a package 'a' like this: >>> >>>* /pystuff (added to sys.path) >>> o /a (start of my package) >>> >>>+ __init__.py >>>+ /b

Re: [Tutor] Querying a module's package path?

2009-11-11 Thread Eric Pavey
On Tue, Nov 10, 2009 at 11:15 PM, Lie Ryan wrote: > Eric Pavey wrote: > >> Presume I have a package 'a' like this: >> >>* /pystuff (added to sys.path) >> o /a (start of my package) >> >>+ __init__.py >>

[Tutor] Querying a module's package path?

2009-11-10 Thread Eric Pavey
Presume I have a package 'a' like this: - /pystuff (added to sys.path) - /a (start of my package) - __init__.py - /b - __init__.py - module.py to import module.py: import *a.b.module* What I'm trying to find is a way to query exactly what I typed ab

Re: [Tutor] parsing XML

2009-11-09 Thread Eric Pavey
On Mon, Nov 9, 2009 at 7:48 PM, Christopher Spears wrote: > Hi! > > I need to parse several XML documents into a Python dictionary. Is there a > module that would be particularly good for this? I heard beginners should > start with ElementTree. However, SAX seems to make a little more sense to