finding python modules

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • python newbie

    finding python modules

    Guys,
    Very beginner question.
    I'm importing xml.dom.minidom at the top of my file.

    I'm trying to figure out where the heck this is. According to Quick Python,
    there should be folders on my drive
    (using XP), under c:\python23, named xml, then underneath: dom, etc. But
    there isn't.

    I know that xml.dom.minidom is not built into sys.built_modul e_names,
    cuz I viewed this variable under IDLE.

    Could you tell me how Python finds this hierarchy?

    ( the reason for this knowledge is to figure out how to add XML_Objectify
    to my path, but I'm trying to do it myself)

    Thank you
    Steve


  • Jay Dorsey

    #2
    Re: finding python modules

    On Sun, Dec 07, 2003 at 12:54:06AM +0000, python newbie wrote:[color=blue]
    > Guys,
    > Very beginner question.
    > I'm importing xml.dom.minidom at the top of my file.
    >
    > I'm trying to figure out where the heck this is. According to Quick Python,
    > there should be folders on my drive
    > (using XP), under c:\python23, named xml, then underneath: dom, etc. But
    > there isn't.[/color]

    You missed one folder under the python folder: Lib. Full path should
    resemble something like:

    C:\Python23\Lib \xml

    Sometimes you can also find modules installed in the site-packages directory
    underneath the lib folder.



    --
    Jay Dorsey
    jay at jaydorsey dot com

    Comment

    • Levente Sandor

      #3
      Re: finding python modules

      >>> import xml.dom.minidom[color=blue][color=green][color=darkred]
      >>> xml.dom.minidom .__file__[/color][/color][/color]

      '/usr/local/lib/python2.3/xml/dom/minidom.pyc'

      ----
      levi

      Jay Dorsey <jay@jaydorsey. com> wrote in message news:<mailman.1 78.1070767129.1 6879.python-list@python.org >...[color=blue]
      > On Sun, Dec 07, 2003 at 12:54:06AM +0000, python newbie wrote:[color=green]
      > > Guys,
      > > Very beginner question.
      > > I'm importing xml.dom.minidom at the top of my file.
      > >
      > > I'm trying to figure out where the heck this is. According to Quick Python,
      > > there should be folders on my drive
      > > (using XP), under c:\python23, named xml, then underneath: dom, etc. But
      > > there isn't.[/color]
      >
      > You missed one folder under the python folder: Lib. Full path should
      > resemble something like:
      >
      > C:\Python23\Lib \xml
      >
      > Sometimes you can also find modules installed in the site-packages directory
      > underneath the lib folder.[/color]

      Comment

      Working...