Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REQ: Save XML line to a file. #9

Open
GoogleCodeExporter opened this issue Jul 4, 2015 · 2 comments
Open

REQ: Save XML line to a file. #9

GoogleCodeExporter opened this issue Jul 4, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link


It would be useful for me to have a local file data.xml which containe dthe
last xml line.

This would be overwritten each update.
I'm considering altering currentcostserialconn.py readUpdate.

Is this something you would consider adding?
Even better would be a http server offering the lastest xml on a
configurable port.

Original issue reported on code.google.com by matt.jo...@gmail.com on 16 Jul 2009 at 4:01

@GoogleCodeExporter
Copy link
Author

    def readUpdate(self):
        if self.connection != None:
            try:
                self.lock.acquire()
                line = self.connection.readline()
                line = line.rstrip('\r\n')
                f=open("data.xml",'w')
                f.write(line)
                f.close()
                return line
            except serial.SerialException, err:
                self.disconnect()
                raise err
            except Exception, msg:
                self.disconnect()
                raise msg
            finally:
                self.lock.release()

Original comment by matt.jo...@gmail.com on 16 Jul 2009 at 4:25

@GoogleCodeExporter
Copy link
Author

I would also be interested in both a overwritten file and http access.

Original comment by pvanleen...@gmail.com on 12 Mar 2010 at 2:42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant