Jp Calderone wrote:
> On Wed, 15 Jun 2005 16:38:32 +0100, Robin Becker <[EMAIL PROTECTED]> wrote:
>
>>Michael Hoffman wrote:
>>.
>>
>>>Well, you could use python -u:
>>>
>>
>>unfortunately this is in a detached process and I am ju
s not a better way that I know of. I keep a
> slightly-more generalized Surrogate class around to deal with this
> pattern, and then my LineFlusherFile would be a subclass of that. But
> it's the same thing, really.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
def write(self,s):
self._f.write(s)
if '\n' in s:
self._f.flush()
I wondered if I could make a file subclass somehow fail the PyFile_Check which
allows the optimization.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
d data.
>
Unfortunately select isn't an option for windows (I think that's only for
sockets). I guess I need to read repeatedly from the stdout etc to get the
output. Clearly the poll call can't return a status until we've finished
reading.
>
> Dieter
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
a process state of POLL). I assume that the subprocess is filling
up the pipe and then failing to wake up again. I had expected that
subprocess would take care of this for me, but possibly I'm being
utterly clueless and stupid. What should I do to avoid blocking in the
subprocess?
-
John J. Lee wrote:
>
> What's a fast object library?
>
ferrarilib :)
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
vice names for Joystick in Linux.
wxGTK: Applied patch #1207162 wx.TextCtrl.SetStyle fix for overlapping
calls.
wx.FileConfig: fixed DeleteEntry to set the dirty flag properly so the
change will get written at the next flush.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give y
vice names for Joystick in Linux.
wxGTK: Applied patch #1207162 wx.TextCtrl.SetStyle fix for overlapping
calls.
wx.FileConfig: fixed DeleteEntry to set the dirty flag properly so the
change will get written at the next flush.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give y
Kent Johnson wrote:
> Robin Becker wrote:
>
>> Ilpo Nyyssönen wrote:
>>
>>>
>>> with locking(mutex), opening(readfile) as input:
>>> ...
>>
>>
>> with EXPR as x:
>> BLOCK
>>
>> EXPR can be a tuple so the a
. Switching uid at startup allows the client code to
be private; so is that a strategy for protecting the
encryption/decryption which obfuscates the xmlrpc channel?
Anyone done this sort of thing before?
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Ilpo Nyyssönen wrote:
...
>
> with locking(mutex), opening(readfile) as input:
> ...
with EXPR as x:
BLOCK
EXPR can be a tuple so the above would be ambiguous.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
stdin, but I don't know
how to tell it to ignore stdin. The value None seems to be used to signal that
the existing stdin is used and that fails. I believe the solution is just to
use
PIPE for stdin as well and then I don't have to write to it.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
ible to get pythonw apps eg tkinter guis to use
subprocess properly? Seems a bit daft to me.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
._make_inheritable(p2cread)
File "c:\python\lib\subprocess.py", line 650, in _make_inheritable
DUPLICATE_SAME_ACCESS)
WindowsError: [Errno 6] The handle is invalid
C:\Tmp>
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
lendarCtrl: Patch #1207531, Keeps the CalendarCtrl wide
enough even when the weekday names for the locale are shorter than
usual.
Made GridCellNumberEditor.StartingKey also insert the typed char when
there is a range of allowed values (so a wx.SpinCtrl is used instead
of a wx.TextCtrl.)
--
Robin
Martin v. Löwis wrote:
> Robin Becker wrote:
>
>>ie if we have N importers and F leading failure syspath entries before
>>the correct one is found do we get order N*F failed stats/opens etc etc?
>
>
> No. Each path hook is supposed to provide a decision as to whether
porting from them
> may still succeed if though stat fails.
so is there implication of multiplicative behaviour?
ie if we have N importers and F leading failure syspath entries before the
correct one is found do we get order N*F failed stats/opens etc etc?
--
Robin Becker
--
http
Robin Becker wrote:
.
> before the child ends its sleep. Of course it may be that it's just the
> handles
> that are being held.
After further tests with procexp it seems that the parent is allowed to die,
but
its output is held up (perhaps apache is waiting on an eof) u
before the child ends its sleep. Of course it may be that it's just the handles
that are being held.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
's import hook treatment
>
> When there is an importer "i" for a path "p" and
> this importer cannot find module "m", then "p" is
> treated as a directory and 5 file system operations
> are tried to locate "p/m".
the default for some other kind of python
installation?
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Peter Otten wrote:
Robin Becker wrote:
#sscan1.py thanks to Skip
import sys, time, mmap, os, re
fn = sys.argv[1]
fh=os.open(fn,os.O_BINARY|os.O_RDONLY)
s=mmap.mmap(fh,0,access=mmap.ACCESS_READ)
l=n=0
t0 = time.time()
for mat in re.split("X", s):
re.split() returns a list, not a
Peter Otten wrote:
Robin Becker wrote:
#sscan1.py thanks to Skip
import sys, time, mmap, os, re
fn = sys.argv[1]
fh=os.open(fn,os.O_BINARY|os.O_RDONLY)
s=mmap.mmap(fh,0,access=mmap.ACCESS_READ)
l=n=0
t0 = time.time()
for mat in re.split("X", s):
re.split() returns a list, not a
=os.open(fn,os.O_BINARY|os.O_RDONLY)
s=mmap.mmap(fh,0,access=mmap.ACCESS_READ)
l=n=0
t0 = time.time()
for mat in re.split("X", s):
n += 1
l += len(mat)
t1 = time.time()
print "fn=%s n=%d l=%d time=%.2f" % (fn, n, l, (t1-t0))
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
stems run out of memory they tend to
perform poorly. I'm not sure the horrible degradation I see with large files is
necessary, but I know it occurs on at least one common vm implementation.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Robin Becker wrote:
Skip Montanaro wrote:
..
I'm not sure why the mmap() solution is so much slower for you.
Perhaps on
some systems files opened for reading are mmap'd under the covers.
I'm sure
it's highly platform-dependent. (My results on MacOSX - see below -
redict low memory problems. When systems run out of memory they tend to
perform poorly. I'm not sure the horrible degradation I see with large files is
necessary, but I know it occurs on at least two common vm implementations.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
ome responsive (ie things were entirely paged out).
as another data point with sscan0/1.py (slight mods of your code) I get
this with a 200mb file on freeBSD 4.9
/usr/RL_HOME/users/robin/sstest:
$ python sscan0.py xxx_200mb.dat
fn=xxx_200mb.dat n=3797470 l=181012689 time=7.37
/usr/RL_HOME/users/
fered case as that would be more realistic.
It has been my experience that all systems crawl when driven into the
swapping region and some users of our code seem anxious to run huge
print jobs.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Jeremy Bowers wrote:
On Tue, 26 Apr 2005 20:54:53 +, Robin Becker wrote:
Skip Montanaro wrote:
...
If I mmap() a file, it's not slurped into main memory immediately, though as
you pointed out, it's charged to my process's virtual memory. As I access
bits of the file's co
text control.
wxMac: Corrected refresh bugs in wxGrid.
XRCed: Updated to version 0.1.5.
* Added wxWizard, wxWizardPageSimple (only from pull-down menu).
* Hide command for test window.
* Replacing classes works better.
* Added Locate tool.
--
Robin Dunn
Software Craftsman
http://wxP
d 4096b to scan. That's a lot less than even the page
table requirement. This isn't rocket science just an old style observation.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Skip Montanaro wrote:
Robin> So we avoid dirty page writes etc etc. However, I still think I
Robin> could get away with a small window into the file which would be
Robin> more efficient.
It's hard to imagine how sliding a small window onto a file within Python
would be
etting re to co-operate and probably halves 4
5..... :)
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
give it a whirl
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Richard Brodie wrote:
"Robin Becker" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Gerald Klix wrote:
Map the file into RAM by using the mmap module.
The file's contents than is availabel as a seachable string.
that's a good idea, but I wonder if it actual
t in practice though :(
-guzzling-ly yrs-
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
rly as the loop progessed through the file). Am I actually saving anything
by not letting normal vm do its thing?
HTH,
Gerald
Robin Becker schrieb:
Is there any way to get regexes to work on non-string/unicode objects.
I would like to split large files by regex and it seems relatively
hard to do
termination and getting a partial
match to be resumable seems out of the question.
What interface does re actually need for its src objects?
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
eed a number of perl modules which do that and other modules which
allow you to overprint etc etc.
You can always hand translate one of the extract perl modules. They don't seem
that hard. Alternatively put a good case to [EMAIL PROTECTED]
--
Robin Becker
--
http://mail.python.org/mailma
raction of rights to this
algorithm or you will hear from my solicitor, Mr J. Peasbody.
Yours in law,
James Harlow.
Isn't it time we decompressed Adolf Hitler so that this thread can die?
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Raymond Hettinger wrote:
[Robin Becker]
People have mentioned the older v6 build scripts/tools still work. Last time I
tried they seemed a bit out of date.
I routinely use the current CVS to build Py2.4 and Py2.5 with MSC6.
It is effortless and I've had no problems.
Raymond Hettinger
.
ried they seemed a bit out of date.
-wondering where my paper tape editor is-ly yrs-
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
on which returns a copy of the
list of top-level windows that currently exist in the application.
Updated docview library modules and sample apps from the ActiveGrid
folks.
Added the ActiveGrid IDE as a sample application.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters?
o plan for.
-paradoxically yrs-
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
ly shortcoming!
-- robin
--
http://mail.python.org/mailman/listinfo/python-list
with an unexpected rigour and invigorating sense of
adventure. Alex Martelli and the others should be congratulated.
-- robin
--
http://mail.python.org/mailman/listinfo/python-list
return True
def _dispatch(self, method, args):
do_something(self.client_ip)
Though using a firewall would not be remiss. :-)
-- robin
--
http://mail.python.org/mailman/listinfo/python-list
Raymond Hettinger wrote:
[Robin Becker]
This function from texlib in oedipus.sf.net is a real cpu hog and I determined
to see if it could be optimized.
def add_active_node(self, active_nodes, node):
"""Add a node to the active node list.
The node is added so that the list
Peter Otten wrote:
Robin Becker wrote:
Is there a fast way to get enumerate to operate over a slice of an
iterable?
I think you don't need that here:
e = enumerate(active_nodes)
for insert_index, a in e:
# ...
for index, a in e:
# ...
Peter
I tried your solution, but I think we mis
ignificant speedup and is I believe is still
equivalent. I'm not sure exactly why this is faster than the while loop, but it is.
However, it seems harder to get the same speedup for the last while loop; that
loop is probably not such a problem so it's not terribly important.
Is there a
Robin Becker wrote:
I'm trying to get pySimplex working in Python 2.4, but I find that
kjbucketsmodule.c makes reference to rename2.h which doesn't seem to be
present in Python 2.4.
I suppose that kjbucketsmodule.c needs to be brought up to date. It
occurs to me that someone may ha
o is there a
modern version of the source on the web somewhere?
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Robert Kern wrote:
Robin Becker wrote:
yes, but the simple download is a bit bare, I was hoping to find out
more and then the passport login seems to come into play. Is there no
other homepage somewhere? I assumed wsa www.ironpython.com, but that
seems a bit out of date now. The mailing list
for news
but nothing...
Has anyone managed to download the new release?
If so please, would you email it to me at luismgz at gmail.com ??
I managed by clicking on the gotdotnet link and got a zip file OK.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Thomas Heller wrote:
well that's nice, but I don't do blogs and certainly don't do M$
Passport logins which it seems the gotdotnet site requires.
Robin - we're too old for blogs ;-)
But I could download the thingie with Mozilla without logging in into
somewhere - alth
Benjamin Niemann wrote:
Robin Becker wrote:
..
I'm also a bit puzzled that www.ironpython.com has no mention of this
release.
Curious that J Hugunin didn't announce it himself.
Jim Hugunin announced it himself in a keynote at PyCon. You can read a lot
about it on Python centric bl
n didn't announce it himself.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
eems like a reasonable expectation, but all I am readily aware of in
this market is ReportLab. Any suggestions?
-- robin
--
http://mail.python.org/mailman/listinfo/python-list
Robin Becker wrote:
I'm trying to get a handle on a real world problem related to raising an
exception. This is in the reportlab SimpleDoctemplate class.
The following code takes a very long time (>60 seconds) in Python 2.2,
2.3, 2.4, but not in 2.1 (at least on windows).
raise Lay
Clearly this must be some kind of bug, but is it Python 2.2/3/4 or in our code.
Since the change occurs in 2.1-->2.2 I can think of GC/new style classes etc.
Can anyone advise on what would be a good strategy to illustrate/refine/solve
this problem?
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
askColour methods to
wx.Image.
Added wx.Rect.IsEmpty
wxGTK:
- Corrected wx.ListBox selection handling
- Corrected default button size handling for different themes
- Corrected splitter sash size and look for different themes
- Fixed keyboard input for dead-keys
--
Robin Dunn
Software Craf
I have a dictionary. Each key contains a list. I am using the
contents of the list to build a portion of a command line.
However, before I can build the command line, I have to make sure that
the command isn't too long. This means that I have to step through
each item in the list twice: once to
which is Free or Open Source?
What I need are the following things:
- runs in Windows
- single stepping
- variable watches
- breakpoints
Just the typical debugger stuff.
Alex
I used hapdebugger for such a purpose some time ago, but I believe it
needs a special startup python.exe.
--
Robin B
ef somemeth(self):
... pass
...
>>> class Bar(Foo):
... def othermeth(self):
... pass
...
>>> def findClass(meth):
... for x in meth.im_class.mro():
... if meth.im_func in x.__dict__.values(): return x
...
>>> findClass(Bar.so
ility without some coding,
but it has been implemented in various ways using sockets etc etc.
I seem to remember that modern idle uses an rpc technique for debugging.
There are several python projects which address interprocess
communication pyro http://pyro.sourceforge.net/ is a good example.
--
Michael Hoffman wrote:
Robin Becker wrote:
self.__class__.__name__
Unless I misunderstood the question, that won't work. That will
give you the name of the class the object is an instance is of.
I think he wants the name of the class the method was defined in.
Here's a way to do
[EMAIL PROTECTED] wrote:
...
My question is this: what can be substituted for that will
make the example above work?
self.__class__.__name__
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
and thanks again
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
it__.py for
an implementation of mine which you can steal in toto (because it's
public domain).
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
port database
class C(database.C):
_fieldDefs = database.C._fieldDefs+[..]
database.C = C
Is there a better way to do this which preserves more of C's original identity?
I suppose I want to call the metaclass initialization again, but can't see a way
to do that.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
group 996688 Dec 31 09:57 test.rml
C:\Tmp>
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
on%20extensions
which may help
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
sa006&articleID=000479CD-F58C-11BE-AD0683414B7F&ref=rdf
-can't wait to get my quantum computer-ly yrs-
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Robin Becker wrote:
Presumably he is talking about crypo-export rules. In the past strong
cryptography has been treated as munitions, and as such exporting it
(especially from the USA) could have got you into very serious
trouble.
So Python is an American Language and must obey American Law
Nick Craig-Wood wrote:
Robin Becker <[EMAIL PROTECTED]> wrote:
Paul Rubin wrote:
"Reed L. O'Brien" <[EMAIL PROTECTED]> writes:
I see rotor was removed for 2.4 and the docs say use an AES module
provided separately... Is there a standard module that works alike or
an
sources of removed modules?
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
/~rgbecker/cgi-bin/pytestcgi.cgi
Please don't misuse it's free and I'm no longer an American :)
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
re alleged not to be threadsafe. Some Linux distributions ship standard
this way.
...
unfortunately mod_python3 seems to need exactly the opposite ie apache2
with threads. However, I originally tried to get php going with apache2
in the standard mode and still had problems.
--
Robin Beck
, moinmoin and others work fine with apache2 maybe because they use a cgi
style interface. I would stick with a pythonic solution unless there's a good
reason not too.
-too old to learn a new language-ly yrs-
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Scott David Daniels wrote:
Then you need "Scott and Dave's Programming Language" -- SAD/PL.
By providing separate data types for even and odd numbers, you can
avoid off-by-one errors ;-)
mmmhhh off by two-licious
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Alex Martelli wrote:
Robin Becker <[EMAIL PROTECTED]> wrote:
.
Well your utility function seems to be related to "learn more approaches
to programming".
Which part of "if" do you find hard to parse?
no part
I suspect there may be some programming language
measu
Alex Martelli wrote:
Robin Becker <[EMAIL PROTECTED]> wrote:
Alex Martelli wrote:
.
If you're looking for SERIOUS multiparadigmaticity, I think Oz may be
best -- <http://www.info.ucl.ac.be/people/PVR/book.html> (the book's
authors critique the vagueness of the "pa
amrks are always wrong, but which score moves this language to
the top in your opinion?
Alex
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
so does CTMCP
(acronym for this new book by Van Roy and Haridi) work for Oz, it
appears to me.
.very interesting, but it wants to make me install emacs. :(
Alex
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
cation that it not
required. An unnecessary name is visual noise.
The thing that is probably a bit stupid about lambdas (I admit to having
done this) is
x = lambda a,b,c:...
which could just as well be written
def x(a,b,c):return .
with only a few extra characters.
--
Robin Becker
-
s any sense of what would be a decent approach to OS
design etc.
It's sad that people who are otherwise sensible about opensource seem to
be a bit silly about the poisoned apples. There was no rational reason
for me to upgrade to VC 7.x, but now I'm forced to by my preferred language.
-
4
Don't have a decent TCL any more so haven't compiled that stuff.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Martin v. Löwis wrote:
Robin Becker wrote:
I don't think this forces the linker to load stuff from this module
although I can see that it might be dangerous depending on which obj
files are seen first.
I think you are wrong. In the object, there will be simply a linker
command line o
Martin v. Löwis wrote:
Robin Becker wrote:
I thought that static .libs didn't make reference to the dll's they
need; isn't that done at load time?
Unfortunately, thanks to Microsoft's infinite wisdom, static libs
*do* reference DLLs. The C lib headers contain things like
#pr
Daniel Dittmar wrote:
Robin Becker wrote:
actually I want to build the PIL extension for 2.4 as pyd and include
various libraries eg zlib and jpeg. To avoid the missing dlls issue we
have done this in the past by incorporating the zlib/jpeg code using
static libraries for both zlib and jpeg
Daniel Dittmar wrote:
Robin Becker wrote:
Does anyone know if it is feasible to have static libraries for both
2.3 and 2.4 compatible extensions. I'm worrying about libjpeg etc in a
win32 environment.
Could you be a bit more specific:
do you want to create a binary python extension th
Does anyone know if it is feasible to have static libraries for both 2.3 and 2.4
compatible extensions. I'm worrying about libjpeg etc in a win32 environment.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Robin Becker wrote:
Neal D. Becker wrote:
Is there a way in python to access properties of floats? I need
something
equiv to C DBL_EPSILON defined in .
you could try the traditional algorithm
>>> def dbl_epsilon():
... n = 0
... while 1:
... e = 1.0/2**n
...
0): break
... n += 1
... pe = e
... return pe
...
>>> print dbl_epsilon()
2.22044604925e-016
>>>
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
ased to participate in and
sponsor the "Python-URL!" project.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
801 - 896 of 896 matches
Mail list logo