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
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
obably looking at resident set size.
Regards
Antoine.
--
https://mail.python.org/mailman/listinfo/python-list
ostly fixed?) in 3.3.
Regards
Antoine.
--
https://mail.python.org/mailman/listinfo/python-list
ll rather than a system install
of Python (something akin to a virtual environment).
Regards
Antoine.
--
https://mail.python.org/mailman/listinfo/python-list
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
')
9 STORE_NAME 2 (__qualname__)
12 LOAD_CONST 1 (None)
15 RETURN_VALUE
Regards
Antoine.
--
https://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
(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 interested in this, please open a new issue at
http://bugs.python.org)
Regards
Antoine.
--
https://mail.python.org/mailman/listinfo/python-list
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
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
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
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
> 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
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
ryone.
Thanks in advance
Antoine.
--
https://mail.python.org/mailman/listinfo/python-list
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
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):
>
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
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
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.
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
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
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
> 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 ;-)
except Germany).
Regards
Antoine.
--
https://mail.python.org/mailman/listinfo/python-list
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
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
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
.
Requirements
* Python 2.7, 3.2 or later.
Regards
Antoine.
--
https://mail.python.org/mailman/listinfo/python-list
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
;
> 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
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
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
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
(), 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
ot; or
"MyCorporateOpenIDWithTrademarks".
Regards
Antoine.
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
. 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
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
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
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
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
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
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
cket
<https://bitbucket.org/pitrou/pathlib/>`_.
Regards
Antoine.
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
s/2006/12/09.html
Regards
Antoine.
--
http://mail.python.org/mailman/listinfo/python-list
big picture, they are good enough.
Regards
Antoine.
--
http://mail.python.org/mailman/listinfo/python-list
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.
-
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
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
?
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
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
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
;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
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
/library/multiprocessing.html
Regards
Antoine.
--
Software development and contracting: http://pro.pitrou.net
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
/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
bucket.org/pitrou/pathlib/
Regards
Antoine Pitrou.
--
Software development and contracting: http://pro.pitrou.net
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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
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
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
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
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
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
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
" > 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
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
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
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
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
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
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
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
thon.org/devguide/#contributing if you need more
info on how to contribute.
Regards
Antoine.
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
- 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
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 - 100 of 332 matches
Mail list logo