Re: [RELEASE] mpdecimal-2.5.0

2020-06-29 Thread Antoine Pitrou
way AFAIK, from C or C++, to take a PyObject* and acccess the underlying `mpd_t*` directly, for fast conversions. Regards Antoine. -- https://mail.python.org/mailman/listinfo/python-list

Re: AssertionError (3.X only) when calling Py_Finalize with threads

2015-01-31 Thread Antoine Pitrou
Hi Tom, Tom Kent gmail.com> writes: > > I'm getting an error output when I call the C-API's Py_Finalize() from a different C-thread than I made a > python call on. Can you please post a bug on https://bugs.python.org ? Be sure to upload your example there. Thank you

Re: "High water" Memory fragmentation still a thing?

2014-10-04 Thread Antoine Pitrou
obably looking at resident set size. Regards Antoine. -- https://mail.python.org/mailman/listinfo/python-list

Re: "High water" Memory fragmentation still a thing?

2014-10-03 Thread Antoine Pitrou
ostly fixed?) in 3.3. Regards Antoine. -- https://mail.python.org/mailman/listinfo/python-list

Re: Newer Debian versions of python on older Debian distros?

2014-09-13 Thread Antoine Pitrou
ll rather than a system install of Python (something akin to a virtual environment). Regards Antoine. -- https://mail.python.org/mailman/listinfo/python-list

Re: weakref, memory management and execution slow down in PyQt4

2014-09-07 Thread Antoine Pitrou
older versions: https://docs.python.org/3/library/tracemalloc.html http://pytracemalloc.readthedocs.org/ But regardless of such tools, the approach above (try to decompose your workload into separate parts until your find the culprit) is highly recommended. Regards Antoine. -- https://mail.python.org/mailman/listinfo/python-list

Re: __qualname__ in python 3.3

2014-09-07 Thread Antoine Pitrou
') 9 STORE_NAME 2 (__qualname__) 12 LOAD_CONST 1 (None) 15 RETURN_VALUE Regards Antoine. -- https://mail.python.org/mailman/listinfo/python-list

[ANN] pathlib 1.0.1

2014-09-03 Thread Antoine Pitrou
now part of the standard library. For Python 3.3 and earlier, ``easy_install pathlib`` or ``pip install pathlib`` should do the trick. Changelog for version 1.0.1 --- - Pull request #4: Python 2.6 compatibility by eevee. Regards Antoine. -- https://mail.python.org

Re: Everything you did not want to know about Unicode in Python 3

2014-05-16 Thread Antoine Pitrou
this. And the documentation has now been fixed: http://bugs.python.org/issue21364 So something *can* come out of a python-list rantfest, it seems. Regards Antoine. -- https://mail.python.org/mailman/listinfo/python-list

Normal dict behavior?

2014-05-07 Thread antoine
Hi, Python 2.7.5 (default, Nov 20 2013, 14:20:58) [GCC 4.7.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> {0.: None, 0:None} {0.0: None} The second item disappeared! Why? Is it normal? -- https://mail.python.org/mailman/listinfo/python-list

Re: imaplib: how to specify SSL/TLS protocol version?

2014-04-10 Thread Antoine Pitrou
to IMAP_SSL: https://docs.python.org/3.3/library/imaplib.html#imaplib.IMAP4_SSL Regards Antoine. -- https://mail.python.org/mailman/listinfo/python-list

Re: [ANN] pathlib 1.0

2014-03-25 Thread Antoine Pitrou
Oh, and of course it is published on PyPI: https://pypi.python.org/pypi/pathlib/ Regards Antoine. -- https://mail.python.org/mailman/listinfo/python-list

[ANN] pathlib 1.0

2014-03-25 Thread Antoine Pitrou
(only pure ASCII, though). - Issue #21: fix TypeError under Python 2.7 when using new division. - Add tox support for easier testing. Regards Antoine. -- https://mail.python.org/mailman/listinfo/python-list

Re: Thread._stop() behavior changed in Python 3.4

2014-03-17 Thread Antoine Pitrou
re interested in this, please open a new issue at http://bugs.python.org) Regards Antoine. -- https://mail.python.org/mailman/listinfo/python-list

Re: What does gc.get_objects() return?

2014-03-17 Thread Antoine Pitrou
for low-level debugging). In most situations, gc.get_objects() is certainly the wrong tool to use. Regards Antoine. -- https://mail.python.org/mailman/listinfo/python-list

