From Thomas.Boor at ticketcorner.com Thu Jun 1 17:46:24 2006 From: Thomas.Boor at ticketcorner.com (Boor Thomas) Date: Thu, 1 Jun 2006 17:46:24 +0200 Subject: [XML-SIG] can' freeze _xmlplus's expat Message-ID: <8969E1A4ACD9A544A407BA157C7CBBBC12DEC0@chrmlexh001.tc.corp> hi there, i'm using _xmlplus in a webservice application and it runs fine - unless i try to freeze it (under M$-Windows-XP) if i freeze the application, i get the wellknown exception parser = xml.sax.make_parser() File "xml\sax\sax2exts.pyo", line 37, in make_parser File "xml\sax\saxexts.pyo", line 77, in make_parser xml.sax._exceptions.SAXReaderNotAvailable: No parsers found i googled around to get the solution, but i just found the suggestion, to include xml.sax.drivers2.drv_pyexpat in the py2exe-call. (didn't fix the problem) havy you got any idea? thanks a lot in advance thomas Ticketcorner GmbH Thomas Boor Software Development Nehringstrasse 2 D-61352 Bad Homburg Deutschland Telefon +49 (0)6172 101 7204 Telefax +49 (0)6172 101 7101 thomas.boor at ticketcorner.com Lust auf Events? Tickets hier! www.ticketcorner.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/xml-sig/attachments/20060601/25fdfa1f/attachment.htm From szybalski at gmail.com Thu Jun 1 22:23:18 2006 From: szybalski at gmail.com (Lukasz Szybalski) Date: Thu, 1 Jun 2006 15:23:18 -0500 Subject: [XML-SIG] [pyxml][doc][5.1] Clarification request Message-ID: <804e5c70606011323j3d080428m4f9c22769dbabcfd@mail.gmail.com> pyxml basics http://pyxml.sourceforge.net/topics/howto/node12.html I am following pyxml doc in hope to quickly grasp functions and classes available in pyxml. _________ starting out: >>> from xml.sax import saxutils >>> class FindIssue(saxutils.DefaultHandler): ... def __init__(self,title,number): ... self.search_title, self.search_number = title, number ... Traceback (most recent call last): File "", line 1, in ? AttributeError: 'module' object has no attribute 'DefaultHandler' 1. What exactly above class will do? How do i fix it to not give me an error? Doc states. "The DefaultHandler class inherits from all four interfaces: ContentHandler, DTDHandler, EntityResolver, and ErrorHandler. This (this = ContentHandler or ?) is what you should use if you want to just write a single class that wraps up all the logic for your parsing." 2. Do you mean that Default Handler should be substituted with ContentHandler? What exactly should i do? Doc next states... "You could also subclass each interface individually and implement separate classes for each purpose." 3. Do you mean : you can create a class or a subclass for your specific element or node? I don't know what we are trying to do here. I though we want to extract one or all of the elements from Neil Gaiman Glyn Dillon Charles Vess 4. How do we use startElement? startElement('comic','62') Traceback (most recent call last): File "", line 1, in ? TypeError: startElement() takes exactly 3 arguments (2 given) Then running the code ...... from xml.sax import make_parser from xml.sax.handler import feature_namespaces if __name__ == '__main__': # Create a parser parser = make_parser().......... Doc states: "Once you've created a parser instance, calling the setContentHandler() method tells the parser what to use as the content handler." 5. How do you do create parser instance by calling setContentHandler()?? At the end doc says. If you run the above code with the sample XML document, it'll print Sandman #62 found. 6. Which above code do you run, and how? Thank you lucas From sanaz_p1979 at yahoo.com Sat Jun 3 09:40:21 2006 From: sanaz_p1979 at yahoo.com (sanaz pezeshky) Date: Sat, 3 Jun 2006 00:40:21 -0700 (PDT) Subject: [XML-SIG] XML attributes Message-ID: <20060603074022.71370.qmail@web55014.mail.re4.yahoo.com> Hi I have created an XML file through Python( using xml.dom ),but all the attributes of a tag are listed in one line. How can I put each one of these attributes in a new line? Does anybody have any related example? thanks --------------------------------- How low will we go? Check out Yahoo! Messenger?s low PC-to-Phone call rates. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/xml-sig/attachments/20060603/51bb92b2/attachment.html From dieter at handshake.de Sat Jun 3 13:33:50 2006 From: dieter at handshake.de (Dieter Maurer) Date: Sat, 3 Jun 2006 13:33:50 +0200 Subject: [XML-SIG] can' freeze _xmlplus's expat In-Reply-To: <8969E1A4ACD9A544A407BA157C7CBBBC12DEC0@chrmlexh001.tc.corp> References: <8969E1A4ACD9A544A407BA157C7CBBBC12DEC0@chrmlexh001.tc.corp> Message-ID: <17537.29598.738204.635739@gargle.gargle.HOWL> Boor Thomas wrote at 2006-6-1 17:46 +0200: >i'm using _xmlplus in a webservice application and it runs fine - unless >i try to freeze it (under M$-Windows-XP) "expat" is a "dll". As a "dll", it cannot be frozen but must be distributed separately. You might find the "Dllimporter" useful. You can get it from my python page -- Dieter From supreet.sethi at gmail.com Mon Jun 5 12:20:17 2006 From: supreet.sethi at gmail.com (Supreet Sethi) Date: Mon, 5 Jun 2006 15:50:17 +0530 Subject: [XML-SIG] xsd validator Message-ID: Hi, Is there a good xsd validator in python. Which I could also call programatically regards supreet -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/xml-sig/attachments/20060605/410a12e7/attachment.html From ht at inf.ed.ac.uk Tue Jun 6 11:49:47 2006 From: ht at inf.ed.ac.uk (Henry S. Thompson) Date: Tue, 06 Jun 2006 10:49:47 +0100 Subject: [XML-SIG] xsd validator In-Reply-To: (Supreet Sethi's message of "Mon, 5 Jun 2006 15:50:17 +0530") References: Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 XSV [1] is written in Python (uses the LT XML low-level XML library). ht [1] http://www.ltg.ed.ac.uk/~ht/xsv-status.html - -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh Half-time member of W3C Team 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440 Fax: (44) 131 650-4587, e-mail: ht at inf.ed.ac.uk URL: http://www.ltg.ed.ac.uk/~ht/ [mail really from me _always_ has this .sig -- mail without it is forged spam] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQFEhU+7kjnJixAXWBoRArRpAJ49QHjz0PeLkCD7yO6iMOzn1riX8ACdE0u7 9BGkcvqXUPk/+i7UK/vQIJk= =zHSB -----END PGP SIGNATURE----- From mike at skew.org Thu Jun 1 23:34:44 2006 From: mike at skew.org (Mike Brown) Date: Thu, 1 Jun 2006 15:34:44 -0600 (MDT) Subject: [XML-SIG] Pyxml: DOM questions, problems with namespaces In-Reply-To: <62225.195.37.209.59.1148733914.squirrel@server22.xlhost.de> Message-ID: <200606012134.k51LYinQ002043@chilled.skew.org> Matthias Dorfner wrote: > 1. some problems creating my xml file with the > correct double quoted string in the namespace, here one example: > > > xmlns:noNameSpaceSchemaLocation='Handle.xsd'> > > I need exactly this output but not single quoted(' -> "). Here's the code The type of quotes used on attribute values during serialization depends on the serializer. If you use the .toxml() method to serialize the document, you'll get double quotes, I believe. It won't pretty-print though. print doc.toxml() xml.dom.ext.Print and PrettyPrint haven't been updated in ages. Well, they've been updated, but only in 4Suite (where they manifest as Ft.Xml.Domlette.Print and PrettyPrint), not PyXML. In PyXML they're hard-coded to use single quotes as attribute delimiters. I asked on the list a while back if there was any interest in bringing 4Suite's Print/PrettyPrint implementation into PyXML and didn't get much response. It's the kind of thing where if I want to see it done, I have to submit patches. > I use to create this one: > > dom = xml.dom.minidom.getDOMImplementation() > doc = dom.createDocument(None, "request", None) > > #Get the document element > msg_elem = doc.documentElement > > #Create an xmlns attributes on the root element > msg_elem.setAttributeNS(EMPTY_NAMESPACE, "xmlns:xsi", > "http://www.w3.org/2001/XMLSchema-instance") > msg_elem.setAttributeNS(EMPTY_NAMESPACE, "xsi:noNameSpaceSchemaLocation", > "Handle.xsd") This isn't related to your quoting problem, but you are using the wrong namespaces. Instead of EMPTY_NAMESPACE you need to do it like this: msg_elem.setAttributeNS(XMLNS_NAMESPACE, 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance') msg_elem.setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:noNameSpaceSchemaLocation','Handle.xsd') > 2. I want so post the above created xml structure to a webserver, but I > need to convert this first to a string, how can I do this? PrettyPrint > allows only writing this DOM structure to a file. Or is it possible to > correctly read out this xml file? A "file" in Python is any file-like object, basically anything with a .read() and maybe also .write() method for byte strings. This includes the sys.stdin, stdout, stderr streams. So to pretty-print to the screen, you could just do PrettyPrint(doc, sys.stdout) And to print to a buffer rather than an external file: f = cStringIO.StringIO() PrettyPrint(doc, f) To read from that buffer into a string, s: s = f.getvalue() Alternatively: f.reset() s = f.read() To read from an external file: f = open('yourfile', 'rb') s = f.read() f.close() Always be sure to call close() on your file-like objects when you're done reading or writing to them. (though not really necessary on sys.stdin, stdout, stderr) I don't know what web API you're using, but if you have access to an object representing the HTTP request, it might have a method that reads from a stream, in which case you could do something like PrettyPrint(doc, request.stream) to print directly to into the request object. Mike From mike at skew.org Thu Jun 1 22:58:48 2006 From: mike at skew.org (Mike Brown) Date: Thu, 1 Jun 2006 14:58:48 -0600 (MDT) Subject: [XML-SIG] prepare_input_source in saxutils In-Reply-To: Message-ID: <200606012058.k51KwnZR001438@chilled.skew.org> Henry S. Thompson wrote: > Suspect this is an FAQ, but I don't understand what to do about it. > > The saxutils in the 0.8.4 distribution shadows the one in the Python > 2.4 distribution proper, but it (the 0.8.4) version has at least one > bug that's fixed in the official distro. > > What's the approved way to unshadow the (newer, corrected) saxutils? Submit a bug report and/or patch for PyXML to be fixed, via http://sourceforge.net/projects/pyxml/ From mike at skew.org Thu Jun 1 22:56:39 2006 From: mike at skew.org (Mike Brown) Date: Thu, 1 Jun 2006 14:56:39 -0600 (MDT) Subject: [XML-SIG] SAX2 and PyXML -- any actual complete implementations? In-Reply-To: Message-ID: <200606012056.k51KudEw001370@chilled.skew.org> Henry S. Thompson wrote: -- Start of PGP signed section. > I've spent the last day exploring the state of 0.8.4 and SAX2, and as > far as I can see the following is the case: > > * Only expat of the distributed SAX2 parsers supports start/endPrefixMapping > * Only expat of the distributed SAX2 parsers supports setDocumentLocator > > Given that I need a validating parser, that's a bit unfortunate. > > PyXML hasn't moved forward for some time -- is the energy for Python > and XML going somewhere else, or does no-one care enough about > validation. . .? I think people do care about DTD-based validation...maybe not as much as they used to, but it's still important. The momentum behind PyXML has indeed stalled quite a bit, though, as demonstrated by the fact that no one responded to your post before now. > Not a criticism, a genuine request for information. I am prepared to > look at either > > 1) Building a validator on top of expat; > 2) Adding support for start/endPrefixMapping and (easy) > setDocumentLocator to SAX2/xmlproc. > > if there's really nothing else out there. Expat 2.0.0, released in January, supports validation. I don't know if it is going to be included in Python 2.5. According to PEP 356, it's on the "Possible features" list and a patch has been submitted, and personally I think it'd be a good idea to include it. It would save you a lot of work. 4Suite already uses Expat 2.0.0 and supports validation with it. setDocumentLocator and start/endPrefixMapping are supported. See http://4suite.org/docs/CoreManual.xml#saxlette for general info, and http://skew.org/~mike/4suite-docs/html/modules/Ft.Xml.Sax.html (not-so-temporary temporary location) for generated API docs. Mike From sam at tgr.indogrosir.co.id Sun Jun 11 09:53:02 2006 From: sam at tgr.indogrosir.co.id (sam at tgr.indogrosir.co.id) Date: Sun, 11 Jun 2006 14:53:02 +0700 Subject: [XML-SIG] Mail System Error - Returned Mail Message-ID: <20060611075916.7A6137988@smtp2.nap.net.id> The original message was received at Sun, 11 Jun 2006 14:53:02 +0700 from tgr.indogrosir.co.id [197.93.98.70] ----- The following addresses had permanent fatal errors ----- From fredrik at pythonware.com Tue Jun 13 15:07:36 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Tue, 13 Jun 2006 15:07:36 +0200 Subject: [XML-SIG] SAX2 and PyXML -- any actual complete implementations? References: <200606012056.k51KudEw001370@chilled.skew.org> Message-ID: Mike Brown wrote: > Expat 2.0.0, released in January, supports validation. It does? The only reference to validation in the Expat 2.0 docs seems to be a link to the W3 HTML validator... what am I missing ? From faassen at infrae.com Tue Jun 13 17:25:36 2006 From: faassen at infrae.com (Martijn Faassen) Date: Tue, 13 Jun 2006 17:25:36 +0200 Subject: [XML-SIG] xsd validator In-Reply-To: References: Message-ID: <448ED8F0.3080509@infrae.com> Supreet Sethi wrote: > Hi, > Is there a good xsd validator in python. Which I could also call > programatically > You could also use lxml, which allows you to access libxml2's XSD validator: http://codespeak.net/lxml Regards, Martijn From mike at skew.org Tue Jun 13 23:52:08 2006 From: mike at skew.org (Mike Brown) Date: Tue, 13 Jun 2006 15:52:08 -0600 (MDT) Subject: [XML-SIG] SAX2 and PyXML -- any actual complete implementations? In-Reply-To: Message-ID: <200606132152.k5DLq8UJ068452@chilled.skew.org> Fredrik Lundh wrote: > > Expat 2.0.0, released in January, supports validation. > > It does? The only reference to validation in the Expat 2.0 docs seems to be a link > to the W3 HTML validator... what am I missing ? I was confused and misspoke. Expat is non-validating. However, Jeremy Kloth added native validation support to Domlette in 4Suite (which uses Expat), and removed support for validating via xmlproc. IIRC (and I'm not sure I do) there was something recently fixed in Expat that made this practical, perhaps related to DTD parsing? I don't remember. jkloth will need to comment. Sorry for the confusion, and thanks for pointing out my error. From mircea.amarascu at gmail.com Wed Jun 14 09:18:19 2006 From: mircea.amarascu at gmail.com (Mircea Amarascu) Date: Wed, 14 Jun 2006 10:18:19 +0300 Subject: [XML-SIG] XML Schema Validator Message-ID: <2f33af970606140018w7672220y6b87fca4d619ada4@mail.gmail.com> Hello, What is the best Python tool for XML Schema validations? I only need a True/False response when I check the conformance of an XML document with a given schema. Is there a Python library that fully implements this feature? From faassen at infrae.com Thu Jun 15 19:00:39 2006 From: faassen at infrae.com (Martijn Faassen) Date: Thu, 15 Jun 2006 19:00:39 +0200 Subject: [XML-SIG] XML Schema Validator In-Reply-To: <2f33af970606140018w7672220y6b87fca4d619ada4@mail.gmail.com> References: <2f33af970606140018w7672220y6b87fca4d619ada4@mail.gmail.com> Message-ID: <44919237.1090802@infrae.com> Mircea Amarascu wrote: > Hello, > > What is the best Python tool for XML Schema validations? I only need a > True/False response when I check the conformance of an XML document > with a given schema. > > Is there a Python library that fully implements this feature? There was just a discussion on the list a last week, so I'll just summarize from that: Henry Thompson mentioned XSV: > XSV [1] is written in Python (uses the LT XML low-level XML library). > [1] http://www.ltg.ed.ac.uk/~ht/xsv-status.html I mentioned lxml (which I created): http://codespeak.net/lxml This explains how to use it with XML Schemas: http://codespeak.net/lxml/api.html#xmlschema This requires libxml2 and libxslt (C libraries) to be installed. lxml implements XML schema only as far as libxml2 implements it -- whether that's sufficient to your purposes depends. There's also another Python binding for libxml2 that gets included with libxml2 itself. It's much less friendly to the Python programmer than lxml, but you may want to try it if for some reason you cannot use lxml. Regards, Martijn From t.broyer at gmail.com Mon Jun 19 17:30:22 2006 From: t.broyer at gmail.com (Thomas Broyer) Date: Mon, 19 Jun 2006 17:30:22 +0200 Subject: [XML-SIG] Bug: xml.dom.pulldom never gives you END_DOCUMENT events with an Expat parser In-Reply-To: References: Message-ID: Hi, Below is a copy of a mail I originally sent to python-dev. Guido van Rossum told me xml-sig would be a better place, so here it is. ---------- Original message ---------- Hi, First, sorry for posting this here, I closed my SourceForge account a few months ago and I can't get it reopened... I'm using python 2.2.1 but a diff on SVN showed that there was no change at this level, so the following bug should still be there in current versions (I'll try with a 2.4 at work tomorrow). On my machine, xml.sax.make_parser returns an xml.sax.expatreader.ExpatParser instance. The problem is: I'm never given END_DOCUMENT events. Code to reproduce: from xml.dom.pulldom import parseString reader = parseString('text') # The following 2 lines will produce, in order: # START_DOCUMENT, START_ELEMENT, TEXT, END_ELEMENT # Note the lack of the END_DOCUMENT event. for event,node in reader: print event # The following line will get an END_DOCUMENT event print reader.getEvent()[0] # The following line will throw a SAXParseException, # because the SAX parser's close method has been # called twice print reader.getEvent()[0] Cause: The xml.dom.pulldom.DOMEventStream.getEvent method, when it has no more event in its internal stack, calls the SAX parser's close() method (which is OK) then immediately returns 'None', ignoring any event that could have been generated by the call to the close() method. If you call getEvent later, it will send you the remaining events until there are no more left, and then will call the SAX parser's close() method again, causing a SAXParseException. Because expat (an maybe other parsers too) has no way to know when the document ends, it generates the endDocument/END_DOCUMENT event only when explicitely told that the XML chunk is the final one (i.e. when the close() method is called) Proposed fix: Add a "parser_closed" attribute to the DOMEventStream class, initialized to "False". After having called self.parser.close() in the xml.dom.pulldom.DOMEventStream.getEvent method, immediately set this "parser_closed" attribute to True and proceed. Finally, at the beginning of the "while" loop, immediately returns "None" if "parser_closed" is "True" to prevent a second call to self.parser.close(). With this change, any call to getEvent when there are no event left will return None and never throw an exception, which I think is the expected behavior. Proposed code: The "closed" attribute is initialized in the "__init__" method: def __init__(self, stream, parser, bufsize): self.stream = stream self.parser = parser self.parser_closed = False self.bufsize = bufsize if not hasattr(self.parser, 'feed'): self.getEvent = self._slurp self.reset() The "getEvent" method becomes: def getEvent(self): # use IncrementalParser interface, so we get the desired # pull effect if not self.pulldom.firstEvent[1]: self.pulldom.lastEvent = self.pulldom.firstEvent while not self.pulldom.firstEvent[1]: if self.parser_closed: return None buf = self.stream.read(self.bufsize) if buf: self.parser.feed(buf) else: self.parser.close() self.parser_closed = True rc = self.pulldom.firstEvent[1][0] self.pulldom.firstEvent[1] = self.pulldom.firstEvent[1][1] return rc The same problem seems to exist in the xml.dom.pulldom.DOMEventStream._slurp method, when the SAX parser is not an IncrementalParser, as the parser's close() method is never called. I suggest adding a call to the close() method in there. However, as I only have expat as an option, which implements IncrementalParser, I can't test it... The _slurp method would become: def _slurp(self): """ Fallback replacement for getEvent() using the standard SAX2 interface, which means we slurp the SAX events into memory (no performance gain, but we are compatible to all SAX parsers). """ self.parser.parse(self.stream) self.parser.close() self.getEvent = self._emit return self._emit() The _emit method raises exceptions when there are no events left, so I propose changing it to: def _emit(self): """ Fallback replacement for getEvent() that emits the events that _slurp() read previously. """ if not self.pulldom.firstEvent[1]: return None rc = self.pulldom.firstEvent[1][0] self.pulldom.firstEvent[1] = self.pulldom.firstEvent[1][1] return rc Hope this helps. -- Thomas Broyer From p.o.bengtsson at gmail.com Tue Jun 20 10:34:29 2006 From: p.o.bengtsson at gmail.com (P-O Bengtsson) Date: Tue, 20 Jun 2006 10:34:29 +0200 Subject: [XML-SIG] problem with insallation Message-ID: Hello I'm using python 2.4 on windows and just installed PyXML-0.8.4.win32-py2.4 Under python24/lib/xml I have the directories dom, sax and parsers. "import xml" works fine, but when I try to import dom or sax package I get the error message " ImportError: No module named sax" Howcome? Is there anything more I need to do than just run the installation file to get it to work? Have installed wx before and whit that I had no problem to get it to work? Thanks in advance for any tips that could help! /Per-Olof -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/xml-sig/attachments/20060620/a05f3401/attachment.html From dieter at handshake.de Tue Jun 20 19:15:19 2006 From: dieter at handshake.de (Dieter Maurer) Date: Tue, 20 Jun 2006 19:15:19 +0200 Subject: [XML-SIG] problem with insallation In-Reply-To: References: Message-ID: <17560.11559.343181.439611@gargle.gargle.HOWL> P-O Bengtsson wrote at 2006-6-20 10:34 +0200: > ... >"import xml" works fine, but when I try to import dom or sax package I get >the error message > >" ImportError: No module named sax" You try "import xml.sax" or "from xml import sax"? -- Dieter From linux-sh-admin at m17n.org Tue Jun 20 22:12:59 2006 From: linux-sh-admin at m17n.org (linux-sh-admin at m17n.org) Date: Wed, 21 Jun 2006 05:12:59 +0900 Subject: [XML-SIG] Subscribe request result (linux-sh ML) References: <200606202012.k5KKCtXL022878@tsukuba.m17n.org> Message-ID: <200606210512.FMLAAA22884.linux-sh@m17n.org> Hi, I am the fml mailing list manager for . Hmm, you may be not a member. 1. Your mail may come from a bad address which is not registered in this mailing list 2. Your mail has a syntax error. If you would like to subscribe this mailing list subscribe YOUR NAME For example subscribe Hayakawa Aoi Hi, I am the fml ML manager for the ML . --linux-sh at m17n.org, Be Seeing You! ************************************************************ If you have any questions or problems, please contact linux-sh-admin at m17n.org ************************************************************ From p.o.bengtsson at gmail.com Wed Jun 21 00:58:09 2006 From: p.o.bengtsson at gmail.com (P-O Bengtsson) Date: Wed, 21 Jun 2006 00:58:09 +0200 Subject: [XML-SIG] problem with insallation In-Reply-To: <17560.11559.343181.439611@gargle.gargle.HOWL> References: <17560.11559.343181.439611@gargle.gargle.HOWL> Message-ID: i have tried both and got the same error message. I have also tried to import the dom package in the same two ways without any luck... On 6/20/06, Dieter Maurer wrote: > > P-O Bengtsson wrote at 2006-6-20 10:34 +0200: > > ... > >"import xml" works fine, but when I try to import dom or sax package I > get > >the error message > > > >" ImportError: No module named sax" > > You try "import xml.sax" or "from xml import sax"? > > > > -- > Dieter > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/xml-sig/attachments/20060621/0981da71/attachment.htm From dieter at handshake.de Wed Jun 21 23:46:12 2006 From: dieter at handshake.de (Dieter Maurer) Date: Wed, 21 Jun 2006 23:46:12 +0200 Subject: [XML-SIG] problem with insallation In-Reply-To: References: <17560.11559.343181.439611@gargle.gargle.HOWL> Message-ID: <17561.48676.861086.636008@gargle.gargle.HOWL> P-O Bengtsson wrote at 2006-6-21 00:58 +0200: >i have tried both and got the same error message. I have also tried to >import the dom package in the same two ways without any luck... > >On 6/20/06, Dieter Maurer wrote: >> P-O Bengtsson wrote at 2006-6-20 10:34 +0200: >> > ... >> >"import xml" works fine, but when I try to import dom or sax package I >> get >> >the error message >> > >> >" ImportError: No module named sax" Several possibilities: * You get an "xml" from a different position than you expect. You can find out via "xml.__file__". * Your "xml" lacks an "__init__.py". In this case, it is not viewed as a Python package (with subpackages and/or modules) * The "sax", "dom", ... folders lack "__init__.py" files -- Dieter From p.o.bengtsson at gmail.com Thu Jun 22 12:01:55 2006 From: p.o.bengtsson at gmail.com (P-O Bengtsson) Date: Thu, 22 Jun 2006 12:01:55 +0200 Subject: [XML-SIG] problem with insallation In-Reply-To: <17561.48676.861086.636008@gargle.gargle.HOWL> References: <17560.11559.343181.439611@gargle.gargle.HOWL> <17561.48676.861086.636008@gargle.gargle.HOWL> Message-ID: That solved the problem, thanks There were another file named xml, that was imported instead of the one intended. I should have thought of that my self from the beginning? Once again, thanks for the help! /P-O On 6/21/06, Dieter Maurer wrote: > > P-O Bengtsson wrote at 2006-6-21 00:58 +0200: > >i have tried both and got the same error message. I have also tried to > >import the dom package in the same two ways without any luck... > > > >On 6/20/06, Dieter Maurer wrote: > >> P-O Bengtsson wrote at 2006-6-20 10:34 +0200: > >> > ... > >> >"import xml" works fine, but when I try to import dom or sax package I > >> get > >> >the error message > >> > > >> >" ImportError: No module named sax" > > Several possibilities: > > * You get an "xml" from a different position than you > expect. > > You can find out via "xml.__file__". > > * Your "xml" lacks an "__init__.py". > > In this case, it is not viewed as a Python package > (with subpackages and/or modules) > > * The "sax", "dom", ... folders lack "__init__.py" > files > > > -- > Dieter > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/xml-sig/attachments/20060622/f30b9a91/attachment.html From martin at v.loewis.de Sat Jun 24 15:56:23 2006 From: martin at v.loewis.de (=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=) Date: Sat, 24 Jun 2006 15:56:23 +0200 Subject: [XML-SIG] Resigning as the PyXML maintainer Message-ID: <449D4487.7010303@v.loewis.de> As many of you have noticed, there hasn't been any PyXML release for quite some time now. This is partially due to my lack of time and interest for this project. Consequentially, I resign as the maintainer. For the moment, PyXML will be unmaintained, until a new maintainer steps forward. If you would like to take over maintenance of PyXML, please contact me. Regards, Martin From PureMessage at cbu.ac.zm Wed Jun 28 23:49:13 2006 From: PureMessage at cbu.ac.zm (PureMessage at cbu.ac.zm) Date: Wed, 28 Jun 2006 23:49:13 +0200 Subject: [XML-SIG] PureMessage has processed a suspicious mail[Scanned] Message-ID: <23f301c69afc$b1ec5750$02000a0a@cbu.ac.zm> A mail sent by you has been identified as suspicious by PureMessage. Event: Infection Action: No action Message ID: <200606282217.k5SMHmbX001696 at fatcop.coppernet.zm> Message subject: Report Recipient: "registrar at cbu.ac.zm" ============================================================ Attachment information: Event: Infection Action: Attachment deleted Filename: readme.zip Virus: W32/MyDoom-O ============================================================ Attachment information: Event: Infection Action: Attachment deleted Filename: readme.zip Virus: W32/MyDoom-O ============================================================ DISCLAIMER: This E-mail and any files transmitted with are confidential and intended solely for the use of the individual or entinty to whom they are addressed. If you have received this email in error please notify the System Manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this email. Please note that any views or opinions presented in this email are sorely those of the author and do not necessarily represent those of The Copperbelt University. Finally, the recipient should check this email and any attachments for the presence of viruses. The Copperbelt University accepts no liability for any damage caused by any Virus transmitted by this email.