platypus and xml.py

Jairo Souto <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Message-ID <[email protected]>
a script xml.py in the working directory is run when importing platypus.
is it ok? why?

===== xml.py :

from dlg import spgsql
from lxml import etree

pkey = 59

db = spgsql.database(dbname = "controle")

r = db.record("fis.nfe_xmls",pkey = pkey)
if not r.unique():
	db.error("pkey nao encontrado: {}",pkey)

infNFe = etree.fromstring(r.doc).find("{*}NFe/{*}infNFe")
print(infNFe)
emitente = infNFe.findtext("./{*}emit/{*}xNome")
print(emitente)

=====

===== typescript

Script started on Tue Sep 25 10:16:19 2018
urano$ python3.6
Python 3.6.3 (default, Oct 13 2017, 23:01:18)
[GCC 4.2.1 20070719 ] on openbsd5
Type "help", "copyright", "credits" or "license" for more information.
>>> from reportlab import platypus
<Element {http://www.portalfiscal.inf.br/nfe}infNFe at 0x7f1bf9b7548>
AUTO PECAS NELSINHO LTDA
>>> 
urano$ ^D

Script done on Tue Sep 25 10:17:05 2018

=====

--Jairo Souto
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.