Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-15 Thread Robin Becker
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

Re: Python, Perl & PDF files

2005-04-25 Thread Robin Becker
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

regex over files

2005-04-25 Thread Robin Becker
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

Re: regex over files

2005-04-25 Thread Robin Becker
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

Re: Python, Perl & PDF files

2005-04-25 Thread Robin Becker
t in practice though :( -guzzling-ly yrs- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list

Re: regex over files

2005-04-26 Thread Robin Becker
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

Re: regex over files

2005-04-26 Thread Robin Becker
give it a whirl -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list

Re: regex over files

2005-04-26 Thread Robin Becker
etting re to co-operate and probably halves 4 5..... :) -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list

Re: regex over files

2005-04-26 Thread Robin Becker
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

Re: regex over files

2005-04-26 Thread Robin Becker
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

ANN: wxPython 2.6.0.0

2005-04-26 Thread Robin Dunn
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

Re: regex over files

2005-04-27 Thread Robin Becker
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

Re: regex over files

2005-04-28 Thread Robin Becker
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

Re: regex over files

2005-04-28 Thread Robin Becker
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/

Re: regex over files

2005-04-28 Thread Robin Becker
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

Re: regex over files

2005-04-28 Thread Robin Becker
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 -

Re: regex over files

2005-04-28 Thread Robin Becker
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

Re: regex over files

2005-04-28 Thread Robin Becker
=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

Re: regex over files

2005-04-29 Thread Robin Becker
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

Re: regex over files

2005-04-29 Thread Robin Becker
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

python 3.3 repr

2013-11-15 Thread Robin Becker
o a bit dangerous, but it's the repr behaviour that strikes me as bad. What is responsible for defining the repr function's 'printable' so that repr would give me say an Ascii rendering? -confused-ly yrs- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: python 3.3 repr

2013-11-15 Thread Robin Becker
(), and a corresponding %a format string. --Ned. thanks for this, edoesn't make the split across python2 - 3 any easier. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: python 3.3 repr

2013-11-15 Thread Robin Becker
perhaps I can stuff that into one of the global environment vars and have it work for all python invocations. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: python 3.3 repr

2013-11-15 Thread Robin Becker
al bars, and a few others) because not every terminal can print those. . I can certainly remember those days, how we cried and laughed when 8 bits became popular. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: python 3.3 repr

2013-11-15 Thread Robin Becker
as from __future__ import print_function nothing fixes all those %r formats to be %a though :( -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: python 3.3 repr

2013-11-15 Thread Robin Becker
e did tricks with inverted multiplications etc etc :( -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: python 3.3 repr

2013-11-15 Thread Robin Becker
came the IBM 7094 which had 36 bits and finally the CDC6000 & 7600 machines with 60 bits, some one must have liked 6's -mumbling-ly yrs- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: python 3.3 repr

2013-11-15 Thread Robin Becker
ason as other languages didn't go this route and are reasonably ok, but there's no doubt the change made things more difficult. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: Unicode stdin/stdout

2013-11-18 Thread Robin Becker
hacked site.py could do that. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: Unicode stdin/stdout

2013-11-18 Thread Robin Becker
On 18/11/2013 11:47, Robin Becker wrote: ... #c:\python33\lib\site-packages\sitecustomize.py import sys, codecs sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach()) sys.stderr = codecs.getwriter("utf-8")(sys.stderr.detach()) it seems that the above

Re: Unicode stdin/stdout

2013-11-18 Thread Robin Becker
eg non-booting :( -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

reporting proxy porting problem

2013-11-28 Thread Robin Becker
False type= and under python33 I see this C:\code\hg-repos\reportlab>\python33\python.exe z.py c._fontname=<__main__.PDFAction object at 0x00BF8830> is it a string? False type= clearly something different is happening and this leads to failure in the real pycanvas module testing. Is there a way to recover the old behaviour(s)? -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: reporting proxy porting problem

2013-12-02 Thread Robin Becker
same broad conclusion. I think this particular module may get lost in the wash. If it ever needs re-implementing we can presumably rely on some more general approach as used in the various remote object proxies like pyro or similar. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

simple ElementTree based parser that allows entity definition map

2013-12-04 Thread Robin Becker
#x27;ca': '123'}, [], None), '22'], None)], None) ('a', {}, ['a=&=b< >'], None) ('a', {}, [u'amp=& moo=&moo; lt=< gt=> mu=… foo=AAA&fum;BBB'], None) ie the result of the &foo; lookup is not re-parsed so &fum; is not translated. Is there a way to get a simple ElementTree based parser that can do what I want? I have several hundred entities and the size of the DTD would probably be larger than 99% of the strings I need to parse. I think I can live with the non-reparsing of the map output, but can I get Python 3 to do the UseForeignDTD thing? -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: squeeze out some performance

2013-12-09 Thread Robin Becker
=8" "a,b,c,d=e,f,g,h" 100 loops, best of 3: 0.204 usec per loop C:\code\optichrome\74663>python -mtimeit -s"a=1;b=2;c=3;d=4;e=5;f=6;g=7;h=8" "a=e;b=f;c=g;d=h" 1000 loops, best of 3: 0.103 usec per loop for less than 4 variables the tuple method is faster. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: squeeze out some performance

2013-12-10 Thread Robin Becker
On 09/12/2013 20:46, Dave Angel wrote: On Mon, 09 Dec 2013 15:54:36 +, Robin Becker wrote: On 06/12/2013 22:07, Joel Goldstick wrote: > end, start = start, end a similar behaviour for simple assignments for less than 4 variables the tuple method is faster. What does speed h

patch for making distutils cross compile on win32

2013-12-17 Thread Robin Becker
os.path.join(sys.exec_prefix, --- 218,226 new_lib = os.path.join(sys.exec_prefix, 'PCbuild') if suffix: new_lib = os.path.join(new_lib, suffix) ! self.library_dirs.insert(0,new_lib) ! else: !

Re: Blog "about python 3"

2014-01-02 Thread Robin Becker
.. In any case I think we will be maintaining python 2.x code for at least another 5 years; the version gap is then a real hindrance. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: Blog "about python 3"

2014-01-03 Thread Robin Becker
is the code I'm porting and that is going the wrong way. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: Blog "about python 3"

2014-01-03 Thread Robin Becker
On 02/01/2014 18:37, Terry Reedy wrote: On 1/2/2014 12:36 PM, Robin Becker wrote: I just spent a large amount of effort porting reportlab to a version which works with both python2.7 and python3.3. I have a large number of functions etc which handle the conversions that differ between the two

Re: Blog "about python 3"

2014-01-03 Thread Robin Becker
rating our reference manual also appear to be slower in 3.3. Regards Antoine. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: Blog "about python 3"

2014-01-03 Thread Robin Becker
tly simple english text. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: Bytes indexing returns an int

2014-01-08 Thread Robin Becker
ern languages. Having two string types is inconvenient and error prone, swapping their labels and making subtle changes is a real pain. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: 'Straße' ('Strasse') and Python 2

2014-01-15 Thread Robin Becker
On 12/01/2014 07:50, [email protected] wrote: sys.version 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] s = 'Straße' assert len(s) == 6 assert s[5] == 'e' jmf On my utf8 based system robin@everest ~: $ cat ooo.py if __name__=='__main

Re: proposal: bring nonlocal to py2.x

2014-01-15 Thread Robin Becker
les as part of its api), but that didn't count for the developers. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: 'Straße' ('Strasse') and Python 2

2014-01-15 Thread Robin Becker
On 15/01/2014 12:13, Ned Batchelder wrote: On my utf8 based system robin@everest ~: $ cat ooo.py if __name__=='__main__': import sys s='A̅B' print('version_info=%s\nlen(%s)=%d' % (sys.version_info,s,len(s))) robin@everest ~: $ python ooo.py

Re: 'Straße' ('Strasse') and Python 2

2014-01-15 Thread Robin Becker
nt unicode. One of the claims made for python3 unicode is that it somehow eliminates the problems associated with other encodings eg utf8, but in fact they will remain until we force printers/designers to stop using complicated multi-codepoint graphemes. I suspect that won't happen. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: 'Straße' ('Strasse') and Python 2

2014-01-15 Thread Robin Becker
On 15/01/2014 17:14, Chris Angelico wrote: On Thu, Jan 16, 2014 at 3:55 AM, Robin Becker wrote: I think about these as encodings, because that's what they are mathematically, logically & practically. I can encode the target grapheme sequence as a sequence of bytes using a particular

Re: 'Straße' ('Strasse') and Python 2

2014-01-16 Thread Robin Becker
work in both 2.7 & 3.3 I don't understand why the latter seems slower especially since we try to convert early to unicode/str as a desirable internal form. Probably I have some horrible error going on(eg one of the C extensions is working in 2.7 and not in 3.3). -stupidly yrs- Robin Be

Re: 'StraÃYe' ('Strasse') and Python 2

2014-01-16 Thread Robin Becker
On 16/01/2014 12:06, Frank Millman wrote: .. I assure you that I fully understand my ignorance of unicode. Until recently I didn't even know that the unicode in python 2.x is considered broken and that str in python 3.x is considered 'better'. Hi Robin I am pretty s

doctests compatibility for python 2 & python 3

2014-01-17 Thread Robin Becker
quot;" return a fails in python3. Aside from changing the tests so they look like """ >>> func(u'aaa')==u'aaa' True """ which make the test utility harder. If the test fails I don't see the actual outcome and expected I see expected True got False. Is there an easy way to make these kinds of tests work in python 2 & 3? -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: doctests compatibility for python 2 & python 3

2014-01-17 Thread Robin Becker
e: print(func(u'aaa\u020b')) Expected: aaaȋ Got: aaaȋ ** 1 items had failures: 1 of 1 in __main__.func ***Test Failed*** 1 failures. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: doctests compatibility for python 2 & python 3

2014-01-17 Thread Robin Becker
that doesn't necessarily mean that the repr of any given Unicode string will be exactly the same on both versions. It's likely to be better than depending on the strings being ASCII, though. ChrisA I tried this approach with a few more complicated outcomes and they fail in python2 or 3 depending on how I try to render the result in the doctest. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: doctests compatibility for python 2 & python 3

2014-01-17 Thread Robin Becker
File "tdt1.py", line 4, in __main__.func Failed example: print(func(u'aaa\u020b')) Expected: aaaȋ Got: aaaȋ ** 1 items had failures: 1

Re: doctests compatibility for python 2 & python 3

2014-01-20 Thread Robin Becker
On 17/01/2014 21:10, Terry Reedy wrote: On 1/17/2014 7:14 AM, Robin Becker wrote: .. I never got how you are using doctests. There were certainly not meant for heavy-duty unit testing, but for testing combined with explanation. Section 26.2.3.7. (in 3.3) Warnings warns that they are

any wheel experts here?

2014-01-22 Thread Robin Becker
ess that somewhere in wheel the plat-name argument is not being passed on to distutils bdist, but in addition something about the platform name is causing the crash later on. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: 'string.join' is wrong in my Python console

2015-12-03 Thread Robin Koch
27; is not defined From the context, I don't see string should be replaced by something else. Could you tell me why I have such an error? You are trying to use the *string* module without importing it, I'd guess. Try: import string first then you should be able to access string.join without error. Now *I* am confused. Shouldn't it be ", ".join(['1', '2', '4', '8', '16']) instead? Without any importing? -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

Re: 'string.join' is wrong in my Python console

2015-12-03 Thread Robin Koch
Am 03.12.2015 um 17:25 schrieb Ian Kelly: On Thu, Dec 3, 2015 at 9:00 AM, Robin Koch wrote: Now *I* am confused. Shouldn't it be ", ".join(['1', '2', '4', '8', '16']) instead? Without any importing? That would be the norm

Re: 'string.join' is wrong in my Python console

2015-12-03 Thread Robin Koch
Am 03.12.2015 um 18:42 schrieb Mark Lawrence: On 03/12/2015 17:01, Robin Koch wrote: Am 03.12.2015 um 17:25 schrieb Ian Kelly: On Thu, Dec 3, 2015 at 9:00 AM, Robin Koch wrote: Now *I* am confused. Shouldn't it be ", ".join(['1', '2', '4'

Re: 'string.join' is wrong in my Python console

2015-12-03 Thread Robin Koch
Am 03.12.2015 um 18:23 schrieb Terry Reedy: On 12/3/2015 11:00 AM, Robin Koch wrote: Am 03.12.2015 um 10:02 schrieb Gary Herron: On 12/02/2015 10:55 PM, Robert wrote: Hi, I read the tutorial on "Why is join() a string method instead of a list or tuple method?" at l

Re: increment/decrement operators

2015-12-05 Thread Robin Koch
Python? Quick answer: x += y works. (Well, it should.) x++ doesn't. Long answer: I'm sure someone more experienced will come up with one shortly. :-) Until then I found this: http://stackoverflow.com/a/1485854 -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

Re: Help on for loop understanding

2015-12-07 Thread Robin Koch
the next() method | (__next__() method in Python 3.x) of the iterator -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

Re: Python variable assigning problems...

2015-12-11 Thread Robin Koch
d the execution from right to left is also a good choice, because one would like to do something like: x = y = z = 0 Again, assigning from left to right woud lead to errors. -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

Re: Python variable assigning problems...

2015-12-11 Thread Robin Koch
Am 11.12.2015 um 17:39 schrieb Ian Kelly: On Fri, Dec 11, 2015 at 9:24 AM, Robin Koch wrote: Assigning goes from right to left: x,y=y,x=2,3 <=> y, x = 2, 3 x, y = y, x Otherwise the assignment x, y = y, x would not make any sense, since x and y haven't any values yet. And th

Re: geostationary satellite data

2015-12-16 Thread Robin Koch
ed to fit into 1-byte by subtracting | "75" from each datum. Therefore it is necessary for the user to add a | value of "75" to each data value when using the data. HTH a little, -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

Re: Trailing zeros of 100!

2016-01-02 Thread Robin Koch
o 100! contains 24 factors 5 and even more factors 2. So 100! contains 24 facotrs 10 and therefore has 24 trailing zeros. -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

Re: Trailing zeros of 100!

2016-01-02 Thread Robin Koch
nts my procedure in my other answer.) -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

Re: Trailing zeros of 100!

2016-01-02 Thread Robin Koch
Am 02.01.2016 um 17:09 schrieb Tony van der Hoff: On 02/01/16 16:57, Robin Koch wrote: sum([int(0.2**k*n) for k in range(1, int(log(n, 5))+1)]) But did you actually test it? Yes, should work for n >= 1. Why do you ask? -- Robin Koch -- https://mail.python.org/mailman/listinfo/pyt

Re: Trailing zeros of 100!

2016-01-02 Thread Robin Koch
Am 02.01.2016 um 22:57 schrieb Chris Angelico: On Sun, Jan 3, 2016 at 3:56 AM, Robin Koch wrote: Am 02.01.2016 um 17:09 schrieb Tony van der Hoff: On 02/01/16 16:57, Robin Koch wrote: sum([int(0.2**k*n) for k in range(1, int(log(n, 5))+1)]) But did you actually test it? Yes, should

Re: Is there a way importing a string object?

2016-01-05 Thread Robin Koch
read likes a part of the body. I am bad on composition. Even after your reminder, I still can't think of a better one:-( I think the subject is fine. But you should have extended your message body a little so your question is understandable without reading the subject. -- Robin Koch -- h

debugging uwsgi

2016-01-08 Thread Robin Becker
reter's gone wrong somehow. Any good ways forward with debugging this sort of issue? I'm not sure how I would remotely debug this using winpdb. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: debugging uwsgi

2016-01-08 Thread Robin Becker
On 08/01/2016 15:03, Robin Becker wrote: I have an unusual bug in a large django project which has appeared when using nginx + uwsgi + django. The configuration nginx + flup + django or the django runserver don't seem to create the conditions for the error. Basically I am seeing an

Re: How to remove item from heap efficiently?

2016-01-13 Thread Robin Becker
sets/gets can affect individual times quite a lot. I seem to remember there was some kind of hashing attack against python dicts that would use up large amounts of time, but I guess that's now fixed. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: Stop writing Python 4 incompatible code

2016-01-15 Thread Robin Koch
Am 14.01.2016 um 01:40 schrieb Bernardo Sulzbach: On Wed, Jan 13, 2016 at 10:10 PM, Steven D'Aprano wrote: (...) 4.0 (assuming there is one) Isn't it just a matter of time? Do you think it is even possible not to have Python 4 eventually? Not necessarily. See TeX. :-) --

Re: asyncio - run coroutine in the background

2016-02-16 Thread Robin Becker
On 16/02/2016 17:15, Marko Rauhamaa wrote: Marko Rauhamaa : Sure: Sorry for the multiple copies. Marko I thought perhaps background jobs were sending them :) -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Fabric on Windows :

2014-10-28 Thread Robin Becker
suggest if you foresee problems using fabric on Windows and also suggest an alternative to this if available. . -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

pkcs7 signing

2014-11-04 Thread Robin Becker
Is there a way to do pkcs7 / 12 signing with python. I looked at various cryptographic packages, but it's not clear if any of them can do this. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: pkcs7 signing

2014-11-05 Thread Robin Becker
On 05/11/2014 06:40, dieter wrote: Robin Becker writes: Is there a way to do pkcs7 / 12 signing with python. Have you checked whether "OpenSSL" supports this kind of signing? If it does, then you likely can use this via several Python wrappings for "OpenSSL". I chec

pack circles into a partial annulus

2014-11-20 Thread Robin Becker
will fit singly into the region. The idea is that they should be as far apart as possible so as to minimize overlap and avoid crossing the region boundary. Circle packing is hard so I'm thinking of using some kind of spring/repulsion model to do this. Has anyone any ideas about how to

Re: PyWart: "Python's import statement and the history of external dependencies"

2014-11-24 Thread Robin Becker
On 24/11/2014 16:51, Rick Johnson wrote: EVOLUTION LOVES A WINNER! I think evolution actually requires losers. Clearly there are more extinct species, peoples, languages etc etc than there are existing ones so perhaps if evolution 'loves' anything it 'loves' a los

debugging on windows

2014-03-07 Thread Robin Becker
ws using fake files for stderr & stdout. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: debugging on windows

2014-03-10 Thread Robin Becker
they are so randomly tryes to run inspect.routine over one of the bad instances. -bumbling-ly yrs- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

possible bug in re expression?

2014-04-25 Thread Robin Becker
all(p) which works fine. should re.compile('.{1,+3}') raise an error? It doesn't on python 2.7 or 3.3. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: possible bug in re expression?

2014-04-28 Thread Robin Becker
ly so I should have anticipated it :) Does this in fact that almost any broken regexp specification will silently fail because re will reset and consider any metacharacter as literal? -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: possible bug in re expression?

2014-04-28 Thread Robin Becker
is intent to catch some specification errors. I've abandoned this translation anyhow as all that was intended was to split the string into non-overlapping strings of size at most k. I find this works faster than the regexp even if the regexp is pre-compiled. [p[i:i+k] for i in xrange(

where to put global testing value

2014-04-29 Thread Robin Becker
to import loops. Any ideas? -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

data: protocol

2014-05-07 Thread Robin Becker
e ie urllib.request.urlopen. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: data: protocol

2014-05-08 Thread Robin Becker
On 08/05/2014 04:46, Steven D'Aprano wrote: On Wed, 07 May 2014 11:42:24 +0100, Robin Becker wrote: I have an outstanding request for ReportLab to allow images to be opened using the data: scheme. That used to be supported in python 2.7 using urllib, but in python 3.3 urllib2 --> urlli

Re: data: protocol

2014-05-08 Thread Robin Becker
ector instance. Using a director would be possible, but it's not much cleaner than special casing the function and I don't have to worry about which opener to use; I use the one provided by the user -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: Everything you did not want to know about Unicode in Python 3

2014-05-14 Thread Robin Becker
sockets & other sources ie error messages failing to be printable etc etc. Since bytes in Python 3 are not equivalent to the old str (Python 3 bytes != Python 2 str) using bytes everywhere has its own problems. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.2 has some deadly infection

2014-06-02 Thread Robin Becker
e sometimes really in the way. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.2 has some deadly infection

2014-06-03 Thread Robin Becker
The problem is that causal readers like Robin sometimes jump from 'In Python 3, it can be hard to do something one really ought not to do' to 'Binary I/O is hard in Python 3' -- which is is not. I'm fairly causal and I did understand that the rant was a bit

Re: Micro Python -- a lean and efficient implementation of Python 3

2014-06-04 Thread Robin Becker
egacy encodings. I've never understood why not use UTF-8 for everything. me too -mojibaked-ly yrs- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: Micro Python -- a lean and efficient implementation of Python 3

2014-06-04 Thread Robin Becker
allow for O(1) glyph indexing. I know this is artificial, but this is the same situation as utf8 faces just the frequency of occurrence is different. A very large amount of computing is still western centric so searching a byte string for latin characters is still efficient; searching for an n with a tilde on top might not be so easy. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: Micro Python -- a lean and efficient implementation of Python 3

2014-06-04 Thread Robin Becker
quite a few diacritics and a fair few glyphs they could be applied to. I don't think it likely they could map all possible combinations to a private range. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

PyDoc_STRVAR error in msvc compile

2013-10-01 Thread Robin Becker
used code like this static char moduleDoc ="Helper extension module for xxx.\n\ \n\ Interface summary:\n\ \n\ import _xxx\n\ ..\n" #ifdef " stuff\n" #endif "\n\ .\n\ "; but the registration and usage differs quite a lot between python2 & python3 so I thought to switch to the newer mechanism. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: PyDoc_STRVAR error in msvc compile

2013-10-02 Thread Robin Becker
On 01/10/2013 18:26, MRAB wrote: On 01/10/2013 17:41, Robin Becker wrote: .. I've tried it in a minimal console program, and it seems to work for me. thanks for the test. I thought this might be an issue with the macro call argument being spread out over several lines, but

Re: PyDoc_STRVAR error in msvc compile

2013-10-02 Thread Robin Becker
On 02/10/2013 10:00, Robin Becker wrote: On 01/10/2013 18:26, MRAB wrote: On 01/10/2013 17:41, Robin Becker wrote: .. I've tried it in a minimal console program, and it seems to work for me. thanks for the test. I thought this might be an issue with the macro call argument

Re: PyDoc_STRVAR error in msvc compile

2013-10-02 Thread Robin Becker
ion string\n _version # module version string\n"; I tried a couple of variations of \ at the end of the line preceding #ifdef etc etc, but nothing seemed to work. The source is properly DOS formatted (according to vim) so it's not a simple line ending issue and I don't have any extra spaces at the end of the lines etc etc. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: PyDoc_STRVAR error in msvc compile

2013-10-02 Thread Robin Becker
On 02/10/2013 13:05, Dave Angel wrote: On 2/10/2013 07:28, Robin Becker wrote: The actual is this code from _renderPM.c https://bitbucket.org/rptlab/reportlab/src/fa65fe72b6c2aaecb7747bf14884adb996d8e87f/src/rl_addons/renderPM/_renderPM.c?at=default at the end of the lines etc

<    1   2   3   4   5   6   7   8   9   >