Re: which async framework?

2014-03-11 Thread Antoine Pitrou
Sturla Molden gmail.com> writes: > > Antoine Pitrou pitrou.net> wrote: > > > Yes, why use a library when you can rewrite it all yourself? > > This assumes something equivalent to the library will have to be written. > But if it can be replaced with somethin

Re: which async framework?

2014-03-11 Thread Antoine Pitrou
bably issue system calls to the kernel directly, the libc is overrated (as is portability, I suppose). Regards Antoine. -- https://mail.python.org/mailman/listinfo/python-list

Re: which async framework?

2014-03-11 Thread Antoine Pitrou
n you should consider writing them in a way that's framework-agnostic. See as an example: https://pypi.python.org/pypi/obelus/0.1 (if you really want to settle on a single framework and don't mind supporting old Python versions, then I recommend asyncio) Regards Antoine. -- https://m

Re: SQLite + FTS (full text search)

2014-01-23 Thread Antoine Pitrou
> I'd like the Windows binary to include SQLite 3 with FTS4 support, but I don't know how much work that > involves or if it would make the Python .msi file too big? You can create a feature request on http://bugs.python.org Regards Antoine. -- https://mail.python.org/mailman/listinfo/python-list

Re: "More About Unicode in Python 2 and 3"

2014-01-06 Thread Antoine Pitrou
Terry Reedy udel.edu> writes: > > On 1/6/2014 11:29 AM, Antoine Pitrou wrote: > > > People don't use? According to available figures, there are more downloads of > > Python 3 than downloads of Python 2 (Windows installers, mostly): > > http://www.python.org/we

Re: "More About Unicode in Python 2 and 3"

2014-01-06 Thread Antoine Pitrou
ryone. Thanks in advance Antoine. -- https://mail.python.org/mailman/listinfo/python-list

Re: "More About Unicode in Python 2 and 3"

2014-01-06 Thread Antoine Pitrou
will bow with extreme diligence to the community's every outburst. Please try to respect us. ((*) Wikipedia: "A customer (sometimes known as a client, buyer, or purchaser) is the recipient of a good, service, product, or idea, obtained from a seller, vendor, or supplier for a monetary o

Re: "More About Unicode in Python 2 and 3"

2014-01-06 Thread Antoine Pitrou
Chris Angelico gmail.com> writes: > > On Tue, Jan 7, 2014 at 3:29 AM, Antoine Pitrou pitrou.net> wrote: > > People don't use? According to available figures, there are more downloads of > > Python 3 than downloads of Python 2 (Windows installers, mostly): >

Re: "More About Unicode in Python 2 and 3"

2014-01-06 Thread Antoine Pitrou
ot;Kenneth and Armin" are not the whole Python community. Your whole argument seems to be that a couple "revered" (!!) individuals should see their complaints taken for granted. I am opposed to rockstarizing the community. Their contribution is always welcome, of course. (as for ne

Re: "More About Unicode in Python 2 and 3"

2014-01-05 Thread Antoine Pitrou
7;s a rant. "In some cases Python 3 is a bit less practical than Python 2" doesn't equate to "Python 3 is broken and 2.8 should be released instead". Regards Antoine. -- https://mail.python.org/mailman/listinfo/python-list

Re: Blog "about python 3"

2014-01-02 Thread Antoine Pitrou
for > whatever reason the python 3.3 version runs slower > > 2.7 Ran 223 tests in 66.578s > > 3.3 Ran 223 tests in 75.703s Running a test suite is a completely broken benchmarking methodology. You should isolate workloads you are interested in and write a benchmark simulating them.

Re: Blog "about python 3"

2013-12-31 Thread Antoine Pitrou
who won't. Indeed. This would be extremely destructive (not to mention alienating the people doing *actual* maintenance and enhancements on Python-and-its-stdlib, of which at least 95% are committed to the original plan for 3.x to slowly supercede 2.x). Regards Antoine. -- https://mail.python.org/mailman/listinfo/python-list

ANN: pathlib 0.97 released

