Re: [Tutor] using json to pass a dict thru a file

2015-03-18 Thread Alan Gauld
On 17/03/15 22:30, Doug Basberg wrote: dataDict = {'Time': None, 'Vbatt': None, 'Ichrg': None, 'Vpanel': None} vb = 51.25 ic = 5.89 vp = 55.78 i = 0 dataDict['Time'] = tymAsc dataDict['Vbatt'] = vb dataDict['Ichrg'] = ic dataDict['Vpanel'] = vp fn = 'testData01.dat' f = open(fn, 'ab') I

[Tutor] PyBrain: Question on creating customized DataSet

2015-03-18 Thread prudhvi nethi
Hi, I'm trying to create a data set for using it with BackpropTrainer *(PyBrain)* The model is that i have a bunch of inputs (which can have multiple values). Resulting in some Output Kx( different values). Sample data ( A subset of the data ) Input (x) Input (y) Input (z) Input(a)

Re: [Tutor] PyBrain: Question on creating customized DataSet

2015-03-18 Thread Alan Gauld
On 18/03/15 02:15, prudhvi nethi wrote: Hi, I'm trying to create a data set for using it with BackpropTrainer *(PyBrain)* Your question seems to be about pybrain rather than about Python. There is a pybrain google group: http://groups.google.com/group/pybrain and a general email link

Re: [Tutor] COM(ActiveX) class - how to list methods?

2015-03-18 Thread Alan Gauld
On 18/03/15 16:33, Solomon Vimal wrote: I am a newbie in python. I am more used to MATLAB. In MATLAB there is a function methodsview(h) that will pop up a window listing out all the methods of a handle (h) referring to a Windows COM object - in my case, a software controller. If its a COM

[Tutor] COM(ActiveX) class - how to list methods?

2015-03-18 Thread Solomon Vimal
Hi, I am a newbie in python. I am more used to MATLAB. In MATLAB there is a function methodsview(h) that will pop up a window listing out all the methods of a handle (h) referring to a Windows COM object - in my case, a software controller. Is there is a similar function in Python? Maybe there

Re: [Tutor] Is there a 'hook' to capture all exits from a python program?

2015-03-18 Thread Steven D'Aprano
On Wed, Mar 18, 2015 at 10:59:35PM +, Alan Gauld wrote: On 18/03/15 18:28, Doug Basberg wrote: I do real-time controls programming and I control a relay in a python program that must be turned off before the program ends. You don't say what your environment is but you should be aware

Re: [Tutor] Is there a 'hook' to capture all exits from a python program?

2015-03-18 Thread Alan Gauld
On 18/03/15 23:55, Steven D'Aprano wrote: You don't say what your environment is but you should be aware that Python is not really a suitable tool for real time programming, especially if it safety critical. I wouldn't want to use Python to control the critical parts of a nuclear reactor or

Re: [Tutor] Is there a 'hook' to capture all exits from a python program?

2015-03-18 Thread Alan Gauld
On 18/03/15 18:28, Doug Basberg wrote: I do real-time controls programming and I control a relay in a python program that must be turned off before the program ends. You don't say what your environment is but you should be aware that Python is not really a suitable tool for real time

Re: [Tutor] Is there a 'hook' to capture all exits from a python program?

2015-03-18 Thread Mark Lawrence
On 19/03/2015 01:07, Alan Gauld wrote: On 18/03/15 23:55, Steven D'Aprano wrote: You don't say what your environment is but you should be aware that Python is not really a suitable tool for real time programming, especially if it safety critical. I wouldn't want to use Python to control the

Re: [Tutor] List comprehensions to search a list--amazing!

2015-03-18 Thread Mark Lawrence
On 19/03/2015 04:20, boB Stepp wrote: I hope extolling the beauty and power of Python on this list is allowed, because I have had a large WOW!!! moment tonight. I had a problem I was working on at work this afternoon. I have a list of ~ 10,000 floating point numbers, which run from largest to

[Tutor] List comprehensions to search a list--amazing!

2015-03-18 Thread boB Stepp
I hope extolling the beauty and power of Python on this list is allowed, because I have had a large WOW!!! moment tonight. I had a problem I was working on at work this afternoon. I have a list of ~ 10,000 floating point numbers, which run from largest to smallest. There are duplicates scattered

Re: [Tutor] List comprehensions to search a list--amazing!

2015-03-18 Thread Dave Angel
On 03/19/2015 12:20 AM, boB Stepp wrote: I hope extolling the beauty and power of Python on this list is allowed, because I have had a large WOW!!! moment tonight. I had a problem I was working on at work this afternoon. I have a list of ~ 10,000 floating point numbers, which run from largest to

[Tutor] Is there a 'hook' to capture all exits from a python program?

2015-03-18 Thread Doug Basberg
I do real-time controls programming and I control a relay in a python program that must be turned off before the program ends. First, the program should never exit unless I do it explicitly. Is there a 'hook' to process before any exit (even if not expected). I must turn off that relay or harm

Re: [Tutor] Is there a 'hook' to capture all exits from a python program?

2015-03-18 Thread Mark Lawrence
On 18/03/2015 18:28, Doug Basberg wrote: I do real-time controls programming and I control a relay in a python program that must be turned off before the program ends. First, the program should never exit unless I do it explicitly. Is there a 'hook' to process before any exit (even if not

Re: [Tutor] Is there a 'hook' to capture all exits from a python program?

2015-03-18 Thread Albert-Jan Roskam
- On Wed, Mar 18, 2015 8:43 PM CET Mark Lawrence wrote: On 18/03/2015 18:28, Doug Basberg wrote: I do real-time controls programming and I control a relay in a python program that must be turned off before the program ends. First, the program should never exit