GetTimeStamp in python scripts

Hello, I’m trying to extract a module timestamp from a python script but having some issue:

from pcbnew import *

filename = 'test.kicad_pcb'        
pcb = LoadBoard(filename)

for module in pcb.GetModules():
    print "* Module: %s - %8.8lX"%(module.GetReference(), module.GetTimeStamp())

This does not work as I expected as python complains about memory leaks and the value I get is a pointer on something I don’t know, not the time_t itself:

swig/python detected a memory leak of type 'time_t *', no destructor found.

Does anyone know how I can read this value in python?

Hit up the KiCAD developer IRC channel or mailing list if you don’t get any responses here for another day I’d say is the best to get this solved.

Thank you,

I changed my way of doing, took fewer time to extract the informations from a custom parser than trying to figure out why this wouldn’t work.

1 Like