33import logging
44import os
55
6+
67def main ():
78 args_parser = argparse .ArgumentParser (
89 description = "Start parsing Domain and Problem files with PDDL.jl using Python"
@@ -12,19 +13,23 @@ def main():
1213 args_parser .add_argument ("problem" , type = str , help = "PDDL problem file" )
1314 args_parser .add_argument ("-v" , "--verbose" , help = "Increases the output's verbosity" )
1415 args = args_parser .parse_args ()
15- logging .basicConfig (filename = 'logs/main.log' , format = '%(levelname)s:%(message)s' , filemode = 'w' , level = logging .INFO ) # Creates the log file
16+ logging .basicConfig (
17+ filename = "logs/main.log" ,
18+ format = "%(levelname)s:%(message)s" ,
19+ filemode = "w" ,
20+ level = logging .INFO ,
21+ ) # Creates the log file
1622 apla_tbx = parser .AutomatedPlanner (args .domain , args .problem )
1723 logging .info ("Starting the tool" )
1824 path , time = apla_tbx .depth_first_search (time_it = True )
1925 logging .info (apla_tbx .get_actions_from_path (path ))
2026 logging .info ("Computation time: %.2f seconds" % time )
2127 logging .info ("Tool finished" )
22- #Output the log (to show something in the output screen)
28+ # Output the log (to show something in the output screen)
2329 logfile = open ("logs/main.log" , "r" )
2430 print (logfile .read ())
2531 logfile .close ()
2632
2733
28-
2934if __name__ == "__main__" :
3035 main ()
0 commit comments