Le mardi 6 mars 2018 11:15:15 UTC+1, Terry Reedy a écrit :
> On 3/6/2018 3:58 AM, Sébastien Boisgérault wrote:
> > Hi Lawrence,
> >
> > Le mardi 6 mars 2018 01:20:36 UTC+1, Lawrence D’Oliveiro a écrit :
> >> On Tuesday, March 6, 2018 at 8:06:00 AM UTC+13, Séb
Le mardi 6 mars 2018 10:23:02 UTC+1, Lawrence D’Oliveiro a écrit :
> On Tuesday, March 6, 2018 at 9:59:55 PM UTC+13, Sébastien Boisgérault wrote:
> >
> > Le mardi 6 mars 2018 01:20:36 UTC+1, Lawrence D’Oliveiro a écrit :
> >
> >> On Tuesday, March 6, 2018 a
Le mardi 6 mars 2018 09:26:50 UTC+1, Sébastien Boisgérault a écrit :
> Le mardi 6 mars 2018 00:29:25 UTC+1, Roel Schroeven a écrit :
> > Sébastien Boisgérault schreef op 5/03/2018 20:05:
> > > I have released bitstream, a Python library to manage binary data (at the
>
Hi Lawrence,
Le mardi 6 mars 2018 01:20:36 UTC+1, Lawrence D’Oliveiro a écrit :
> On Tuesday, March 6, 2018 at 8:06:00 AM UTC+13, Sébastien Boisgérault wrote:
> > I have released bitstream, a Python library to manage binary data
> > (at the byte or bit level), hopefully w
Le mardi 6 mars 2018 00:29:25 UTC+1, Roel Schroeven a écrit :
> Sébastien Boisgérault schreef op 5/03/2018 20:05:
> > I have released bitstream, a Python library to manage binary data (at the
> > byte or bit level),
> > hopefully without the pain that this kind of
Hi everyone,
I have released bitstream, a Python library to manage binary data (at the byte
or bit level), hopefully without the pain that this kind of thing usually
entails :)
If you have struggled with this topic in the past, please take a look at the
documentation
Frank Wierzbicki and Ted Leung have been hired by Sun. Frank is a
key Jython developer and is specifically hired to work full time on
Jython, a version of the Python interpreter that runs on top of the
JVM and provides full access to Java libraries. After a period where
the development had
On Nov 26, 8:46 pm, Wang, Harry [EMAIL PROTECTED] wrote:
The gnosis xml libs should not be version specific, but when I try to use
Python 2.5, I am getting not well formed (invalid token) errors.
Harry
Could you show us a simple example that exhibits this behavior
please ?
SB
--
fscked wrote:
How do I go about creating the XML prologue like I want it to be?
Specifically, I am trying to add encoding and some namespace stuff.
The XML declaration and the DTD that may appear in the prolog are
optional.
[22]prolog ::= XMLDecl? Misc* (doctypedecl Misc*)?
[23]
Hi,
ET being ElementTree in the following code, could anyone explain
why it fails ?
xml = ET.tostring(ET.Element(root), UTF-16)
xml
?xml version='1.0' encoding='UTF-16'?\n\xff\xfer\x00o\x00o\x00t\x00
/
ET.fromstring(xml)
Traceback (most recent call last):
...
xml.parsers.expat.ExpatError:
On Dec 19, 10:49 am, Fredrik Lundh [EMAIL PROTECTED] wrote:
Sébastien Boisgérault wrote:
ET being ElementTree in the following code, could anyone explain
why it fails ?I'm afraid the standard serializer in 1.2 only supports
ASCII-compatible
encodings. this will be fixed in 1.3
Stefan Behnel wrote:
RelaxNG support in libxml2 is pretty much perfect, BTW.
The *potential* issue I mentioned before with Relax NG
validation in libxml2 does *NOT* exist.
I double-checked with Jing and my RelaxNG file was
indeed incorrect ... (the recursive reference outside
elements kind of
On Dec 13, 2:28 pm, Laszlo Nagy [EMAIL PROTECTED] wrote:
Fast google query, uncheked, leads to:
- XSV:http://www.ltg.ed.ac.uk/~ht/xsv-status.htmlI tried this before.
Unfortunately, xsv is not officially supported on
my system (FreeBSD 6.1) :-( - libxml
Laszlo Nagy wrote:
Do you know an open source lib that can do $subject?
Fast google query, uncheked, leads to:
- XSV: http://www.ltg.ed.ac.uk/~ht/xsv-status.html
- libxml : http://codespeak.net/lxml/
Cheers,
SB
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
The unicode code points in the -001F range --
except newline, tab, carriage return -- are not legal
XML 1.0 characters.
Attempts to serialize and deserialize such strings
with ElementTree will fail:
elt = Element(root, char=u\u)
xml = tostring(elt)
xml
'root char=\x00 /'
On Dec 11, 4:51 pm, Fredrik Lundh [EMAIL PROTECTED] wrote:
Sébastien Boisgérault wrote:
Could anyone comment on the rationale behind
the current behavior ? Is it a performance issue,
the search for non-valid unicode code points being
too expensive ?
the default serializer doesn't do
Hi,
Did anyone managed to change the code font family/size
in Pydev (Python Editor Plugin for Eclipse) ? I found how
to change the color mapping (Windows/Preference/Pydev)
but did not found the font setting.
Cheers,
SB
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 24, 9:42 pm, tool69 [EMAIL PROTECTED] wrote:
Sébastien Boisgérault a écrit : Hi,
Did anyone managed to change the code font family/size
in Pydev (Python Editor Plugin for Eclipse) ? I found how
to change the color mapping (Windows/Preference/Pydev)
but did not found the font
On Nov 16, 10:46 pm, John Henry [EMAIL PROTECTED] wrote:
Bill Gates will have you jailed! :-)
On a more serious note, is there any alternative to Simulink though?
Ptolemy II. Java stuff in the core but components may be written in
Python
http://ptolemy.eecs.berkeley.edu/ptolemyII/
Robert Kern wrote:
Martin Manns wrote:
Hello,
Is there any library that allows employing max-plus dioids in
python (e.g. based on numpy/scipy)?
Google says no and I haven't heard of any, so I imagine that there aren't.
There might be something buried in some of the control theory
John Salerno a écrit :
I've been doing a little studying of ElementTree and it doesn't seem
very satisfactory for writing XML files that are properly
formatted/indented. I saw on the website that there is an
indent/prettyprint function, but this isn't listed in the Python docs
and I didn't
I guess I am doing something wrong ... Any clue ?
from elementtree.ElementTree import *
element = Element(string, value=u\x00)
xml = tostring(element)
XML(xml)
Traceback (most recent call last):
File stdin, line 1, in ?
File /usr/lib/python2.4/site-packages/elementtree/ElementTree.py,
Richard Brodie wrote:
Sébastien Boisgérault [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
element = Element(string, value=u\x00)
I'm not as familiar with elementtree.ElementTree as I perhaps
should be. However, you appear to be trying to insert a null
character into an XML
Martin v. Löwis wrote:
Sébastien Boisgérault schrieb:
I am trying to embed an *arbitrary* (unicode) strings inside
an XML document. Of course I'd like to be able to reconstruct
it later from the xml document ... If the naive way to do it does
not work, can anyone suggest a way to do
Jack a écrit :
If Python is not the best candidate for embedded systems because
of the size, what (scripting) language would you recommend?
PHP may fit but I don't quite like the language. Anything else?
Loa is small but it does not seem to be powerful enough.
You mean Lua ? Not powerful
Hi,
Could anyone explain me how the python string é is mapped to
the binary code \xe9 in my python interpreter ?
é is not present in the 7-bit ASCII table that is the default
encoding, right ? So is the mapping é - \xe9 portable ?
(site-)configuration dependent ? Can anyone have something
Fredrik Lundh wrote:
in the iso-8859-1 character set, the character é is represented by the code
0xE9 (233 in decimal). there's no mapping going on here; there's only one
character in the string. how it appears on your screen depends on how you
print it, and what encoding your terminal is
Steven Bethard a écrit :
The advantage of a functional form over a method shows up when you write
a function that works on a variety of different types. Below are
implementations of list(), sorted() and join() that work on any
iterable and only need to be defined once::
[... skipped ...]
Jeez, 12 posts in this IEEE 754 thread, and still
no message from uncle timmy ? ;)
Please, we need enlightenment here and *now* :)
platform-dependent accident'ly yours,
SB
--
http://mail.python.org/mailman/listinfo/python-list
aljosa wrote:
i searched on google and found http://videocapture.sourceforge.net/
before i posted here.
yup.
videocapture has no docs
With the API docs in the .zip and the examples provided, you
should be able to handle it.I did :)
and doesn't provide additional options like
motion
John Machin wrote:
On 29/05/2006 7:46 AM, Sébastien Boisgérault wrote:
Paddy a écrit :
maybe this: http://www.pcre.org/pcre.txt and ctypes might work for you?
Well finally, it doesn't fit. What I need is a longest match policy
in
patterns like (a)|(b)|(c) and NOT a left-to-right
Very good hint ! I wouldn't have found it alone ...
I have to study the doc, but the THE DFA MATCHING ALGORITHM may do
what I need Obviously, I didn't expect the Perl-Compatible Regular
Expressions to implement
an alternative algorithm, provided by the pcre_dfa_exec() function,
that operates in a
Paddy a écrit :
maybe this: http://www.pcre.org/pcre.txt and ctypes might work for you?
Well finally, it doesn't fit. What I need is a longest match policy
in
patterns like (a)|(b)|(c) and NOT a left-to-right policy.
Additionaly,
I need to be able to obtain the matched (captured) substring and
Hi,
I'm searching for a POSIX 1003.2 compatible regular expression engine.
The Python binding pregex by Neal Becker may do the job, but I did
not manage to download it as the original link
ftp://ftp.ctd.comsat.com/pub/
seems dead.
Does any old-timer (wink) have a copy of this package ?
Cheers,
Also, can you elaborate on what (if anything) it is about Matlab that
you feel you can't replicate in Python? Are you aware of matplotlib and
numpy?
The features provided by some matlab 'toolboxes' (libraries in
matlab-speak)
are lacking, and are beyond what numpy + scipy may provide. Some
Thomas Girod a écrit :
Hi.
I think I'm missing something about multiple inheritance in python.
I've got this code.
class Foo:
def __init__(self):
self.x = defined by foo
self.foo = None
class Bar:
def __init__(self):
self.x = defined by bar
Robert Kern wrote:
Sébastien Boisgérault wrote:
By the way, I tried numpy 0.9.4 10 minutes ago and guess
what ? 'eigenvalue' is broken too ... (hangs forever)
On what platform?
Linux, Mandriva 2006 (gcc 4.0.1, etc.)
Are you linking against an optimized BLAS?
Nope -- I tried the basic
[EMAIL PROTECTED] wrote:
Robert Kern wrote:
Sébastien Boisgérault wrote:
By the way, I tried numpy 0.9.4 10 minutes ago and guess
what ? 'eigenvalue' is broken too ... (hangs forever)
On what platform? Are you linking against an optimized BLAS? We can't fix
anything without
Robert Kern wrote:
Sébastien Boisgérault wrote:
Robert Kern wrote:
Sébastien Boisgérault wrote:
By the way, I tried numpy 0.9.4 10 minutes ago and guess
what ? 'eigenvalue' is broken too ... (hangs forever)
On what platform?
Linux, Mandriva 2006 (gcc 4.0.1, etc.)
Okay, my
Robert Kern wrote:
J wrote:
I will just jump in an use NumPy. I hope this one will stick and evolve
into the mother of array packages.
How stable is it ? For now I really just need basic linear algebra.
i.e. matrix multiplication, dot, cross etc
Same concern for me.
I discovered
and that the sources are poorly documented, not a good
sign for an open source software (and Scilab isn't 'Free' for the FSF).
Regards,
*** REPLY SEPARATOR ***
On 8 Oct 2005 11:06:25 -0700, Sébastien Boisgérault
[EMAIL PROTECTED] wrote :
Simulink is a framework widely used
Simulink is a framework widely used by the control engineers ...
It is not *perfect* but the ODEs piece is probably the best
part of the simulator. Why were you not convinced ?
You may also have a look at Scicos and Ptolemy II. These
simulators are open-source ... but not based on Python.
Hi,
The sys.stdout stream behaves strangely in my
Python2.4 shell:
import sys
sys.stdout.write()
sys.stdout.write(\n)
sys.stdout.write(\n)
sys.stdout.flush()
[...nothing...]
Have you ever seen sys.stdout behave like that ?
Any idea
Tiissa,
Thanks for your answer. The execution of your example leads to a
'aaa' display during 2 secs, before it is erased by the prompt.
This behavior is standard ? The standard output is not supposed
to *concatenate* the 'aaa' and the '' ?
SB
--
Robert Kern wrote:
Sébastien Boisgérault wrote:
Tiissa,
Thanks for your answer. The execution of your example leads to a
'aaa' display during 2 secs, before it is erased by the prompt.
This behavior is standard ? The standard output is not supposed
to *concatenate* the 'aaa
Fredrik Lundh wrote:
Sébastien Boisgérault wrote:
Thanks for your answer. The execution of your example leads to a
'aaa' display during 2 secs, before it is erased by the prompt.
This behavior is standard ? The standard output is not supposed
to *concatenate* the 'aaa
Jorgen Grahn a écrit :
On 9 Sep 2005 03:40:58 -0700, Sébastien Boisgérault [EMAIL PROTECTED] wrote:
Fredrik Lundh wrote:
Sébastien Boisgérault wrote:
Thanks for your answer. The execution of your example leads to a
'aaa' display during 2 secs, before it is erased by the prompt
Hi,
Has anybody already implemented a full ANSI C parser
with John Aycock's spark module ?
(spark : http://pages.cpsc.ucalgary.ca/~aycock/spark/)
Cheers,
SB
--
http://mail.python.org/mailman/listinfo/python-list
Nathan Pinno a écrit :
Hi all,
What's wrong with the following code? It says there is name error, that
random is not defined. How do I fix it?
Add import random at the top of your file
Cheers,
SB
# Plays the guessing game higher or lower.
# Originally written by Josh Cogliati,
Martin v. Löwis a écrit :
Andreas Beyer wrote:
How do I find out if NaN, infinity and alike is supported on the
current
python platform?
To rephrase Sebastian's (correct) answer: by
1. studying the documentation of the CPU vendor
2. studying the documentation of the compiler vendor, and
Terry Reedy a écrit :
[...]
Last I read, in CPython, the float type encapsulates a C double.
So, does any C compiler implements doubles as 80 bit floats?
I seriously doubt it.
Or, if it has 64 bit
doubles and 80 bit long doubles, are the latter transparently
substitutible for the former,
code='\n n\n6\n\nn=6\nimport doctest\ndoctest.testmod()'
exec(code)
Remove 'doctest.tesmod()' and the import from your 'code' string.
]]] exec(code)
]]] import doctest
]]] doctest.testmod()
should do the trick.
Cheers,
SB
--
http://mail.python.org/mailman/listinfo/python-list
Not in the core language or the std library.
However, if you are insterested in high-precision
computations, gmpy may be useful:
http://sourceforge.net/projects/gmpy/
To be honest, I have never used it ;). A review
would be appreciated.
Regards,
SB
--
[EMAIL PROTECTED] wrote:
[...]
In some cases there is a further complication: module importing
through
an indirect mechanism, like: exec from + xxx + import *.
Don't do that. Please ;). If you need too import some modules based
on the module name, stored in a string, consider the using
Christopher J. Bottaro wrote:
[...]
Funny, the con of Python (documentation) is PHP's strong point.
The PHP manual is extremely easy to navigate and its search feature
works great. Contrast that with Python, where you have to use the
tutorial as the manual. Also, the tutorial is just
Any idea why the 'options' object in
# optparse stuff
(options, args) = parser.parse_args()
is not/couldn't be a real dict ? Or why at least it
does not support dict's usual methods ?
The next move after a parse_args is often to call
a method 'do_stuff' with the args and options and
I'd like
Manual == scope of the *Lib Reference* + informal style of the
*Tutorial*,
Right ?
Consider non-official manuals such as:
+ http://diveintopython.org/toc/index.html (free)
+ python in a nutshell
+ python cookbook
+ etc.
Cheers,
SB
--
Christopher J. Bottaro wrote:
[...]
Cuz I think the Language Reference is really more of a grammer
reference and
far too technical to look up simple things like how to declare a
function.
I guess what I'm trying to say is that there is no manual (for the
language
itself, not the
Steven Bethard wrote:
Sébastien Boisgérault wrote:
Any idea why the 'options' object in
# optparse stuff
(options, args) = parser.parse_args()
is not/couldn't be a real dict ? Or why at least it
does not support dict's usual methods ?
Well, it's not a real dict because
I can usually end up where I want to be by picking up my copy of
_Python
in a Nutshell_. 95% of the time I can find what I want in there or
from
there.
This book is really great. Could anybody convince Alex Martelli to
basically make it freely available to the world ? 0.9 wink.
I would
http://www.pycon.org/talks/
Cheers,
SB
--
http://mail.python.org/mailman/listinfo/python-list
You mean private, protected, public, that kind of stuff ?
They do not exist in Python. Conventionally if you don't want
the user of a class to access a method or attribute, you use
the prefix _ ;
class K(object):
_a = 1
def __init__(self, val):
self.arg = val
Yup ?!? Weird ... especially as:
id(c.f) == id(C.__dict__['f'].__get__(c,C))
True
I was pretty sure that 'id(a) == id(b)' iff 'a is b' ...
I thought initially that you had two *copies* of the
same method bot obviously it's not true ...
SB
--
Jeff Epler wrote:
id(c.f) == id(C.__dict__['f'].__get__(c,C))
True
Here, c.f is discarded by the time the right-hand-side of == is
executed. So the object whose id() is being calculated on the
right-hand-side could turn out to be the same, since the two objects
have disjoint lifetimes.
(Forwarded from Python bug tracker)
[ 1192554 ] doctest's ELLIPSIS and multiline statements
Tim Peters:
[...]
doctest has few syntax requirements, but the
inability to start an expected output block with ... has
always been one of them, and is independent of the
ELLIPSIS gimmick. I doubt this
Hi,
Can anybody come up with a sensible argument that would explain
why the following test should fail ? (Expected: nothing, Got: 42).
cheers,
S.B.
#!/usr/bin/env python
import doctest
def test():
print 42 #doctest: +ELLIPSIS
...
Doh ! Obviously ... too bad.
I guess that I could set doctest.ELLIPSIS_MARKER to [...] to
distinguish
the two usages of (The ... used for multiline statements is
hard-coded
into a regular expression pattern).
But it feels too hackish, ELLIPSIS_MATKER being not described in the
docs ...
Done.
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for this answer.
Did you forward this info to python-dev ?
Cheers,
SB
--
http://mail.python.org/mailman/listinfo/python-list
Good ! And thanks for the link. I had not noticed the warning fpectl
module is dangerous before.
I am a bit sad that the floating-point issue is disappearing from the
*active topics* list ...
Cheers,
SB
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
Can anybody tell me why I can't load the fpectl module in my Python
interpreter:
import fpectl
Traceback: ...
...
ImportError: No module named fpectl
My platform is Linux (Mandrake 10.x) + Python2.4, built from the
(python.org) sources and configured with the --with-fpectl option.
Any
71 matches
Mail list logo