Re: [ZODB] Django-hotsauce/ZODB 5.4.0/PyPy nightly sprint!!

2018-06-08 Thread Mauro Amico
seems to me really similar to https://github.com/zopefoundation/ZEO/pull/96 try to upgrade to ZEO 5.1.2 mauro. Il Ven 8 Giu 2018, 03:29 Etienne Robillard ha scritto: > Yo people I'm doing a nightly hacking sprint for django-hotsauce on pypy > and got some cool bugs I would li

Re: Asyncio (or something better) for control of a vacuum system/components.

2014-03-24 Thread mauro
Hav you considered the option of a SCADA solution? There are many commercials solutions but also a few open source options such us: http://openscada.org/ http://pvbrowser.de/pvbrowser/index.php You may also ask the vacuum system provider, they should be aware of SCADA solutions supporting their

Re: intersection, union, difference, symmetric difference for dictionaries

2014-02-25 Thread mauro
> > {1, 2} & {2, 3} == {2} > In my mind the intersection is evaluated on keys, so the resulting dict should be the empty one > but > > {1:"a", 2:"b", 3:"c"} & {2:"b", 3:"e", 4:"f"} == ??? my output will be {2:"b", 3:"e"} or {2:"b", 3:"c"} depending on the implementation choice. > > The m

Re: intersection, union, difference, symmetric difference for dictionaries

2014-02-25 Thread mauro
> > {'A': 1} | {'A': 2} > > I would propose at least four: > > {'A': 1} # choose the LHS > {'A': 2} # choose the RHS > {'A': (1,2)} # a resulting pair of both > set(['A']) # you did set-ops, so you get a set The implementation should define if LHS or RHS and user should change th

Re: intersection, union, difference, symmetric difference for dictionaries

2014-02-25 Thread mauro
Il Tue, 25 Feb 2014 22:02:01 +, mauro ha scritto: >> {'A': 1} | {'A': 2} >> >> I would propose at least four: >> >> {'A': 1} # choose the LHS {'A': 2} # choose the RHS {'A': (1,2)} >> #

intersection, union, difference, symmetric difference for dictionaries

2014-02-25 Thread mauro
Dictionaries and sets share a few properties: - Dictionaries keys are unique as well as sets items - Dictionaries and sets are both unordered - Dictionaries and sets are both accessed by key - Dictionaries and sets are both mutables So I wonder why operations such us intersection, union, differen

Re: httplib2 download forbidden

2011-10-06 Thread Mauro Zaccariotto
On 6 Ott, 09:05, Tim Roberts wrote: > Mauro Zaccariotto wrote: > > >Hi! does anyone know what's happening herehttp://code.google.com/p/httplib2/ > >? I get this: > >"403. That s an error. > >Your client does not have permission to get URL /p/httplib2/

httplib2 download forbidden

2011-10-05 Thread Mauro Zaccariotto
Hi! does anyone know what's happening here http://code.google.com/p/httplib2/ ? I get this: "403. That’s an error. Your client does not have permission to get URL /p/httplib2/ from this server. That’s all we know." It seems like the httplib2 googlecode project is preventing from accessing the proje

Re: question about endswith()

2011-03-04 Thread Mauro Caceres
063105.hdf5') for filename in files: if filename.endswith(extensions) : print filename -- Mauro Cáceres -- http://mail.python.org/mailman/listinfo/python-list

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread Mauro Caceres
) is less error prone. The official documentation also recommends to use super() http://docs.python.org/library/functions.html#super -- Mauro Cáceres -- http://mail.python.org/mailman/listinfo/python-list

Re: returning all matching groups with re.search()

2011-02-07 Thread Mauro Caceres
t of tuples if the pattern has more than one group. Empty matches are included in the result. >>> re.findall('e','fredbarneybettywilma') ['e', 'e', 'e'] -- Mauro Cáceres -- http://mail.python.org/mailman/listinfo/python-list

Re: Short circuting

2011-01-24 Thread Mauro Caceres
t. In this case the dictionary will have only one pair. result = pattern.search(line) if result: for key,val in result.groupdict().iteritems(): actions[key](val) -- Mauro Cáceres -- http://mail.python.org/mailman/listinfo/python-list

Re: Books recommendation

2010-12-07 Thread Mauro Caceres
> > > I am also interested to find where I can get Python modules from and how... > similar tools and sites with cpan and ppm for Perl. > > You should look at http://pypi.python.org/pypi, for modules. pip (http://pip.openplans.org/) is a tool used to install python modules.

Ping and ARP on both Win and Linux in Python

2008-03-13 Thread Mauro "Baba" Mascia
Hi, this is my question: I want to know if several switch (about 50) in a big lan are up and then know their MAC addresses to do a list that contains host name, ip and mac. I know only the range of their IP addresses (the host name it's simply to know using socket.gethostn. The first idea it's

Re: cannot create python packages

2007-10-10 Thread mauro
On 10 Ott, 15:01, Konstantinos Pachopoulos <[EMAIL PROTECTED]> wrote: > Hi, > i have the following files: > current_dir/level1/Called.py > current_dir/Caller.py > > Called.py: > --- > class Called: >def exec1(self): > print "Hello" > > Caller.py: > -- > from level1.Called i

setup.py build & SWIG: missing py files (they are outside the build directory)

2007-10-10 Thread mauro
ory as setup.py! Of course I can move it manually, but I have to update also foo-0.0.win32.zip and all this is quite annoying... Did I miss some option in the setup? Is it possible to run a system command (copy) after each extension is compiled and linked and the corresponding .py file is generate

Re: Launching command on windows

2007-09-27 Thread mauro
gt; # This error message could be translated as: > # 'c:\Program' is not an internal nor external command, an executable > program nor a command file > > But if I copy the command in the output, an paste it in a console, it > work very well. > Does any of you know what I can do ? > > PS: I think I'm oblige to add " neer every path for spaces in path, > but if you know an other way, it could be cool :) If you don't mind using spawnl instead of system, this should work even with spaces: os.spawnl(os.P_NOWAITO, command) I hope it helps. Mauro -- http://mail.python.org/mailman/listinfo/python-list

PyObject_CallObject: difference between functions and class methods

2007-09-27 Thread mauro
eturn z def runme(self): mymodule.main(myfunc) # This will work mymodule.main(self.mymethod) # This will not work (Segmentation fault) x = MyClass() x.runme() ## Thanks in advance. Mauro -- http://mail.python.org/mailman/listinfo/python-list

Re: Python class method as an argument of a function in a C extension

2007-09-26 Thread mauro
last I succeeded in finding an example: http://mail.python.org/pipermail/python-list/1999-May/003441.html This uses exactly the PyObject_CallObject, as you suggest. Mauro -- http://mail.python.org/mailman/listinfo/python-list

Python class method as an argument of a function in a C extension

2007-09-26 Thread mauro
Hi all, I am trying to wrap some C code using SWIG (win32, mingw). I am new to SWIG and to the Python/C API so what I am doing is looking at the examples and trying to fit them to my needs, but I cannot find any complete demo example of a C function taking as an argument a Python function defined

Re: Python versus Perl ?

2005-02-11 Thread Mauro Cicognini
r each category... I hate to see scarce resources wasted. Mauro -- http://mail.python.org/mailman/listinfo/python-list