Re: Favorite non-python language trick?

2005-06-24 Thread Enrico
whether or not code is commented out just by adding a dash. This is much nicer than in C or Python having to get rid of or /* and */. Of course, the IDE can compensate. But it's still neat :) python: print 10 and # print 10 # C++: /* print(10); */ and ///* print(10); //*/ ? Bye, Enrico

Re: error with wxPython2.8-win32-unicode-2.8.7.1-py25.exe

2007-12-19 Thread Enrico
that importing everything is a good choice) Enrico -- http://mail.python.org/mailman/listinfo/python-list

multiple inheritance and __getattr__

2008-07-28 Thread Enrico
() c.a A.__getattr__ 1 c.b A.__getattr__ B.__getattr__ 1 A better solution is welcome. Many thanks, Enrico -- http://mail.python.org/mailman/listinfo/python-list

Re: multiple inheritance and __getattr__

2008-07-29 Thread Enrico
. But that's not necessarily the best thing to do (it would require more work than your actual solution). I know that I can do whatIwant with class A and class B (monkeypatch!) but I prefer to concentrate on my code and write a clean solution. Thanks for your help. Enrico -- http://mail.python.org/mailman

Re: Using an DTD not specified in XML file for validation

2008-08-07 Thread Enrico
With this package is quite simple (code not tested): from lxml import etree dtd = etree.DTD('mydtd.dtd') f = file('mydoc.xml') xml = etree.XML(f.read()) dtd.validate(xml) Enrico -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling private base methods

2007-04-12 Thread Enrico
, no transformation is done. Enrico -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with ConfigParser

2006-10-02 Thread Enrico
this or client code can set an attribute of this name on instances to affect this behavior. Setting this to str(), for example, would make option names case sensitive. Bye, Enrico -- http://mail.python.org/mailman/listinfo/python-list

Re: Python, XML and XPath

2008-12-17 Thread Enrico
: http://users.skynet.be/sbi/libxml-python/ Bye, Enrico -- http://mail.python.org/mailman/listinfo/python-list

Re: A beginner question about GUI use and development

2009-11-13 Thread Enrico
to build the application. Look at py2exe and friends (freeze, py2app,...). You can prepare an application with everything needed to run it and install/copy it on the user machine. Regards, Enrico -- http://mail.python.org/mailman/listinfo/python-list

Re: msvcr90.dll is MIA?

2010-04-14 Thread Enrico
but look at the manifest) An other solution is to run the vcredist on the target machine and the application will run. This is the suggested solution if you cannot distibute the DLLs. Bye, Enrico -- http://mail.python.org/mailman/listinfo/python-list

Re: Unbound Method Error

2009-06-09 Thread Enrico
= Funcoes.CifradorDeCesar (atribcripto, 3, 2) Best regards, Enrico -- http://mail.python.org/mailman/listinfo/python-list

Re: Unbound Method Error

2009-06-09 Thread Enrico
is not needed. But as been mentioned in this thread before, there might be no reason to use the class anyway. I agree but the code is not very clear about the use of this class as ancestor of MC. class MC(Funcoes, type): ? Enrico -- http://mail.python.org/mailman/listinfo/python-list

Numpy ndarray to C array

