hi:
*** newbie-alert ***: both python and storm
the bit of code below - apparently works in sqlalchemy with sqlalchemy
syntax of course.
my question is how can i do the same thing in storm, ie create a whole bunch
or instances at once via a dict.
database = create_database("sqlite:hc.db")
store = Store(database)
class Process(Storm):
__storm_table__ = "process"
ProcessId = Int(primary = True)
Caption = Unicode()
store.execute("CREATE TABLE process " "( \
ProcessId VARCHAR, \
Caption VARCHAR)",
noresult = True \
)
c = wmi.WMI ()
for process in c.Win32_Process (['ProcessId', 'Caption']):
d = dict ((p, getattr (process, p)) for p in process.properties)
Process (**d)
storm.flush()
storm.commit()
thanks
mark
--
storm mailing list
[email protected]
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/storm