2013-12-10 Thread Antoine Pitrou
I changes are too long to list; if you are already a pathlib user, I would recommend you read the documentation and find out what has changed for you (your code will likely break loudly, anyway!). Regards Antoine. -- https://mail.python.org/mailman/listinfo/python-list

Re: Self-defence

2013-11-17 Thread Antoine Pitrou
free" discussion space can always open their own. We'll see how well it fares in practice, but I'm not holding my hopes very high :-) Regards Antoine. -- https://mail.python.org/mailman/listinfo/python-list

[OT] Re: Python Front-end to GCC

2013-10-29 Thread Antoine Pitrou
> http://en.wikipedia.org/wiki/List_of_animals_with_fraudulent_diplomas > > PhD's are more expensive, which leads me to think that Mark Jenssen is > being a tad flexible with the truth when he claims to have one. He could be an upper-class twit. He would certainly have his chance in the yearly competition ;-)

Re: Will Python 3.x ever become the actual standard?

2013-10-24 Thread Antoine Pitrou
except Germany). Regards Antoine. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Front-end to GCC

2013-10-22 Thread Antoine Pitrou
Steven D'Aprano pearwood.info> writes: > > On Tue, 22 Oct 2013 08:55:15 +, Antoine Pitrou wrote: > > > If you don't implement exec() and eval() then people won't be able to > > use namedtuples, which are a common datatype factory. > > Philip

Re: Python Front-end to GCC

2013-10-22 Thread Antoine Pitrou
failed. Cython mitigates the issue by exposing a superset of Python (including type hints, etc.). Regards Antoine. -- https://mail.python.org/mailman/listinfo/python-list

Re: Tab completion in Python3.4

2013-09-30 Thread Antoine Pitrou
ginning of the line: Such a change is much more likely to happen if someone actually proposes a patch for it, rather than merely "ask for it". I don't think anyone is ideologically opposed to it. Regards Antoine. -- https://mail.python.org/mailman/listinfo/python-list

ANN: Obelus 0.1 -- Asterisk AMI / AGI implementation

2013-09-12 Thread Antoine Pitrou
. Requirements * Python 2.7, 3.2 or later. Regards Antoine. -- https://mail.python.org/mailman/listinfo/python-list

Re: [python-committers] [RELEASED] Python 3.4.0a2

2013-09-09 Thread Antoine Pitrou
d > sockets not only the subprocess module. I don't think Larry's description is wrong. "Non-inheritable" is a shorthand for "non-inheritable in subprocesses" with "subprocesses" taken in the general sense (i.e. not only created with the subprocess module). Regards Antoine. -- https://mail.python.org/mailman/listinfo/python-list

Re: [RELEASED] Python 3.4.0a2

2013-09-09 Thread Antoine Pitrou
; > Those last two PEPs are still in draft form and not accepted nor have > any committed code yet. Unless Larry enthusiastically sneaked them into the release. Regards Antoine. -- https://mail.python.org/mailman/listinfo/python-list

Re: Pair of filenos read/write each other?

2013-08-15 Thread Antoine Pitrou
rocessing.Pipe() provides: http://docs.python.org/3.3/library/multiprocessing.html#multiprocessing.Connection.fileno Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: Pair of filenos read/write each other?

2013-08-14 Thread Antoine Pitrou
x27;)) end1.write(b"foo") end1.flush() end2.read(3) # -> return b"foo" ) An alternative is to use multiprocessing.Pipe(): http://docs.python.org/3.3/library/multiprocessing.html#multiprocessing.Pipe In any case, Python doesn't lack facilities for doing what you want. Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with psycopg2, bytea, and memoryview

2013-07-31 Thread Antoine Pitrou
Frank Millman chagford.com> writes: > > Thanks for that, Antoine. It is an improvement over tobytes(), but i am > afraid it is still not ideal for my purposes. I would suggest asking the psycopg2 project why they made this choice, and if they would reconsider. Returning a memory

Re: Problem with psycopg2, bytea, and memoryview

2013-07-31 Thread Antoine Pitrou
(), but it would add complication, and > it would be database-specific. I would prefer a cleaner solution. Just cast the result to bytes (`bytes(row[1])`). It will work both with bytes and memoryview objcts. Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: MyOpenID.com no longer supported