2011-12-08 Thread Enrico
I am trying to pass a multi-dimensional ndarray to C as a multi- dimensional C array for the purposes of passing it to mathematica. They already have a wrapper for a 1-D Python list. where the list is copied to list. Shown below: static PyObject * mathlink_PutIntegerList(mathlink_Link *self,

[issue27120] xmllib unable to parse in UTF8 format

2016-05-25 Thread Enrico
New submission from Enrico: The xmllib.XMLParser seems to be unable to parse an XML file that contains cyrillic characters. File "xmllib.pyc", line 172, in feed File "xmllib.pyc", line 268, in goahead File "xmllib.pyc", line 798, in syntax_error

[issue27120] xmllib unable to parse in UTF8 format

2016-05-25 Thread Enrico
Enrico added the comment: I have attached xmllib.py. This file is in python23\lib folder. The strings in XML file are in cyrillic language. My code: import xmllib class Parser(xmllib.XMLParser): # a simple styling engine def __init__(self): xmllib.XMLParser.__init__(self

Re: [newbie]Is there a module for print object in a readable format?

2005-10-17 Thread enrico . sirola_NOSPAM
. -- Enrico Sirola [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: very large dictionary

2008-08-05 Thread Enrico Franchi
Simon Strobl [EMAIL PROTECTED] wrote: Well, as I was using Python, I did not expect to have to care about the language's internal affairs that much. I thought I could simply do always the same no matter how large my files get. In other words, I thought Python was really scalable. It's not

Re: Hobbyist - Python vs. other languages

2008-08-05 Thread Enrico Franchi
[EMAIL PROTECTED] wrote: A programming language is a tool to solve problems, so first of all: do you have problems to solve? You can create some visualizations, some program with GUI, some networked code to download things and process them, etc. It's surprising how hard is this part. I quite

Re: Python recursive tree, linked list thingy

2012-03-08 Thread Enrico Franchi
Wanderer wande...@dialup4less.com wrote: How do you handle this sort of thing in Python? I believe that the best thing to do is a Union-Find algorithm. Depending on the exact nature of your problem, you may also want to check out the Hoshen-Kopelman Algorithm. Although the algorithm itself

[issue9040] using MIMEApplication to attach a PDF raises a TypeError exception

2010-06-21 Thread Enrico Sartori
New submission from Enrico Sartori enry...@gmail.com: To send an email with a PDF attachment the following code should work: msg = MIMEMultipart() msg['From'] = from msg['To'] = to msg['Subject'] = 'test' fp = open('/path/to/file.pdf', 'rb') attach = MIMEApplication(fp.read(), 'pdf') fp.close

[issue6683] smtplib authentication - try all mechanisms

2010-01-17 Thread Enrico Carlesso
Enrico Carlesso enricocarle...@gmail.com added the comment: This affects tophost.it too. Unable to login with CRAM-MD5 but plain login (as described in referenced workaround) work fine. -- nosy: +Enrico.Carlesso ___ Python tracker rep

[issue3117] segfault with (None,) as argument in a def/lambda

2008-06-15 Thread Enrico Santoemma
New submission from Enrico Santoemma [EMAIL PROTECTED]: This wrong expression lambda (None,):None and this statement def f( (None,) ): pass crash the interpreter. Python 2.5.1 (r251:54863, Mar 7 2008, 03:41:45) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 Type help, copyright, credits

[issue11576] timedelta subtraction glitch on big timedelta values

2011-03-16 Thread Enrico Zini
New submission from Enrico Zini enr...@enricozini.org: Hello, I was testing edge case behaviour of some code of mine and stumbled into this unexpected domain error from timedelta: from datetime import * timedelta(9, 86399, 99) - timedelta(9, 86399, 98

[issue11608] GzipFile cannot be used for streaming

2011-03-19 Thread Enrico Zini
New submission from Enrico Zini enr...@enricozini.org: Hello, this snippet does not work, because GzipFile wants a file-like object that can do tell() and seek(): #!/usr/bin/python import gzip from urllib import urlopen zfd = urlopen(http://ftp.debian.org/debian/dists/sid/Contents-udeb.gz

[issue20762] SSLSocket.read() not documented

2014-02-24 Thread Enrico Bianchi
New submission from Enrico Bianchi: although exists, read() method isn't reported in the SSLSocket documentation. Please, fix it -- assignee: docs@python components: Documentation messages: 212115 nosy: docs@python, ebianchi priority: normal severity: normal status: open title

[issue23166] urllib2 ignores opener configuration under certain circumstances

2015-01-21 Thread Enrico Tröger
Enrico Tröger added the comment: I got the same error suddenly with Python 2.7.9. I think this is quite unfortunate because it somewhat breaks existing behaviour, especially that SSL certificate verification is enabled by default. Don't get me wrong, this is the right thing in general

[issue30677] Enhance documentation of os.mkdir()

2017-06-15 Thread Enrico Bianchi
New submission from Enrico Bianchi: Currently, documentation for os.mkdir() (see https://docs.python.org/3.6/library/os.html#os.mkdir ) reports only FileExistsError exception if directory exists. Please, add other exceptions (e.g. FileNotFoundError if directory is created in a non existent

[issue32934] logging.handlers.BufferingHandler capacity is unclearly specified

2018-02-24 Thread Enrico Zini
New submission from Enrico Zini <enr...@enricozini.org>: BufferingHandler's documentatio says "Initializes the handler with a buffer of the specified capacity." but it does not specify what capacity means. One would assume the intention is to give a bound to memory usage, a

[issue32935] Documentation falsely leads to believe that MemoryHandler can be used to wrap SMTPHandler to send multiple messages per email

2018-02-24 Thread Enrico Zini
New submission from Enrico Zini <enr...@enricozini.org>: In the handlers documentation, MemoryHandler directly follows SMTPHandler. SMTPHandler does not document that it is sending an email per every logging invocation, but one can sort of guess it. Right afte

[issue36180] mboxMessage.get_payload throws TypeError on malformed content type

2019-03-04 Thread Enrico Zini
New submission from Enrico Zini : This simple code: ``` import mailbox mbox = mailbox.mbox("broken.mbox") for msg in mbox: msg.get_payload() ``` Fails rather unexpectedly: ``` $ python3 broken.py Traceback (most recent call last): File "broken.py", line 5, in

[issue36651] Asyncio Event Loop documentation inconsistency (call_later and call_at methods)

2019-04-17 Thread Enrico Carbognani
New submission from Enrico Carbognani : In the documentation for the call_later and the call_at methods there is a note which says that the delay cannot be longer than a day, but both methods have a note saying that this limitation was removed in Python 3.8. -- assignee: docs@python

[issue36651] Asyncio Event Loop documentation inconsistency (call_later and call_at methods)

2019-04-17 Thread Enrico Carbognani
Change by Enrico Carbognani : -- keywords: +patch pull_requests: +12793 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36651> ___ _

[issue32934] logging.handlers.BufferingHandler capacity is unclearly specified

2019-06-23 Thread Enrico Zini
Enrico Zini added the comment: Thanks! Clarifying "number of records buffered" would perfectly solve the problem for me. -- ___ Python tracker <https://bugs.python.o

[issue37465] Incorrect documentation for `s#` arguments in C API argument parsing

2019-07-01 Thread Enrico Zini
New submission from Enrico Zini : In https://docs.python.org/3.9/c-api/arg.html, in the documentation for parsing argument, there is: s# (str, read-only bytes-like object) [const char *, int or Py_ssize_t] In my amd64 system, `Py_ssize_t` is a different type than `int`, and passing

[issue37465] Incorrect documentation for `s#` arguments in C API argument parsing

2019-07-01 Thread Enrico Zini
Enrico Zini added the comment: Oh! Fair enough, I had missed it. Does the note also involve `Py_BuildValue`? If so, the documentation of `Py_BuildValue` should probably be updated; if not, I think it would be clearer if the note mentioned that it only applies to parsing, not building

[issue37755] pydoc topics, keywords and symbols always use pager instead of output

2019-08-04 Thread Enrico Tröger
Change by Enrico Tröger : -- keywords: +patch pull_requests: +14847 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15105 ___ Python tracker <https://bugs.python.org/issu

[issue37755] pydoc topics, keywords and symbols always use pager instead of output

2019-08-04 Thread Enrico Tröger
New submission from Enrico Tröger : I noticed a probably unintended behavior in help() usage: when an output is set on pydoc.Helper(), most of its methods use this output instead of a pager. But 'True', 'False' and 'None' as well as all topics, keywords and symbols always use a pager instead

[issue38893] broken container/selinux integration

2020-10-05 Thread Enrico Scholz
Enrico Scholz added the comment: IMO the SELinux security attributes must not be copied (except when requested explicitly). Doing so will create badly labeled systems else. It would be better to use default transition rules and call optionally selinux_restorecon() then. E.g. when copying

Re: why brackets commas in func calls can't be ommited? (maybe it couldbe PEP?)

2007-03-22 Thread Enrico 'Mc Osten' Franchi
[EMAIL PROTECTED] wrote: But I think in some situations Ruby allows to omit them, solving some of the impossibile problems shown in this thread. This makes Ruby a bit better than Python to create application-specific mini languages, that are quite useful in some situations. Yes. However,

Re: Best Free and Open Source Python IDE

2007-02-08 Thread Enrico 'Mc Osten' Franchi
Srikanth [EMAIL PROTECTED] wrote: All I need is a good IDE, I can't find something like Eclipse (JDT). Eclipse has a Python IDE plug-in but it's not that great. Have you tried the 'full' plugin (you have to pay about 30 $ IIRC or something like that)? My favourite Python editor is TextMate a

Re: Python 2 or 3

2011-12-09 Thread Enrico 'Henryx' Bianchi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tobiah wrote: Use the newer version and don't look back. Interesting reply, but if I have a platform wich doesn't support Python 3 (e.g. RHEL 5.x)? ]:) Enrico P.S. note that: I *don't* want to recompile Python in production environment -BEGIN

Re: Python 2 or 3

2011-12-10 Thread Enrico 'Henryx' Bianchi
environment similar to production (ok, ok, with a VM is simple, but I need to track the exception) Enrico P.S. an alternative may be cx_freeze, but I don't know exactly hot it works P.P.S. I'm boring, but I would like my point of view because I've found precisely in this case -BEGIN PGP SIGNATURE

Re: python backup script

2013-05-06 Thread Enrico 'Henryx' Bianchi
) cmd2 = subprocess.Popen(['gzip' '-c'], shell=False, stdout=filename) Enrico -- http://mail.python.org/mailman/listinfo/python-list

Re: python backup script

2013-05-06 Thread Enrico 'Henryx' Bianchi
Enrico 'Henryx' Bianchi wrote: cmd2 = subprocess.Popen(['gzip' '-c'], shell=False, stdout=filename) Doh, my fault: cmd2 = subprocess.Popen(['gzip' '-c'], shell=False, stdout=filename stdin=cmd1.stdout) Enrico -- http

Re: python backup script

2013-05-07 Thread Enrico 'Henryx' Bianchi
to (python needs to spawn an external process to execute the command) Enrico -- http://mail.python.org/mailman/listinfo/python-list