the
request.\nError code: '+str(e.code))
else:
# everything is fine
h = self.headers = {}
return 0,..
finally:
socket.setdefaulttimeout(oto)
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
was a 16bit number which is why I started with
16bit hashes.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Thomas Jollans wrote:
Robin Becker wrote:
...
I'm not sure my postscript is really good enough to do the latter so I
hoped to pursue a python based approach which has a low probability of
busting. Originally I thought the range was a 16bit number which is why
I started with 16bit hashes
reasonable candidates.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Is the any way to get an efficient 16bit hash in python?
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Josiah Carlson wrote:
Robin Becker wrote:
Is the any way to get an efficient 16bit hash in python?
hash(obj)65535
- Josiah
yes I thought of that, but cannot figure out if the internal hash really
distributes the bits evenly. Particularly since it seems to treat integers etc
as special
and
redundancies allow for extra mutation and combination possibilities which is a
good thing for the whole population. If you must, add the requirement to the
target ie give extra fitness points to organisms which perform efficiently.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo
not exactly sure about the
filesystem to be used. I think it might be some kind of NFS which might impact
some of these solutions.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
simultaneously.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
of the
remaining work, etc.).
that might work, but this runs on someone's java solaris box with possible
many
connections going on. I doubt I'd be able to guarantee a particular port.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Wildemar Wildenburger wrote:
Robin Becker wrote:
Well I can think of a dumb way: create a temporary file during the
transaction and have your script check for that before running its main
body.
I think thats the most hassle free way of doing it.
/W
I looked at the temporary
have names like
my_my_new.py my_my_list.py .. my_my_my_new.py .
I leave as an exercise the algorithm which chooses the appropriate version of
new/list to use :)
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
not being built for some reason.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Robin Becker wrote:
I am getting an error while building python-2.5.1 on a freebsd 6.1 machine as
a
normal user
./configure --prefix=/home/me/mypython --enable-unicode=ucs2
seems to work fine, but make install fails whilst running
Compiling
/home/my/mypython/lib/python2.5/test
is possible via __raw__.
However, if you do anything like x.strip() the original is lost. I'm not sure
that's a bad thing, but I thought I would ask what others do for this problem.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
these path string conversions?
Paths appear to come from all sorts of places and given the increasing use of
zip file packaging it doesn't seem appropriate to rely on the current platform
as a single choice for the default encoding.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo
Tijs wrote:
Robin Becker wrote:
...
Zip files contain a bit flag for the character encoding (cp430 or utf-8),
see the ZipInfo object in module zipfile and the link (on that page) to the
file format description.
But I think some zip programs just put the path in the zipfile, encoded
you got the wrong vampire ;)
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
much out of the box and so
I
sent him the pyd. Just more legacy code; eventually calldll won't compile and
then the conversion will be forced anyhow.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
**100 and the
smallest 10**-200 I probably have an ill determined problem; surprisingly easy
to achieve :(
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Robin Becker wrote:
lancered wrote:
h. If
your matrix is symmetric then you should certainly be using
a qr decomposition I meant to say :)
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
\python\lib\test\pystone.py
Pystone(1.1) time for 5 passes = 2.16123e-005
This machine benchmarks at 2.3135e+009 pystones/second
:) not
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Nick Craig-Wood wrote:
Robin Becker [EMAIL PROTECTED] wrote:
I'm using subprocess to carry out svn commands (probably should use the svn
api
.
Clearly I need to supply some kind of input filelike object, but is this
sort of
thing possible.
Yes it is possible
is it possible to detect that input is required and only in
that case issue the current contents of stdout (presumably a request for a
password)?
Clearly I need to supply some kind of input filelike object, but is this sort
of
thing possible.
--
Robin Becker
--
http://mail.python.org/mailman
, but which?
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
the different behaviours between unix
win32 (or perhaps different defaults are somehow magically decided upon).
-things were so much easier when bytes were bytes-ly yrs-
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
apache+mod_fastcgi and choosing the
configuration parameters was the main difficulty.
Using fcgi did induce some fairly careful code consideration to ensure we could
rerun without blowing up the universe.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
','ao')
def deSort(a,b):
return cmp(_deSpell(a),_deSpell(b))
l = [Aber, Ärger, Beere]
l.sort(deSort)
print l
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
.replace(/\u00C5/g,'A~~') //A ring
.replace(/\u00e5/g,'a~~'); //a ring
does this actually make sense?
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
:\tmpcat ex.txt
a,b,c,d,
a1,b1,c1,d1,
a2,b2,c2,d2,
c:\tmpsed -es/,$// ex.txt
a,b,c,d
a1,b1,c1,d1
a2,b2,c2,d2
c:\tmp
that doesn't involve python of course. I recommend one of the many tutorial
introductions to python if the problem requires its use.
--
Robin Becker
--
http://mail.python.org
is a constantly changing
language without any clear goal or endpoint. That's fine for some not for
others.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
the remote world!)')
print channel.receive()
and I see
C:\tmp\tmp\tgw.py
Hello From the remote world!
C:\tmp
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
),360)
... mins, x = divmod(x,6)
... secs, x = divmod(x,1000)
... s = '%02d:%02d:%02d' % (hours, mins,secs)
... if x: s += ',%03d' % x
... return s
...
millis2str(185804)
'00:03:05,804'
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Tina I wrote:
..
It's also a village in Norway: http://en.wikipedia.org/wiki/Hell,_Norway
In German it's bright
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
above in the init, but is there any way of printing it from within the
main without creating an object of the MyClass type. I need to assign
the name of the class within my script, to a variable in main.
Thanks,
Barry.
class A:
... pass
...
print A.__name__
A
--
Robin Becker
: mysqlclient
! zlib
! wsock32
! advapi32
! #msvcrt
! #libcmt
#extra_compile_args:
! extra_objects: /NODEFAULTLIB:MSVCRT
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
)..
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
of numbers:
|avg=: +/ % #
|avg 1 2 3 4
| 2.5
That looks like some variation of APL
my colleague informs me that it is indeed associated with some of the same
people if not with Mr Iverson.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Robin Becker wrote:
Giles Brown wrote:
What about downloading the spin-off library?
http://sourceforge.net/projects/comtypes/
(I think this was created to move the com stuff out of ctypes?)
Thanks I didn't know that; I'll give it a whirl.
I tried, but failed to get
Giles Brown wrote:
What about downloading the spin-off library?
http://sourceforge.net/projects/comtypes/
(I think this was created to move the com stuff out of ctypes?)
...
Thanks I didn't know that; I'll give it a whirl.
--
Robin Becker
--
http://mail.python.org/mailman
Dick Moores wrote:
http://rgruet.free.fr/PQR25/PQR2.5.html
Is this reliable? (Looks good to me, but...)
.
I really like these for a good overview
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
too old to bother with.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
about 2.5 being 10% faster than 2.4/2.3
etc
etc. Can anyone say where the speedups were? Presumably we have a lot of old
cruft that could be improved in some way eg moving loops into comprehensions,
using iterator methods etc. Are those sort of things what we should look at?
--
Robin Becker
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
Robin Becker a écrit :
AFAIK, most of the speedup comes from optimization of the builtin dict
type, which is the central
data structure in Python. But anyway, as Robert pointed out, using CGI
means lauching
a new Python process for each and every HTTP
this helps
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Martin v. Löwis wrote:
Robin Becker schrieb:
Is there a simple/cheap way for C code to cache these sorts of module
level globals on a per interpreter basis? Is there even a way to tell
which interpreter I'm being called in?
There is no cheap way to add to the interpreter state. As Chris
in?
Anything too costly will probably bust any speedup. Luckily I don't think we
have too many of these cached variables so it's possible we may be able to get
away with just dropping the caching for some and eliminating others.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Chris Mellon wrote:
On 12/28/06, Robin Becker [EMAIL PROTECTED] wrote:
As part of some django usage I need to get some ReportLab C extensions into a
state where they can be safely used with mod_python.
.
Just off the top of my head, I'd think that using thread-local storage
instead
Robin Becker wrote:
Chris Mellon wrote:
On 12/28/06, Robin Becker [EMAIL PROTECTED] wrote:
As part of some django usage I need to get some ReportLab C extensions into
a
state where they can be safely used with mod_python.
.
Just off the top of my head, I'd think that using thread
Robin Becker wrote:
Giovanni Bajo wrote:
yeah that's pretty cryptic. It's a known bug which I need to come around
and fix it. Anyway, the message itself is harmless: if the program then
exits, there is *another* problem.
If you want to help with that, you could enable the console
issue in the unpacking
somewhere.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
what the traceback is. I'd be very glad to fix the problem for you.
No problem I'll give it a whirl tomorrow.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
what the traceback is. I'd be very glad to fix the problem for you.
No problem I'll give it a whirl tomorrow.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
and A H*? This thread
certainly
needs shutting down :)
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
- no strange sys calls) for x86 Linux,
does this stuff run well also on x86 FreeBSD?
Robert
I would guess not, but perhaps you could install one or other of the freebsd
linux compatibility layers and link your stuff to their libs etc etc.
--
Robin Becker
--
http://mail.python.org/mailman
Robin Becker wrote:
robert wrote:
i80and wrote:
I haven't personally used freeze (Kubuntu doesn't seem to install it
with the python debs), but based on what I know of it, it makes make
files. I'm not a make expert, but if FreeBSD has GNU tools, freeze's
output _should_ be able
with it should be
adaptable if you're interested (only around 300 lines).
I have a feeling that the UK/AU 4state codes aren't as exotic, but not having
actually implemented them it's hard to say.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
the reference only occur
when the code is executed?
I have a vague feeling that I came across problems in the past about the
order in which modules were finalized.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
the
resource is the best place.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Szabolcs Nagy wrote:
if you only want to do some analysis i think you need this one (as it's
pretty complete and simple):
https://networkx.lanl.gov/
seems to be broken at present with a python traceback coming out; not a
good advert for python and/or trac
--
Robin Becker
in restricted mode',)
perhaps I'm seeing different apache processes or something
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
be set in the kernel config.
yes those limits look pretty low. I think POSH grabs 60 the first time
and then fails the second as the limit appears to be 61. I wonder what
the actual cost is of having lots of semaphores.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Robin Becker wrote:
Andrew MacIntyre wrote:
Robin Becker wrote:
I think it uses sysv semaphores and although freeBSD 6 has them
perhaps there's something I need to do to allow them to work.
IIRC, you need to explicitly configure loading the kernel module, or
compile the kernel
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Andrew MacIntyre wrote:
Robin Becker wrote:
I think it uses sysv semaphores and although freeBSD 6 has them
perhaps there's something I need to do to allow them to work.
IIRC, you need to explicitly configure loading the kernel module, or
compile the kernel with the necessary option
sturlamolden wrote:
Robin Becker wrote:
it's probably wonderful, but I don't think I can ask people to add numpy to
the
list of requirements for reportlab :)
This was Matlab, but the same holds for Python and NumPy. The overhead
in the first code sniplet comes from calling
are comparing a number with a negated
number; the bits might drop off in 32 bits, but not in 64.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Travis E. Oliphant wrote:
Robin Becker wrote:
NumPy defines an array and an array scalar for all signed and unsigned
integers defined in C.
import numpy as nx
type(nx.array([1,2,3],dtype=nx.uint32)[0])
type 'numpy.uint32'
great, but do we have a pure python version?
--
Robin
Martin v. Löwis wrote:
Robin Becker schrieb:
Hi, just trying to avoid wheel reinvention. I have need of an unsigned
32 bit arithmetic type to carry out a checksum operation and wondered if
anyone had already defined such a beast.
Our current code works with 32 bit cpu's, but is failing
Paul Rubin wrote:
Robin Becker [EMAIL PROTECTED] writes:
type(nx.array([1,2,3],dtype=nx.uint32)[0])
type 'numpy.uint32'
great, but do we have a pure python version?
array.array('L', [1,2,3])
yes that works if @L is unsigned 32 bit. I guess L is always 4 bytes. Part of
my confusion comes
Martin v. Löwis wrote:
Robin Becker schrieb:
def add32(x, y):
Calculate (x + y) modulo 2**32
return ((x0xL)+(y0xL)) 0xL
That's redundant; it is sufficient to write
return (x+y) 0x
def calcChecksum(data
to add numpy to the
list of requirements for reportlab :)
I used to love its predecessor Numeric, but it was quite large.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
still miss the CDC 6000's where we had two zeroes :)
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
to this approach:
wouldn't this approach apply to other additions eg list+list seq+seq etc
etc.
I suppose the utility of such an approach depends on the frequency with
which multiple strings/lists/sequences etc are added together in real code.
--
Robin Becker
--
http://mail.python.org
set the cpu affinity easy with occam maybe not in
python.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Paul Rubin wrote:
Robin Becker [EMAIL PROTECTED] writes:
Nobody seems to have mentioned POSH http://poshmodule.sourceforge.net
which used almost to work. I assume it's busted for later pythons and
the author says it's just a demonstration.
Yeah, it's been mentioned.
Anandtech demoed an 8
Paul Rubin wrote:
Robin Becker [EMAIL PROTECTED] writes:
No I think they tried to just run a lot of processes at once and they
got the 8 core by just substituting the two dual cores with two quads.
Huh?! There are no quad core x86 cpu's as far as I know ;).
well these guys seem to think
have used similar to get boot sectors etc, but then did you really think Bill
would let us play with our own hardware? Just wait till DRM gets here.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
language implementation, etc.?
I suspect the hang may be python actually trying to work out the
1 followed by 735293857239475 zeroes. Perhaps IronPython has a forward
looking algorithm that knows when to give up early.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
all the extensions etc etc for another
architecture
it might not seem so attractive.
-not ready for 64bitly yrs-
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
/free were
appropriate. Another parser attribute does hold an array of pointers to python
objects, but again I don't think that should be a problem.
Has anyone got any clue what the problem might be or a fixed version of the
code?
--
Robin Becker
--
http://mail.python.org/mailman/listinfo
Robin Becker wrote:
I have a segfault problem in Python2.5 RC1 (win32) when using the venerable
extension sgmlop.c.
..
Has anyone got any clue what the problem might be or a fixed version of the
code?
I think this is PyObject_NEW mixed with PyMem_DEL, I thought that had already
come
Steve Holden wrote:
Robin Becker wrote:
...
Has anyone got any clue what the problem might be or a fixed version of the
code?
I'm guessing this might be to do with the changes that have been made to
enable 64-bit readiness in the code, but I couldn't suggest specifics.
Suspect all
unless scipy has a release for .net. I think all those nice
algorithms are in C or Fortran and mostly haven't been translated into C#.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
about it and as a standalone
script
it appears to work fine (ie it seems to compile and run).
Any ideas?
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Robin Becker wrote:
I'm trying to understand the following strangeness
C:\code\rlextra\erspython
Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32
Type help, copyright, credits or license for more information.
from rlextra.utils.SimpleXMLRPCServer import
32 bit addressing on 8088
machines (with 16 bit registers), but I think the M$ compilers all had near and
far pointer mechanisms to help you get confused.
-mumbling-ly yrs-
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
of other C extensions involved including PIL,
but
I built them all against this beta. What should I do to refine the error? Do I
start with trying to establish which of the tests is guilty or build from
source
in debug mode and attempt to find the problem from below.
--
Robin Becker
--
http
the test file
and then the statement; then try and figure out whether it's worth doing
a debug build.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
environment is in fact not the same
as
the other. Is there some way to work out if I'm in the same interpreter if in
fact we're joining the DLL in two places perhaps?
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
the statement
libc = cdll.LoadLibrary(/lib/libc.so.6)
This allows somethings to run eg
AxonVisualiser.py --navelgaze
but I'm not sure if the results are really unaffected by not having a
real yielder. The diagram appears, but doesn't seem to settle down.
--
Robin Becker
--
http://mail.python.org
Robin Becker wrote:
Michael wrote:
Hi!
(OK, slightly silly subject line :)
I'm extremely pleased to say - Kamaelia 0.4.0 has been released!
.
whoops, forgot to say thanks as I think this is very nice work
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
bundle_files option it
should
be possible to integrate our tcl/tk stuff into a common library.zip as that
seems to be the method used by freewrap.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Robin Becker wrote:
Don't know if this is the right place to ask, but has anyone considered using
something like tcl's freewrap code to integrate tkinter into py2xe single
executables?
We currently use the (fairly clunky) nsis route to create single file
executables with py2exe as input
at
http://www.pythonstuff.pwp.blueyonder.co.uk/
account: python password: guest
not sure I can help, but clicking on that http link produces a 404 for me.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
silent.
Trying to call XL a net abuser is just silly and wrong. Many people have ideas
which others consider wrong, blasphemous, dangerous, stupid etc etc etc, but
freedom of expression is important.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
501 - 600 of 735 matches
Mail list logo