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
m
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
m
I appreciate the advise to use json to pass a dict thru a file. Below is
the code
To 'dump' the dict to a file and the code to 'load' the dict and the error
message
I get testing this.
What am I doing wrong? Thanks.
/
I would like to pass the contents of a dictionary from one program to
another through a file. So, what is the elegant way to pass a dictionary by
file? My early learning about Python seems to indicate that only ascii is
easily passed in files. I am using Python 2.7.4 now. Should I be learning
o
Stat = {'Vbatt': 51.24, 'Ichrg': 6.75}
print ' SOLAR PANEL VOLTAGE'
print('DSB "HI;" %s') % (str(Stat['Vbatt']))
print(' %s') %
(str(Stat['Vbatt']))
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://m