2013-07-29 Thread Antoine Pitrou
ot; or "MyCorporateOpenIDWithTrademarks". Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why on CentOS, python consumes too much memory ?

2013-07-18 Thread Antoine Pitrou
OS 6.2(x86_64)+python2.6.6, it reports memory > error(exceeding 200M). Take a look at http://www.selenic.com/smem/ for accurate measurement of actual memory consumption under Linux. Virtual memory size is generally useless for this purpose. Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: Stack Overflow moderator “animuson”

2013-07-18 Thread Antoine Pitrou
Joshua Landau landau.ws> writes: > > > The same with Unicode. We hate French people, > > And for good damn reason too. They're ruining our language, á mon avis. We do! Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: ssl handshake operation timed out on Python 3.3.2

2013-07-09 Thread Antoine Pitrou
iis-7-5-mercurial-setup-ignoring-maxallowedcontentlength http://bz.selenic.com/show_bug.cgi?id=3905 http://bugs.python.org/issue17948 Otherwise, dumping network traffic with Wireshark could give you some hints at to what is different between the SSL handshakes in the two setups. Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is regex so slow?

2013-06-18 Thread Antoine Pitrou
. And that's exactly how long it > should take for "if 'ENQ' not in line" to run as well. You should read again on the O(...) notation. It's an asymptotic complexity, it tells you nothing about the exact function values at different data points. So you can hav

Re: usage of os.posix_fadvise

2013-05-29 Thread Antoine Pitrou
do anything on (modern) Linux kernels - POSIX_FADV_DONTNEED must be called *after* you are done with a range of data, not before you read it (note that I haven't tested to confirm it :-)) Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: Ordered dictionaries compared

2013-05-23 Thread Antoine Pitrou
Dan Stromberg gmail.com> writes: > > What kind of ordered dictionaries?  Sorted by key. Calling them "sorted dictionaries" avoids any confusions with Python's standard OrderedDict class: http://docs.python.org/3.3/library/collections.html#ordereddict-objects Rega

Re: The node.js Community is Quietly Changing the Face of Open Source

2013-04-17 Thread Antoine Pitrou
ll designed from a language theoretist's point of view, but I suspect most average programmers would find it a hell to code in. Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode issue with Python v3.3

2013-04-10 Thread Antoine Pitrou
terested in "being right on the Internet" rather than helping people out. (this is where the StackOverflow mechanics probably work better, sadly) Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: standalone vs embedded interpreter

2013-04-09 Thread Antoine Pitrou
in)) and isatty(fileno(stdout)) both true? If you want to debug, take a look at PyOS_Readline() in Parser/myreadline.c. It probably holds the answer to your question. Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: Speeding up Python's exit

2013-03-01 Thread Antoine Pitrou
Dave Angel davea.name> writes: > > Note he didn't say the python buffers would be flushed. It's the OS > buffers that are flushed. Now please read my message again. The OS buffers are *not* flushed according to POSIX. -- http://mail.python.org/mailman/listinfo/python-list

ANN: pathlib 0.8

2013-03-01 Thread Antoine Pitrou
cket <https://bitbucket.org/pitrou/pathlib/>`_. Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: Speeding up Python's exit

2013-03-01 Thread Antoine Pitrou
are closed (without flushing) is implementation-defined.” http://pubs.opengroup.org/onlinepubs/9699919799/functions/_exit.html (under the hood, os._exit() calls C _exit()) Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: IMAP4_SSL and OpenSSL compatibility

2013-03-01 Thread Antoine Pitrou
3.3 feature to > Python 2? No, we don't backport new features to maintenance releases. > 2. Would the following lines be correct for Python 3.3? > > >>> import imaplib > >>> IMAP4_SSL("192.168.1.1.", ssl_context = > SSLContext(s

Re: Speeding up Python's exit

2013-03-01 Thread Antoine Pitrou
g system, but other resources > such as opened files may not be. The OS always disposes of per-process resources when the process terminates (except if the OS is buggy ;-)). However, file buffers will not be flushed, atexit handlers and other destructors will not be called, database transactions

Re: Writing to same file from two threads

2013-03-01 Thread Antoine Pitrou
Steven D'Aprano pearwood.info> writes: > > On Wed, 27 Feb 2013 13:26:18 +, Antoine Pitrou wrote: > > > For the record, binary files are thread-safe in Python 3, but text files > > are not. > > Where is this documented please? In the documentation, of c

Re: Writing to same file from two threads

2013-02-27 Thread Antoine Pitrou
tween competing locks, you can have difficult to diagnose issues. Queues have their internal locking all done for you. Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: Do you feel bad because of the Python docs?

2013-02-27 Thread Antoine Pitrou
s/2006/12/09.html Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: Do you feel bad because of the Python docs?

2013-02-27 Thread Antoine Pitrou
big picture, they are good enough. Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: IMAP4_SSL and OpenSSL compatibility

2013-02-26 Thread Antoine Pitrou
eyfile, self.certfile, > ssl_version = ssl.PROTOCOL_SSLv3) > > Would it make sense, to make this change in the Python standard > library? There is already the ssl_context option for that: http://docs.python.org/3.3/library/imaplib.html#imaplib.IMAP4_SSL Regards Antoine. -

Re: Thought of the day

2013-01-15 Thread Antoine Pitrou
Steven D'Aprano pearwood.info> writes: > > A programmer had a problem, and thought Now he has "I know, I'll solve > two it with threads!" problems. Host: Last week the Royal Festival Hall saw the first performance of a new logfile by one of the world's leading modern programmers, Steven "Two t

Re: Py3k Signal Handling

2012-11-10 Thread Antoine Pitrou
Jonathan Hayward pobox.com> writes: > > What needs changing here and how should I change it so that handle_signal() > is called and then things keep on ticking? So that it is called when exactly? Your message isn't clear as to what isn't working for you. Regard

Re: Memory profiling: Python 3.2

2012-11-02 Thread Antoine Pitrou
? Again, not sure what you mean with "allocated to variables" (global variables? local variables? everything?). As for "re-capturable data not yet GC'd", the best way to figure out is to run gc.collect() :-) Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: deque and thread-safety

2012-10-12 Thread Antoine Pitrou
tests ("url in seen"). Like with lists or tuples, a containment test in a deque will be O(n). So if you want efficient containment tests, you should use a set or a dict. Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: Posix call (execve) breaks mercurial?

2012-10-12 Thread Antoine Pitrou
ooking to see what the > difference in environment is there. Your problem is a user question for the Mercurial mailing-list, not a Python problem. See http://selenic.com/mailman/listinfo/mercurial Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Py_AddPendingCall

2012-09-17 Thread Antoine Pitrou
;main Python thread" is the one from which Py_Initialize() was called. (*) for example, running one of the following functions: http://docs.python.org/dev/c-api/veryhigh.html Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: The opener parameter of Python 3 open() built-in

2012-09-05 Thread Antoine Pitrou
will see your modification, which is risky and fragile. Regards Antoine. -- Software development and contracting: http://pro.pitrou.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for an IPC solution

2012-08-31 Thread Antoine Pitrou
/library/multiprocessing.html Regards Antoine. -- Software development and contracting: http://pro.pitrou.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Flexible string representation, unicode, typography, ...

2012-08-30 Thread Antoine Pitrou
funny way, this is what Python was doing and it > performs better! I honestly suggest you shut up until you have a clue. Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: Flexible string representation, unicode, typography, ...

2012-08-24 Thread Antoine Pitrou
Ramchandra Apte gmail.com> writes: > > The zen of python is simply a guideline What's more, the Zen guides the language's design, not its implementation. People who think CPython is a complicated implementation can take a look at PyPy :-) Regards Antoine. -- Softw

Re: SSLSocket.getpeercert() doesn't return issuer, serial number, etc

2012-08-16 Thread Antoine Pitrou
g/py3k/library/ssl.html#client-side-operation (although the getpeercert() doc should be updated to reflect this) If some information is still lacking from the returned value, please open an issue at http://bugs.python.org Regards Antoine. -- Software development and contracting: http://pr

Re: Flushing buffer on file copy on linux

2012-08-15 Thread Antoine Pitrou
/proc/sys/vm/drop_caches; to free pagecache, dentries and inodes, use echo 3 > /proc/sys/vm/drop_caches. Because this is a nondestructive operation and dirty objects are not freeable, the user should run sync(8) firs

