Tuvas [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I would like to limit a floating variable to 4 signifigant digits, when
running thorugh a str command. Ei,
x=.13241414515
y=str(x)+ something here
But somehow limiting that to 4 sign. digits. I know that if you use the
print
Lil [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I already double checked my C code. It runs perfectly fine in C without
any errors. So in my python program, I added a pdb.set_trace()
and step through the program and it did not dump. But when i took out
the tracing, the core dump
[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I do this:
def unique(keys):
unique = []
for i in keys:
if i not in unique:unique.append(i)
return unique
I don't know what is faster at the moment.
This is quadratic, O(n^2), in the length n of the list
if all
of these constants only. But since Python's file
objects are implemented using C's stdio package, you
can read
http://www.opengroup.org/onlinepubs/009695399/functions/lseek.html
Regards,
Christian Stapfer
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
try to use set.
L1 = [1,1,2,3,4]
L2 = [1,3, 99]
A = set(L1)
B = set(L2)
X = A-B
print X
Y = B-A
print Y
Z = A | B
print Z
But how efficient is this? Could you be a bit
more explicit on that
George Sakkis [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Christian Stapfer [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
try to use set.
Sorting the two lists and then extracting
A-B, B-A, A|B, A B and A ^ B in one single
pass seems to me very likely to be much
Steve Holden [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Christian Stapfer wrote:
George Sakkis [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Christian Stapfer [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
try to use set.
Sorting the two lists
Scott David Daniels [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Christian Stapfer wrote:
Steve Holden [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Christian Stapfer wrote:
George Sakkis [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Christian Stapfer
John J. Lee [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Kenneth McDonald [EMAIL PROTECTED] writes:
[...]
absolutely preventing me from making the switch. Number one is the
lack of a decent command line and command-line environment, and I'm
wondering (hoping) if perhaps someone
jon [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
To take the heat out of the discussion:
sets are blazingly fast.
I'd prefer a (however) rough characterization
of computational complexity in terms of Big-Oh
(or Big-whatever) *anytime* to marketing-type
characterizations like
Steven D'Aprano [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
On Sat, 15 Oct 2005 06:31:53 +0200, Christian Stapfer wrote:
jon [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
To take the heat out of the discussion:
sets are blazingly fast.
I'd prefer a (however
Steven D'Aprano [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
On Sat, 15 Oct 2005 18:17:36 +0200, Christian Stapfer wrote:
I'd prefer a (however) rough characterization
of computational complexity in terms of Big-Oh
(or Big-whatever) *anytime* to marketing-type
characterizations
Ron Adam [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Christian Stapfer wrote:
This discussion begins to sound like the recurring
arguments one hears between theoretical and
experimental physicists. Experimentalists tend
to overrate the importance of experimental data
(setting
Ron Adam [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Christian Stapfer wrote:
This discussion begins to sound like the recurring
arguments one hears between theoretical and
experimental physicists. Experimentalists tend
to overrate the importance of experimental data
(setting
Fredrik Lundh [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Christian Stapfer wrote:
As to the value of complexity theory for creativity
in programming (even though you seem to believe that
a theoretical bent of mind can only serve to stifle
creativity), the story
Ron Adam [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Christian Stapfer wrote:
Ron Adam [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Christian Stapfer wrote:
This discussion begins to sound like the recurring
arguments one hears between theoretical and
experimental
Steven D'Aprano [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
On Sun, 16 Oct 2005 15:16:39 +0200, Christian Stapfer wrote:
Come to think of an experience that I shared
with a student who was one of those highly
creative experimentalists you seem to have
in mind. He had just
Steven D'Aprano [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
On Sun, 16 Oct 2005 19:42:11 +0200, Christian Stapfer wrote:
Pauli's prediction of
the existence of the neutrino is another. It took
experimentalists a great deal of time and patience
(about 20 years, I am told) until
Alex Martelli [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Christian Stapfer [EMAIL PROTECTED] wrote:
This is why we would like to have a way of (roughly)
estimating the reasonableness of the outlines of a
program's design in armchair fashion - i.e. without
having to write any
Alex Martelli [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Christian Stapfer [EMAIL PROTECTED] wrote:
Alex Martelli [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Christian Stapfer [EMAIL PROTECTED] wrote:
This is why we would like to have a way of (roughly
Paul Rubin http://[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Fredrik Lundh [EMAIL PROTECTED] writes:
PEP 348 addresses this by moving special exceptions out of the
Exception hierarchy:
http://www.python.org/peps/pep-0348.html
I see that suggestion was rejected (it needed
Paul Rubin http://[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Christian Stapfer [EMAIL PROTECTED] writes:
I guess it means the following:
Terminating exceptions are exceptions that
terminate the *thrower* of the exception.
Are you sure?
Am I sure? - Well no! As I wrote
[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hello everyone, I'm experimenting with python and i'm following this
tutorial:
http://docs.python.org/tut/node6.html#SECTION00640 I'm
in section 4.7.5 Lambda Forms. In this section I was working along and
I noticed
someone (more knowledgeable than myself as regards PIL
and this true-type font loading business) please point me
in the right direction?
Many thanks in advance,
Christian Stapfer
--
http://mail.python.org/mailman/listinfo/python-list
Christian Stapfer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
After switching from Python 2.3 to 2.4 (Enought),
^
I mean: Python Enthought Edition--Python 2.4.3 for Windows,
sorry for that.
I see in the documentation for PIL
Christian Stapfer wrote:
After switching from Python 2.3 to 2.4 (Enought),
PIL throws an exception that did not occur formerly
(under Python 2.3) when executing
ImageFont.truetype(font, size)
snip/
A module seems to be missing: do I have to install something
in addition to PIL
Robert Kern wrote:
Fredrik Lundh wrote:
Christian Stapfer wrote:
Problem solved by rudely installing PIL 1.1.5 for Windows and
Python 2.4 from http://www.pythonware.com/products/pil/
right on top of my existing Python Enthought Edition--Python
2.4.3 for Windows. This might have destroyed
Paul Boddie [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
barbaros wrote:
I need to put some dynamic drawings on my web page. More precisely, I
need to draw a number of geometric figures (circles, rectangles) which
evolve into a graphics windows according to some law (a little
[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I am trying to write some code that will take a list of functional
expressions, and order them so that those with primitive terms appear
at the beginning of the list and those that are defined by other terms
appear last.
eg:
Hi,
I get the following traceback when trying to have
wx.lib.pdfwin.PDFWindow open a PDF file:
E:\Tutoring\Teacher\Flashcardspython pdfwin1.py
Traceback (most recent call last):
File pdfwin1.py, line 50, in OnOpenButton
self.pdf.LoadFile(dlg.GetPath())
File
krishnakant Mane wrote in message
news:[EMAIL PROTECTED]
On 11/02/07, Vishal Bhargava [EMAIL PROTECTED] wrote:
Use Report Lab...
I mentioned in my first email that I am already using reportlab.
but I can only generate pdf out of that.
I want to display it on screen and I also will be giving
Here's an interesting little problem: I am given a master.ttf font file and
a subset file subset.ttf of that font, and I am asked to map indices of all
the glyphs in subset.ttf to the corresponding indices in master.ttf. The
subset font file is the result of a pipeline of 3 tools (pdflatex,
Christian Stapfer nob...@nowhere.nil schrieb im Newsbeitrag
news:b7256$4bf516e1$544ba447$20...@news.hispeed.ch...
Here's an interesting little problem: I am given a master.ttf font file
and a subset file subset.ttf of that font, and I am asked to map indices
of all the glyphs in subset.ttf
33 matches
Mail list logo