python: Session from mysql save as xml?
stoughto
chris.stoughton at gmail.com
Mon May 9 19:17:55 EDT 2016
I would like to run a script to backup a a gnucash book, using python:
from gnucash import *
session = Session("mysql://username:password@localhost/gnucash")
saveFileName = "backup-12345.xml"
session.saveAs(saveFileName)
The method I am missing is "Session.saveAs(fileName)"
Does such a thing exist, or if not, can someone suggest how to implement
such a thing?
This does not have to be a method of the class Session. Filling in the
details of this function def would work just as well:
def saveSessionToFile(session, fileName):
# open the xml file
# write the session to it
# close whatever needs to be closed
return
Thank you
--
View this message in context: http://gnucash.1415818.n4.nabble.com/python-Session-from-mysql-save-as-xml-tp4684790.html
Sent from the GnuCash - User mailing list archive at Nabble.com.
More information about the gnucash-user
mailing list