ANN: pathlib 0.7

2012-07-29 Thread Antoine Pitrou
bucket.org/pitrou/pathlib/ Regards Antoine Pitrou. -- Software development and contracting: http://pro.pitrou.net -- http://mail.python.org/mailman/listinfo/python-list

Re: ssl: add msg_callback

2012-07-26 Thread Antoine Pitrou
to be written against the default branch, although I'm not sure it makes a difference here (see the devguide: http://docs.python.org/devguide/ for more information). Please open an issue at http://bugs.python.org and post your patch there. Thanks Antoine. -- Software develop

Re: append in IMAP4 from imaplib very slow

2012-07-25 Thread Antoine Pitrou
o reply. Perhaps the Perl and Python IMAP libraries use different IMAP commands for appending? Regards Antoine. -- Software development and contracting: http://pro.pitrou.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Smallest/cheapest possible Python platform?

2012-05-26 Thread Antoine Pitrou
eeded at all, except that it's nice when running the full regression test suite). Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple TLS NPN negotiation not working on socket server

2012-04-18 Thread Antoine Pitrou
OTOCOL_SSLv23 gives the same result, but PROTOCOL_TLSv1 > makes it die with SSL3_GET_CLIENT_HELLO:wrong version number (strange, because > both browsers ostensibly support TLS). PROTOCOL_TLSv1 works here (with Firefox 11.0). Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: nested embedding of interpreter

2012-02-06 Thread Antoine Pitrou
cluding stdout): any buffering in a still-open file opened for writing can be lost. Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting involved

2012-01-07 Thread Antoine Pitrou
n and/or Java which > are currently active (vivid) and useful? CPython itself - the reference and most used implementation - is written partly in Python (most of the stdlib is) and partly in C. It is easy to find things to do even without touching C. You could take a look: http://doc

Re: Python, Solaris 10, and Mailman

2011-01-21 Thread Antoine Pitrou
n 2.4.6. You can probably use whatever version of Python comes with Solaris, no need to build your own. Oh, and tell the Mailman guys that their recommendations are totally obsolete. Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: getdefaultencoding - how to change this?

