Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-10 Thread Robin Becker
hrisA Electrical Engineers use j (probably to avoid conflicts with i (current). --electrically yrs-- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

python33.lib missing for build_ext in venv environment

2013-10-14 Thread Robin Becker
epos\reportlab\src\rl_addons\rl_accel\_rl_accel.exp is this a bug or some misconfiguration; should I be using virtualenv? -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: python33.lib missing for build_ext in venv environment

2013-10-14 Thread Robin Becker
On 14/10/2013 16:17, Robin Becker wrote: I'm trying to port reportlab extensions to Python 3.3. On windows I get a missing library error when trying to build/install the trial reportlab in a virtual environment eg C:\code\hg-repos\reportlab>\python33\python -m venv tpy33 .ns\

Re: python33.lib missing for build_ext in venv environment

2013-10-14 Thread Robin Becker
On 14/10/2013 17:01, Marco Buttu wrote: On 10/14/2013 05:17 PM, Robin Becker wrote: I'm trying to port reportlab extensions to Python 3.3. On windows I get a missing library error when trying to build/install the trial reportlab in a virtual environment eg This is my configuration

Re: when may sys.executable be empty

2015-03-12 Thread Robin Becker
I have to find the python that's parallel to uwsgi (works in a virtualenv at least). -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: Brilliant or insane code?

2015-03-18 Thread Robin Becker
en special case equal lengths''' n = len(x) assert len(y) == n result = [None] * (2*n) result[::2] = x result[1::2] = y return result interestingly whilst many of the other solutions can be improved/modernized in later pythons this one has

Re: Pickle based workflow - looking for advice

2015-04-13 Thread Robin Becker
t the objects for years then the pickle protocol is probably better as it is not python version dependant. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

mac os core dump from detached process

2015-04-27 Thread Robin Becker
an interrupt eg SIGSEGV etc etc. Is it possible to get core dumps on the Mac for debugging purposes? Would the detached process inherit flags etc etc from the starting process? I know little about OS X/Mach. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: mac os core dump from detached process

2015-04-29 Thread Robin Becker
obably do the trick. What I don't know is if the process started by a view that then detaches will inherit the flags and dump core properly. I have a mac test platform now and will attempt something myself. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

GAE environment differences

2015-05-01 Thread Robin Becker
solution differently. Is that the case or is it that os.path or os.path.expanduser doesn't exist? -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: GAE environment differences

2015-05-01 Thread Robin Becker
On 01/05/2015 13:15, Chris Angelico wrote: On Fri, May 1, 2015 at 8:29 PM, Robin Becker wrote: Best thing to do is to ask the user to post the complete traceback. You might need to use "import os.path" but normally I would expect that not to be an issue. jamesbynd said:

Re: GAE environment differences

2015-05-05 Thread Robin Becker
On 02/05/2015 10:14, Kev Dwyer wrote: Robin Becker wrote: ``` the user suggests that even though claims are made that you can use a filesystem, but stuff like pwd is missing. Apparently the user module has no meaning, but there is a users module? I guess I'll need to

subprocess.Popen zombie

2015-05-20 Thread Robin Becker
As part of a long running PyQT process running as a window app in Arch linux I needed an alert sound, I decided to use the beep command and the app code then looked like pid = Popen(['/home/robin/bin/mybeep', '-r3', '-f750', '-l100', '-d75']

Re: subprocess.Popen zombie

2015-05-20 Thread Robin Becker
On 20/05/2015 16:42, Alain Ketterlin wrote: Robin Becker writes: . The code I used to use with os.spawnl was even worse in leaving zombies around. For the same reason (os.wait() and os.waitpid() let you ... wait for child-processes). I suppose I needed to keep a record of all

Re: a more precise distance algorithm

2015-05-27 Thread Robin Becker
A minor point is that if you just need to compare distances you don't need to compute the hypotenuse, its square will do so no subtractions etc etc. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

instance as module

2015-06-19 Thread Robin Becker
dule differs from an instance. I have set various dunders on the instance eg __file__, __doc__, __all__ & __name__ and I made the object a borg, but it still seems a bit hacky. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: instance as module

2015-06-19 Thread Robin Becker
On 19/06/2015 11:23, Peter Otten wrote: Robin Becker wrote: . Do I understand this correctly? You got bitten by a complex setup and now you are hoping to improve the situation by making it even more complex? How about reordering initialisation in such a way that the user defaults are

Re: instance as module

2015-06-22 Thread Robin Becker
On 20/06/2015 08:24, Steven D'Aprano wrote: On Fri, 19 Jun 2015 07:29 pm, Robin Becker wrote: I'm trying to overcome a recursive import issue in reportlab. .. I'm afraid I don't understand what you are trying to say here. Why can't the user just se

Re: Opening PDF Using subprocess.Popen Failing

2015-06-22 Thread Robin Becker
errread, errwrite) File "c:\python27\lib\subprocess.py", line 958, in _execute_child startupinfo) WindowsError: [Error 2] The system cannot find the file specified -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: Opening PDF Using subprocess.Popen Failing

2015-06-22 Thread Robin Becker
On 22/06/2015 11:33, Robin Becker wrote: . Naftali, I ran the following from python prompt for what it's worth this also works on my machine Windows PowerShell Copyright (C) 2009 Microsoft Corporation. All rights reserved. PS C:\Users\rptlab> cd tmp PS C:\User

rl_config

2015-06-22 Thread Robin Becker
Anyone wishing to bend their minds around instance as module can see the code I've tested on //annapurna/tmp/rl_config.py. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: rl_config

2015-06-22 Thread Robin Becker
On 22/06/2015 13:03, Robin Becker wrote: Anyone wishing to bend their minds around instance as module can see the code I've tested on //annapurna/tmp/rl_config.py. whoops misposted sorry -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: Bug in floating point multiplication

2015-07-02 Thread Robin Becker
"license" for more information.) If I convert old style x = 1.0 - 1.0/2**53 then the assertion succeeds and the loop does not print. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: Bug in floating point multiplication

2015-07-02 Thread Robin Becker
$ uname -a Linux everest 4.0.6-1-ARCH #1 SMP PREEMPT Tue Jun 23 14:40:31 CEST 2015 i686 GNU/Linux robin@everest:~ $ python2 Python 2.7.10 (default, May 26 2015, 04:28:58) [GCC 5.1.0] on linux2 Type "help", "copyright", "credits" or "license" for m

Re: A new module for performing tail-call elimination

2015-07-16 Thread Robin Becker
t;>> def odd(n): ... return bool(n%2) ... >>> def even(n): ... return not odd(n) ... not much more complex, but the logic for A(n) and not A(n) is only done once. Not really much to do with TCO though. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: A new module for performing tail-call elimination

2015-07-16 Thread Robin Becker
is-the-difference-between-total-recursive-and-primitive-recursive-functions -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: A new module for performing tail-call elimination

2015-07-17 Thread Robin Becker
On 16/07/2015 17:17, Ian Kelly wrote: On Thu, Jul 16, 2015 at 3:28 AM, Robin Becker wrote: . I believe the classic answer is Ackermann's function http://demonstrations.wolfram.com/RecursionInTheAckermannFunction/ which is said to be not "primitive recursive&quo

what windows compiler for python 3.5?

2015-07-24 Thread Robin Becker
I read this https://docs.python.org/dev/whatsnew/3.5.html which incidentally marks the release as 3.6.0a0 :) but failed to find any details regarding which windows compiler is required. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: what windows compiler for python 3.5?

2015-07-24 Thread Robin Becker
On 24/07/2015 11:20, Robin Becker wrote: I read this https://docs.python.org/dev/whatsnew/3.5.html which incidentally marks the release as 3.6.0a0 :) but failed to find any details regarding which windows compiler is required. more searching I find this on the 3.5 b1 download page "Wi

Re: what windows compiler for python 3.5?

2015-07-24 Thread Robin Becker
On 24/07/2015 11:38, Chris Angelico wrote: On Fri, Jul 24, 2015 at 8:25 PM, Robin Becker wrote: ... more searching I find this on the 3.5 b1 download page "Windows users: The Windows binaries were built with Microsoft Visual Studio 2015, which is not yet officially released.

Re: How to rearrange array using Python?

2015-07-30 Thread Robin Koch
r thing one might want to takeinto account. :-)) -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

Re: Casting to a "number" (both int and float)?

2015-08-28 Thread Robin Koch
" - Every other usenet-discussion. -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

how to build windows extensions for python 3.5

2015-09-14 Thread Robin Becker
s) to first get that installed. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: how to build windows extensions for python 3.5

2015-09-15 Thread Robin Becker
On 14/09/2015 17:26, Mark Lawrence wrote: On 14/09/2015 16:52, Robin Becker wrote: ... http://stevedower.id.au/blog/building-for-python-3-5-part-two/ The most important thing is to have something to do while the Visual Studio installation takes up 8G of your disk space and several hours

Re: how to build windows extensions for python 3.5

2015-09-15 Thread Robin Becker
On 15/09/2015 12:38, Robin Becker wrote: On 14/09/2015 17:26, Mark Lawrence wrote: On 14/09/2015 16:52, Robin Becker wrote: ... http://stevedower.id.au/blog/building-for-python-3-5-part-two/ The most important thing is to have something to do while the Visual Studio installation takes

Re: how to build windows extensions for python 3.5

2015-09-15 Thread Robin Becker
On 15/09/2015 16:54, Zachary Ware wrote: On Tue, Sep 15, 2015 at 8:32 AM, Robin Becker wrote: I'm a bit surprised that you can successfully use the same .libs for 2.7 and 3.3/3.4. But since that seems to work, I'd say go ahead and try it with 3.5, and if the build succeed

problem building python 3.5 extensions for windows

2015-09-21 Thread Robin Becker
his to work? Should I try a full reinstall of VS2015? I can start the VS2015 Developer command prompt, but it doesn't then know about the "cl" command. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: problem building python 3.5 extensions for windows

2015-09-21 Thread Robin Becker
wnload Visual Studio". I think that's where I'm headed. Sadly this has been the worst python upgrade for a long time in windows land. I would gladly forgo all the bells and whistles for a simple install of the C compiler, but I'm never certain that I'll be able to do cro

Re: problem building python 3.5 extensions for windows

2015-09-21 Thread Robin Becker
ng code Stderr: | error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64\\link.exe' failed with exit status 1 so there are some warnings which I don't understand. Maybe I need to do something special for pyRXP (possibly I have some ifdefs poorly configured). -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: problem building python 3.5 extensions for windows

2015-09-22 Thread Robin Becker
On 22/09/2015 01:36, cjgoh...@gmail.com wrote: On Monday, September 21, 2015 at 9:54:51 AM UTC-7, Robin Becker wrote: build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\pyRXPU.cp35-win_amd64.lib and ob ject build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\pyRXPU.cp35

Re: problem building python 3.5 extensions for windows

2015-09-22 Thread Robin Becker
On 22/09/2015 11:14, Robin Becker wrote: On 22/09/2015 01:36, cjgoh...@gmail.com wrote: .t <http://bugs.python.org/issue24872#msg249589>. Thanks for the pointer Christoph. I certainly didn't let it run for 30 minutes. When I build with 2.7, 3.3 or 3.4 the whole buil

Re: problem building python 3.5 extensions for windows

2015-09-23 Thread Robin Becker
On 22/09/2015 22:37, cjgoh...@gmail.com wrote: On Tuesday, September 22, 2015 at 1:49:16 PM UTC-7, Terry Reedy wrote: On 9/22/2015 9:35 AM, Robin Becker wrote: On 22/09/2015 11:14, Robin Becker wrote: On 22/09/2015 01:36, CG wrote: .t <http://bugs.python.org/issue24872#msg249

python3.5 + reportlab + windows again

2015-10-06 Thread Robin Becker
e PCBUILD? I vaguely remember /Od /Zi, but this is a new version of VS so perhaps I'm out of date. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: python3.5 + reportlab + windows again

2015-10-06 Thread Robin Becker
On 06/10/2015 16:14, Robin Becker wrote: I can run all of the reportlab tests OK under ubuntu 14.04 amd65 with the latest python 3.5 (built using configure make dance). I guess I have to think about creating a debug build of python 3.5 and or one or more extensions. Does anyone

Re: python3.5 + reportlab + windows again

2015-10-08 Thread Robin Becker
On 06/10/2015 16:31, Robin Becker wrote: . well it seems someone can build these extensions properly. I used Christoph Gohlke's reportlab build and although there are 3 failures in the latest tests I don't see any crashes etc etc and all the failures are explainable. Last t

Re: python3.5 + reportlab + windows again

2015-10-12 Thread Robin Becker
On 08/10/2015 10:26, Robin Becker wrote: On 06/10/2015 16:31, Robin Becker wrote: . well it seems someone can build these extensions properly. I used Christoph Gohlke's reportlab build and although there are 3 failures in the latest tests I don't see any crashes etc etc a

how to get python socket to use a specific interface

2015-10-23 Thread Robin Becker
This works if I export BIND_DEVICE='eth0' and run as root, but my desired interface is actually called 'eth0:0' and when I run with that exported I get a device error. Does anyone know what I should call the device? -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: how to get python socket to use a specific interface

2015-10-26 Thread Robin Becker
. device? -- Robin Becker Using eth0:0 is normally a method to setup eth0 to respond to a 2nd IPV4/IPV6 address. Have you done the ifconfig steps to enable that? If its been done, you will see it's 2nd address in an ifconfig query. Man pages are wunnerful things. yes I have

Re: how to get python socket to use a specific interface

2015-10-27 Thread Robin Becker
On 26/10/2015 22:29, Cameron Simpson wrote: On 26Oct2015 12:33, Robin Becker wrote: . $ ifconfig eth0 Link encap:Ethernet HWaddr 00:...4 GB) Interrupt:16 eth0:0Link encap:Ethernet HWa... Do you need to bind to the device itself? Using the

Re: how to get python socket to use a specific interface

2015-10-28 Thread Robin Becker
.com", 80)) sock.send("GET / HTTP/1.0\r\n\r\n") print sock.recv(20) sock.close() it does work as intended and I can see the .13 address hitting the remote server. I guess my hack of the miproxy code didn't work as intended. Anyhow my upstream provider has taken ove

Re: Windows 10 pip2.7.exe uninstall fails

2015-10-28 Thread Robin Becker
\tox\venv.py c:\python27\lib\site-packages\tox\venv.pyc c:\python27\scripts\tox-quickstart.exe c:\python27\scripts\tox.exe Proceed (y/n)? y Successfully uninstalled tox C:\tmp> so perhaps yours is an exceptional case -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: GoPiGo script

2015-11-02 Thread Robin Koch
intended at all, which is considered an error. In your second attempt you intended only the first 5 lines. So those (and only those) are repeated. The next line ("if mindist > us_dist(15):") wasn't intended and therefore *not* repeated. If you just learning programming with Python you migth want to start with smaller examples to understand the syntax better. Do you understand what the script is supposed to do in every line? -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

Re: GoPiGo script

2015-11-02 Thread Robin Koch
Loek does understand what I meant. Intend means something entirely different, and is not a Python term. Yes, I know the difference. I just didn't pay enough attention to it. Ironically enough I wrote actually another post about Android-intends earlier. -- Robin Koch -- https://mail.

Re: Regular expressions

2015-11-03 Thread Robin Koch
Am 03.11.2015 um 05:23 schrieb ru...@yahoo.com: Of course there are people who misuse regexes. /^1?$|^(11+?)\1+$/ There are? 0:-) -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

llewelly...@gmail.com

2015-11-05 Thread Robin Becker
Hi, did you find your phone? -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: llewelly...@gmail.com

2015-11-05 Thread Robin Becker
On 05/11/2015 17:15, Peter Otten wrote: Robin Becker wrote: Hi, did you find your phone? If not -- it's probably on comp.lang.perl.misc Glad to be of help ;) weird no idea why this ended up here; thunderbird is a bit strange today -mis-guidedly yrs- Robin Becker --

Re: Python 3.2 has some deadly infection

2014-06-05 Thread Robin Becker
e strings are second class which I think is wrong; apparently pressure from influential users is pushing to make byte strings more first class which is a good thing. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.2 has some deadly infection

2014-06-05 Thread Robin Becker
model, but that's because I had a lot of stuff to convert and probably made a bunch of blunders. The reportlab code is now a mess of hacks to keep it alive for 2.7 & >=3.3; I'm probably never going to be convinced that uncode types are good. Bytes are the underlying concept and sho

any wheel experts

2014-06-05 Thread Robin Becker
zip so is there perhaps a way to make the wheel installation run a post installation script? -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: any wheel experts

2014-06-06 Thread Robin Becker
On 05/06/2014 22:56, Mark Lawrence wrote: On 05/06/2014 22:42, Ned Deily wrote: In article , Rustom Mody wrote: On Thursday, June 5, 2014 10:21:06 PM UTC+5:30, Robin Becker wrote: I used to create exe files for windows, but the latest and greatest concept is wheels .whl files. If

Re: Python 3.2 has some deadly infection

2014-06-06 Thread Robin Becker
continued to do the wrong thing :) -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: First time I looked at Python was(...)

2014-06-10 Thread Robin Becker
On 10/06/2014 11:14, alister wrote: On Mon, 09 Jun 2014 21:54:25 +0100, Carlos Anselmo Dias wrote: I'm sorry What does all this relate to? Turing test? -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

urllib/urllib2 support for specifying ip address

2014-06-19 Thread Robin Becker
ib or urllib2 to use my host name and a specifed ip address? I can always change my hosts file, but that is inconvenient and potentially dangerous. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: urllib/urllib2 support for specifying ip address

2014-06-19 Thread Robin Becker
bout 10 different servers so plumbum + a python script seems like a good choice and I would not really want to hack the hosts files back and forth on a regular basis. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: urllib/urllib2 support for specifying ip address

2014-06-19 Thread Robin Becker
t sure why it hasn't been updated beyond that), pull up urllib2.py, and step through manually, seeing where the hostname gets turned into an IP address. Hence, this code: . in practice this approach worked well with urllib in python27. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

generic _ssl error

2014-07-08 Thread Robin Becker
am able to clone etc etc without issue, but those are almost all 12.04 machines and were fully updated at the time of heartbleed. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: how to get the ordinal number in list

2014-08-11 Thread Robin Becker
__(self,other): ... return False ... >>> a=NeverEqual(1) >>> a 1 >>> a==1 False >>> a==a False >>> not (a != a) True >>> a!=a False >>> so I think that assignment doesn't always make things equal even chronologically. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

error building lxml.etree

2014-08-22 Thread Robin Becker
his error? It's entirely possible that it might be I don't have enough memory or something, lxml builds almost always take a long time. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: error building lxml.etree

2014-08-26 Thread Robin Becker
On 22/08/2014 18:53, Stefan Behnel wrote: Robin Becker schrieb am 22.08.2014 um 17:50: I'm trying to build a bunch of extensions in a 2.7 virtual environment on a . Has anyone else seen this error? It's entirely possible that it might be I don't have enough memo

import reloading

2014-09-24 Thread Robin Becker
n the code from the module in hte __dict__? -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: import reloading

2014-09-24 Thread Robin Becker
On 24/09/2014 12:54, Dave Angel wrote: Robin Becker Wrote in message: ... Is a loader supposed to reset all the reused module's attributes and reset the __dict__ or does it just run the code from the module in hte __dict__? Nothing gets reset or run. It simply reuses the exi

windows 7 pysqlite build error

2014-10-13 Thread Robin Becker
feasible that pyqslite builds need to be installed specially. I don't remember this happening on my old win32 XP system, but that died and I now am forced to use 64bit win7. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: windows 7 pysqlite build error

2014-10-14 Thread Robin Becker
On 13/10/2014 22:00, Terry Reedy wrote: On 10/13/2014 4:31 PM, Dennis Lee Bieber wrote: On Mon, 13 Oct 2014 10:49:27 +0100, Robin Becker declaimed the following: c:\users\rptlab\tmp\tmcallister\build\pysqlite\src\connection.h(33) : fatal error C1083: Cannot open include file: 'sqli

help needed on decimal formatting issue

2011-09-19 Thread Robin Becker
imal('914146.80'),7,2) with context.prec = decimal_places we failed differently with format_number(Decimal('42.7571'),10,4) so I adopted context.prec = max_digits+decimal_places and that seems to work. If this is indeed a proper fix I will send a bug report to the well known jazz based framework. -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list

bug python2.3+zipimport+ubuntu 10.04 amd_64

2011-11-11 Thread Robin Becker
. Anyone had any real success with this problem? The last version of the test machinery ran 32bit freebsd and we had no problems on that hardware. -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list

Re: bug python2.3+zipimport+ubuntu 10.04 amd_64

2011-11-11 Thread Robin Becker
ort.c?r1=1.16&r2=1.17 but it's a dead link. -- Robin Becker On 11/11/2011 16:52, Robin Becker wrote: I'm trying to run some aged software on a new machine which runs Linux app2.reportlab.com 2.6.32-30-generic #59-Ubuntu SMP Tue Mar 1 21:30:46 UTC 2011 x86_64 GNU/Linux Ubuntu 10.04.

multiple 2.7.3 versions?

2013-02-15 Thread Robin Becker
tel)] on win32 Type "help", "copyright", "credits" or "license" for more information. from compiler import consts dir(consts) ['CO_FUTURE_ABSIMPORT', 'CO_FUTURE_DIVISION', 'CO_FUTURE_PRINT_FUNCTION', 'CO_FUTURE_WITH_STATEMENT'

Re: FYI: AI-programmer

2013-02-25 Thread Robin Becker
nting program in brainf*ck that would be quite amusing, but for real advances I suggest he makes it generate itself. His fitness is fairly silly since it has no idea of fitness except success; minimizing the cpu/memory/program length etc etc are all additional measures that could be added/used. --

python 3 problem: how to convert an extension method into a class Method

2013-02-26 Thread Robin Becker
) class A(baseA): . presumably I then get some kind of penalty for the base class lookup, but how bad is that? -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list

Re: python 3 problem: how to convert an extension method into a class Method

2013-02-27 Thread Robin Becker
On 26/02/2013 18:38, Peter Otten wrote: Robin Becker wrote: ...3: $ python -m timeit -s 'from new import instancemethod from math import sqrt class A(int): pass A.m = instancemethod(sqrt, None, A) a = A(42) ' 'a.m()' 100 loops, best of 3: 0.5 usec per loop $

Re: python 3 problem: how to convert an extension method into a class Method

2013-02-27 Thread Robin Becker
On 27/02/2013 10:49, Chris Angelico wrote: On Wed, Feb 27, 2013 at 9:36 PM, Robin Becker wrote: However, in my case the method takes py C utf8 bytes50 20 usec unicode 39 15 here py refers to a native python method and C to the extension

Re: python 3 problem: how to convert an extension method into a class Method

2013-02-27 Thread Robin Becker
meth(self): . from extension import c_dummy_class A.meth = c_dummy_class.c_meth -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list

distutils without a compiler

2013-04-02 Thread Robin Becker
ated a fallback download compiler or similar? -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list

Re: "0 in [True,False]" returns True

2005-12-13 Thread Robin Becker
Carsten Haese wrote: ... > > Where/how did you search? http://docs.python.org/lib/typesseq.html > states unambiguously that "x in s" returns "True if an item of s is > equal to x, else False" . exactly and I see >>> 0==False True >>>

Re: closing stdin, stdout and stderr

2005-12-26 Thread Robin Becker
rtijn > > > I've had excellent results with variants of the cookbook entry at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/278731 -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list

Re: closing stdin, stdout and stderr

2005-12-26 Thread Robin Becker
Robin Becker wrote: > Martijn Brouwer wrote: > >> I am writing a unix daemon in python, so I want to close stdin, stdout >> and stderr. >> My first attempt was to the standard file descriptors using their >> close() methods. After closing stdout, I could not print

viewcvs 1.0 dev

2005-12-28 Thread Robin Becker
Does anyone know the status of the svn handling version of viewCVS. It seems to have disappeared from sourceforge and no mention is made of it on the new tigris site. -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list

Re: viewcvs 1.0 dev

2005-12-28 Thread Robin Becker
Uwe Hoffmann wrote: > Robin Becker schrieb: > >>Does anyone know the status of the svn handling version of viewCVS. > > > http://viewvc.tigris.org/index.html unfortunately there's no mention of svn handling there and the files only show 0.9[.x] versions.

Re: viewcvs 1.0 dev

2005-12-28 Thread Robin Becker
Martin v. Löwis wrote: > Robin Becker wrote: > >>Does anyone know the status of the svn handling version of viewCVS. > > > It works: > > http://svn.python.org/view/ > > Regards, > Martin yes I ahd it working and updated my freebsd and then couldn't lo

Re: viewcvs 1.0 dev

2005-12-28 Thread Robin Becker
Martin v. Löwis wrote: > Robin Becker wrote: > >>yes I ahd it working and updated my freebsd and then couldn't locate the >>latest version. If the svn head stuff from tigris works that'll do. On >>another point I thought the whole point of sourceforge was tha

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Jan 3)

2006-01-03 Thread Robin Becker
rey goo we get to say "so you're a derivate of C. Tismer, how cool" :) -fleeingly yrs- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list

Re: Spelling mistakes!

2006-01-08 Thread Robin Becker
y >>different meanings? > > >The words overlap in meaning. Both can mean to disparage or >belittle. > >Some dictionaries give 'depreciate' as a definition of 'deprecate'. > > Well if someone told me my investments were deprecated I&#

Mysterious non-module A.sys

2006-01-10 Thread Robin Becker
e from? I tried an experiment and it seems that it's the import statement in B.py so if I changed that to import sys,socket I also get A.socket so I assume it's the import within import that causes these strange modules to appear. Strangely, attempts to import A.sys fail and its value in sys.modules is None. What is the entry for? -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list

Re: Mysterious non-module A.sys

2006-01-10 Thread Robin Becker
Fredrik Lundh wrote: .. >> >>where does A.sys come from? > > > http://www.python.org/doc/essays/packages.html > > "Dummy Entries in sys.modules ... > > ... thanks -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list

ANN: wxPython 2.6.2.1

2006-01-10 Thread Robin Dunn
Announcing -- The 2.6.2.1 release of wxPython is now available for download at http://wxpython.org/download.php. There have been many enhancements and fixes implemented in this version, listed below and at http://wxpython.org/recentchanges.php. What is wxPython? - wxPyt

flatten a level one list

2006-01-11 Thread Robin Becker
,y2,]) --> [x0,y0,x1,y1,] clearly if f is doable then g can be done using zip. I suppose this is a special case flatten, but can flatten be done fast? The python recipes seem rather slow compared to the builtin functions. -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list

Re: flatten a level one list

2006-01-12 Thread Robin Becker
tc etc A fast implementation would probably allocate the output list just once and then stream the values into place with a simple index. -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list

Re: flatten a level one list

2006-01-12 Thread Robin Becker
ip(x, y): for i in pair: res.append(i) return res # New attempts: from itertools import imap def flatten4(x, y): '''D Murman''' l = [] list(imap(l.extend, izip(x, y))) return l from Tkinter import _flatten def flatten5(x, y):

Re: flatten a level one list

2006-01-13 Thread Robin Becker
1]' 'i(xdata, ydata, pad=None)' > 1 loops, best of 3: 46.4 usec per loop > > Not overwhelming, but I expect the difference to grow when the arguments > occupy a significant portion of the available memory. > > Peter very nice indeed; another generalization

Multiple modules with database access + general app design?

2006-01-19 Thread Robin Haswell
use variable variables: $method($args); ?> And $class->$method() just does "global $db; $db->query(...);". Any advice would be greatly appreciated! Cheers -Robin Haswell -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   8   9   >