Mailing List Archive

XML-toolkit for Windows - binaries available?
Hi,

I'm trying to install the XML-toolkit on Python 1.5.2 / Win95. I see
on the "Installing the XML Toolkit" page
(http://www.python.org/doc/howto/xml/node4.html), that a pre-compiled
version is soon-to-be-available.

Can anyone help me out in installing from the standard distribution?
I don't have a C-compiler on my system, but I do have nmake/dmake.

TIA,
Leeb.
XML-toolkit for Windows - binaries available? [ In reply to ]
* Lee Borkman
|
| Can anyone help me out in installing from the standard distribution?
| I don't have a C-compiler on my system, but I do have nmake/dmake.

I think the web page is out of date, since the /xml/windows directory
in the CVS does contain the .dll files for pyexpat and sgmlop (and has
done for quite a while). So just download the ZIP file and they should
be there.

If not, send me an email and I'll send them to you.

--Lars M.
XML-toolkit for Windows - binaries available? [ In reply to ]
On 16 Jun 1999 09:41:34 +0200, Lars Marius Garshol <larsga@ifi.uio.no>
wrote:

>
>* Lee Borkman
>|
>| Can anyone help me out in installing from the standard distribution?
>| I don't have a C-compiler on my system, but I do have nmake/dmake.
>
>I think the web page is out of date, since the /xml/windows directory
>in the CVS does contain the .dll files for pyexpat and sgmlop (and has
>done for quite a while). So just download the ZIP file and they should
>be there.
>
>If not, send me an email and I'll send them to you.
>
The binaries are there but a bit of fiddling is required to
get things working. (This is from memory but here goes)

The pyexpat and sgmlop dlls have to be copied into the
xml/parsers subdirectory. You also need to edit the
__init__.py file to include 'pyexpat' and 'sgmlop' in
the __all__ string.

Pyexpat requires xmlparse.dll. This dll needs to be
on your path.

I *think* that is what I did to get it all working:-)

Hope it helps,
Sean
XML-toolkit for Windows - binaries available? [ In reply to ]
* Sean Mc Grath
|
| The binaries are there but a bit of fiddling is required to get
| things working. (This is from memory but here goes)
|
| The pyexpat and sgmlop dlls have to be copied into the xml/parsers
| subdirectory. You also need to edit the __init__.py file to include
| 'pyexpat' and 'sgmlop' in the __all__ string.

Heh. I didn't know you could do this! :)

I just put them in the python/dlls directory, and that worked for me.

--Lars M.
XML-toolkit for Windows - binaries available? [ In reply to ]
On 16 Jun 1999 23:05:38 +0200, Lars Marius Garshol <larsga@ifi.uio.no>
wrote:

>
>* Sean Mc Grath
>|
>| The binaries are there but a bit of fiddling is required to get
>| things working. (This is from memory but here goes)
>|
>| The pyexpat and sgmlop dlls have to be copied into the xml/parsers
>| subdirectory. You also need to edit the __init__.py file to include
>| 'pyexpat' and 'sgmlop' in the __all__ string.
>
>Heh. I didn't know you could do this! :)
>
>I just put them in the python/dlls directory, and that worked for me.
>
Lars, is quite right. python/dlls is a better place to put them than
xml/parsers.

Sean
XML-toolkit for Windows - binaries available? [ In reply to ]
Thanks very much, but I'm afraid I'm still unsure.

I have copied pyexpat.dll and sgmlop.dll to the DLLs directory

I have modified the PythonPath to include:
C:\Program Files\Python\Lib\xml-0.5.1
and:
C:\Program Files\Python\Lib\xml-0.5.1\expat\bin
(this is where xmlparse.dll lives)

Now I have to edit __init__.py to include sgmlop and pyexpat in the
__all__ list, is that right? Now which __init__.py would that be? I
assume it's C:\Program Files\Python\Lib\xml-0.5.1\__init__.py

Okay, I've done that.

But none of the demos will work. I keep getting:
ImportError: No module named xml.sax
or:
ImportError: No module named pyversioncheck


I guess I still don't understand where Python (and PythonWin) look for
their modules, and I guess I don't understand quite a bit of other
stuff.

Thanks very much for all of your help. I've obviously got a bit more
homework to do before I proceed.

Leeb.



On Thu, 17 Jun 1999 17:43:22 GMT, digitome@iol.ie (Sean Mc Grath)
wrote:

>On 16 Jun 1999 23:05:38 +0200, Lars Marius Garshol <larsga@ifi.uio.no>
>wrote:
>
>>
>>* Sean Mc Grath
>>|
>>| The binaries are there but a bit of fiddling is required to get
>>| things working. (This is from memory but here goes)
>>|
>>| The pyexpat and sgmlop dlls have to be copied into the xml/parsers
>>| subdirectory. You also need to edit the __init__.py file to include
>>| 'pyexpat' and 'sgmlop' in the __all__ string.
>>
>>Heh. I didn't know you could do this! :)
>>
>>I just put them in the python/dlls directory, and that worked for me.
>>
>Lars, is quite right. python/dlls is a better place to put them than
>xml/parsers.
>
>Sean
>
>
>
XML-toolkit for Windows - binaries available? [ In reply to ]
* Lee Borkman
|
| Now I have to edit __init__.py to include sgmlop and pyexpat in the
| __all__ list, is that right? Now which __init__.py would that be?
| I assume it's C:\Program Files\Python\Lib\xml-0.5.1\__init__.py

I haven't done this, and I don't think you need to do it unless you
care what the result of

import xml
dir(xml)

is.

| But none of the demos will work. I keep getting:
| ImportError: No module named xml.sax
| or:
| ImportError: No module named pyversioncheck
|
|
| I guess I still don't understand where Python (and PythonWin) look for
| their modules, and I guess I don't understand quite a bit of other
| stuff.

It sounds like you haven't set your PYTHONPATH. This is an environment
variable with a list of ';'-separated directories, but you can also
set it in the registry under HKEY_LOCAL_MACHINE\Software\Python

Make sure you include C:\Program Files\Python\Lib\xml-0.5.1\ in that
list.

--Lars M.
XML-toolkit for Windows - binaries available? [ In reply to ]
On Mon, 21 Jun 1999 02:51:07 GMT, borkman@usa.net (Lee Borkman) wrote:

>Thanks very much, but I'm afraid I'm still unsure.
>
>I have copied pyexpat.dll and sgmlop.dll to the DLLs directory
>
>I have modified the PythonPath to include:
>C:\Program Files\Python\Lib\xml-0.5.1
>and:
>C:\Program Files\Python\Lib\xml-0.5.1\expat\bin
> (this is where xmlparse.dll lives)
>
Ah! I think this is part of your problem. the XML package
is a python module and uses commands like:-

from xml.parsers import pyexpat

To get this to work you need the xml package to be in a
subdirectory called xml. I renamed my xml-0.5.1 to be
xml and put in beneath my main Python directory. i,e,
c:\program files\Python\xml

The directory "c:\program files\python" is in my PythonPath variable
and so "import xml.parsers" finds what it wants in
c:\program files\Python\xml\parsers


>Now I have to edit __init__.py to include sgmlop and pyexpat in the
>__all__ list, is that right? Now which __init__.py would that be? I
>assume it's C:\Program Files\Python\Lib\xml-0.5.1\__init__.py
>

The one to edit is the one in the parsers subdirectory.