2011-01-20 Thread Antoine Pitrou
t; Now I can print non-ascii characters if they are > properly encoded. You can *always* print characters if they are properly encoded. What you are asking is for Python to guess and do the encoding by itself, which is a different matter (and a poorly supported one under 2.x; Python 3 behaves muc

Re: UTF-8 question from Dive into Python 3

2011-01-19 Thread Antoine Pitrou
On Wed, 19 Jan 2011 19:18:49 + (UTC) Tim Harig wrote: > On 2011-01-19, Antoine Pitrou wrote: > > On Wed, 19 Jan 2011 18:02:22 + (UTC) > > Tim Harig wrote: > >> Converting to a fixed byte > >> representation (UTF-32/UCS-4) or separating all of the byte

Re: UTF-8 question from Dive into Python 3

2011-01-19 Thread Antoine Pitrou
On Wed, 19 Jan 2011 18:02:22 + (UTC) Tim Harig wrote: > On 2011-01-19, Antoine Pitrou wrote: > > On Wed, 19 Jan 2011 16:03:11 + (UTC) > > Tim Harig wrote: > >> > >> For many operations, it is just much faster and simpler to use a single > >> c

Re: __pycache__, one more good reason to stck with Python 2?

2011-01-19 Thread Antoine Pitrou
ript, using __file__ and os.path.dirname. Nothing complicated AFAICT. (by the way, the fact that pyc files are version-specific should discourage any use outside of version-specific directories, e.g. /usr/lib/pythonX.Y/site-packages) Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: UTF-8 question from Dive into Python 3

2011-01-19 Thread Antoine Pitrou
On Wed, 19 Jan 2011 16:03:11 + (UTC) Tim Harig wrote: > > For many operations, it is just much faster and simpler to use a single > character based container opposed to having to process an entire byte > stream to determine individual letters from the bytes or to having > adaptive size contai

Re: __pycache__, one more good reason to stck with Python 2?

2011-01-19 Thread Antoine Pitrou
" > toto.py $ __svn__/python -m compileall -l . Listing . ... Compiling ./toto.py ... $ rm toto.py $ __svn__/python __pycache__/toto.cpython-32.pyc 3.2rc1+ (py3k:88095M, Jan 18 2011, 17:12:15) [GCC 4.4.3] Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: UTF-8 question from Dive into Python 3

2011-01-19 Thread Antoine Pitrou
your own foolish interpretation of it. UTF-8 does not have any endianness since it is a byte stream and does not care about "machine words". Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: UTF-8 question from Dive into Python 3

2011-01-19 Thread Antoine Pitrou
On Wed, 19 Jan 2011 11:34:53 + (UTC) Tim Harig wrote: > That is why the FAQ I linked to > says yes to the fact that you can consider UTF-8 to always be in big-endian > order. It certainly doesn't. Read better. > Essentially all byte based data is big-endian. This is pure nonsense. -- htt

Re: move to end, in Python 3.2 Really?

2011-01-18 Thread Antoine Pitrou
On Tue, 18 Jan 2011 10:33:45 -0800 (PST) rantingrick wrote: > > On Jan 18, 11:56 am, Antoine Pitrou wrote: > > On Tue, 18 Jan 2011 09:10:48 -0800 (PST) > > > > rantingrick wrote: > > > > > Well don't get wrong i want to join in --not that i have a

Re: move to end, in Python 3.2 Really?

2011-01-18 Thread Antoine Pitrou
On Tue, 18 Jan 2011 09:10:48 -0800 (PST) rantingrick wrote: > > Well don't get wrong i want to join in --not that i have all the > solutions-- Take a look at http://docs.python.org/devguide/#contributing -- http://mail.python.org/mailman/listinfo/python-list

Re: move to end, in Python 3.2 Really?

2011-01-18 Thread Antoine Pitrou
ll I have to agree that moving to the beginning using move_to_end() with a "last" argument looks completely bizarre and unexpected. "Parallels popitem()" is not really convincing since popitem() doesn't have "end" its name. > Those were the design considerations. Sorry you didn't like the > result. Design considerations? Where were they discussed? Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: UTF-8 question from Dive into Python 3

2011-01-17 Thread Antoine Pitrou
tes this? Math? UTF-8 is simply a byte-oriented (rather than word-oriented) encoding. There is no math involved, it just works by construction. Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: 9 Month Python contract in Austin, TX

2011-01-17 Thread Antoine Pitrou
On Mon, 17 Jan 2011 11:08:52 -0800 (PST) AlexLBasso wrote: > I am recruiting for a 9 month contract (with contract extension > potential) for a company in North Austin. Please post on the job board instead: http://python.org/community/jobs/ Thank you Antoine. -- http://mail.pyth

Re: python 3 and Unicode line breaking

2011-01-14 Thread Antoine Pitrou
thon.org/devguide/#contributing if you need more info on how to contribute. Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: python 3 and Unicode line breaking

2011-01-14 Thread Antoine Pitrou
when the original message doesn't look like the usual blunt, impolite and typo-ridden "can you do my homework" message. Also, I would expect someone familiar with the textwrap module's (lack of) unicode capabilities would have been able to answer the first message without

Re: python 3 and Unicode line breaking

2011-01-14 Thread Antoine Pitrou
You would never have reacted this way if the same question had been phrased by a regular poster here (let alone on python-dev). Taking cheap shots at newcomers is certainly not the best way to welcome them. Thank you Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating custom Python objects from C code

2011-01-05 Thread Antoine Pitrou
PyString_*, PyInt_* functions are available? > Is it possible to have distutils make a .lib file for me? I don't know. I'd say "probably" :S Otherwise you can use the PyCapsule system, but that seems quite a bit more involved: http://docs.python.org/c-api/capsule.html Regards

Re: Python comparison matrix

2011-01-03 Thread Antoine Pitrou
- object is also in 3.x - NotImplemented is not an exception type, it's a built-in singleton like None - you forgot VMSError (only on VMS) :-) Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

Nagios

2010-12-31 Thread Antoine Pitrou
ng the existing Nagios instead of re-inventing the > wheel, and you accuse *them* of suffering from NIH syndrome. Well, I don't know about Tcl but Nagios was re-written in Python: http://www.shinken-monitoring.org/features/ Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   >