Re: advice on sub-classing multiprocessing.Process and multiprocessing.BaseManager

2014-03-25 Thread matt . newville
ChrisA - >> I wasn't really asking "is multiprocessing appropriate?" but whether >> there was a cleaner way to subclass multiprocessing.BaseManager() to >> use a subclass of Process(). I can believe the answer is No, but >> thought I'd ask. > > I've never subclassed BaseManager like this. It m

Re: advice on sub-classing multiprocessing.Process and multiprocessing.BaseManager

2014-03-24 Thread matt . newville
On Monday, March 24, 2014 7:19:56 PM UTC-5, Chris Angelico wrote: > On Tue, Mar 25, 2014 at 7:24 AM, Matt Newville > > > I'm maintaining a python interface to a C library for a distributed > > control system (EPICS, sort of a SCADA system) that does a large > > amou

advice on sub-classing multiprocessing.Process and multiprocessing.BaseManager

2014-03-24 Thread Matt Newville
I'm maintaining a python interface to a C library for a distributed control system (EPICS, sort of a SCADA system) that does a large amount of relatively light-weight network I/O. In order to keep many connections open and responsive, and to provide a simple interface, the python library keeps a

Re: Question about ast.literal_eval

2013-05-20 Thread matt . newville
his works by maintaining an internal namespace (a flat dictionary), and walking the AST generated for the expression. It supports most Python syntax, including if, for, while, and try/except blocks, and function definitions, and with the notable exceptions of eval, exec, class, lambda, yield, and i

Re: Matplotlib Slider Widget and changing colorbar threshold

2013-03-13 Thread matt . newville
specific code building the control is at https://github.com/newville/wxmplot/blob/master/lib/imageframe.py Hope that helps, --Matt Newville -- http://mail.python.org/mailman/listinfo/python-list

Re: Yet another attempt at a safe eval() call

2013-01-05 Thread matt . newville
On Saturday, January 5, 2013 8:17:16 AM UTC-8, Oscar Benjamin wrote: > On 5 January 2013 16:01, Chris Angelico wrote: > > > On Sun, Jan 6, 2013 at 2:56 AM, Oscar Benjamin > > > wrote: > > >> On 4 January 2013 15:53, Grant Edwards wrote: > > >>> On 2013-01-04, Steven D'Aprano > >>> wrote: >

Re: netcdf4-python

2010-02-20 Thread Matt Newville
responding (in windows cmd). > > I'm not sure what is wrong so if anyone as any ideas I would gladly > send you the netcdf file to try. Thanks. If the file is really of NetCDF3 format, scipy.io.netcdf should work. Replace netCDF4.Dataset(filename,'r',format='NETCDF3_CLASSIC') with scipy.io.netcdf.netcdf_open(filename,'r') --Matt Newville -- http://mail.python.org/mailman/listinfo/python-list

Re: Arrrrgh! Another module broken

2010-01-17 Thread Matt Newville
On Jan 17, 7:25 pm, Jive Dadson wrote: > I just found another module that broke when I went to 2.6. > Gnuplot. > Apparently one of its routines has a parameter > named "with."  That used to be okay, and now it's not. This was fixed in version 1.8 of Gnuplot.py > Once I get everything to work u

Re: Python and GUI

2007-05-24 Thread matt . newville
> Do others think like me here? Yes!! I agree completely: Wax is not only a fantastic idea, but a very good start at an implementation of that idea. --Matt Newville -- http://mail.python.org/mailman/listinfo/python-list

Re: Coding style and else statements

2006-08-31 Thread matt . newville
> To my eyes, that's less readable than, and has no benefit over, the > following: > > def foo(thing): > if thing: > result = thing+1 > else: > result = -1 > return result I wouldn't discount: def foo(thing): result = -1 if thing: