You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WimbledonLabs edited this page Feb 9, 2013
·
2 revisions
The compile methods script is one of the most simple examples of how pstorage can be used outside of SnakeCharmer and stosh. It goes through the database compiling every method. This is created because there are binary incompatibilities if they are precompiled.
The whole source code is as follows:
importpstorage;
importos;
importgetpass;
password=getpass.getpass( "Enter root password: " );
storage=pstorage.Storage( '127.0.0.1' );
storage.login( 'root', password );
fordirpath, dirnames, filenamesinos.walk("storserv_data"):
print(dirpath);
if"method_text"infilenames:
#Method found and needs to be compiledmethod=dirpath.replace('/', '.');
method=method.replace('storserv_data', 'storage');
method=method+".compile()";
print("executing:\t"+method+'\n');
exec(method);