def get_pickle_minigen(): try: m = pickle.load( open( minigen_pickle_file, "rb" ) ) #print "pickle loaded successfully" except: m = minigen.minigen() #print "new object created" return m
def update_frequency(frequency): # make an instance of the minigen class to handle the connection m = minigen.minigen() # ask the minigen to set the new frequency m.setFrequency(float(frequency)*1000) #close the conection m.close()