Skip to content
Snippets Groups Projects
Commit 6f4ff15b authored by David Hendriks's avatar David Hendriks
Browse files

added some small stuff here and there

parent e86301ca
No related branches found
No related tags found
No related merge requests found
......@@ -178,7 +178,6 @@ def create_arg_string(arg_dict):
arg_string = arg_string.strip()
return arg_string
def get_defaults(filter_values=False):
"""
Function that calls the binaryc get args function and cast it into a dictionary
......
......@@ -205,16 +205,26 @@ class Population(object):
return options
def return_binary_c_version_info(self):
def return_binary_c_version_info(self, parsed=False):
"""
Function that returns the version information of binary_c
TODO: Put in a nice dict.
"""
version_info = binary_c_python_api.return_version_info()
version_info = binary_c_python_api.return_version_info().strip()
return version_info.strip()
if parsed:
version_info = parse_binary_c_version_info(version_info)
return version_info
def parse_binary_c_version_info(self):
"""
Function that parses the output of the version info that binary_c gives. This again is alot of string manipulation. Sensitive to breaking somewhere along the line.
"""
# TODO: write parsing function
pass
def return_binary_c_defaults(self):
"""
......@@ -342,6 +352,7 @@ class Population(object):
self.grid_options["store_memaddr"] = binary_c_python_api.return_store("")
# Execute.
# TODO: CHange this part alot. This is not finished whatsoever
out = binary_c_python_api.run_population(
self.return_argline(),
self.grid_options["custom_logging_func_memaddr"],
......@@ -409,4 +420,4 @@ class Population(object):
print(output)
################################################################################################
################################################################################################
\ No newline at end of file
from binarycpython.utils.functions import (
get_help_super,
get_help_all
get_help_all,
get_help
)
#############################
......@@ -12,4 +13,5 @@ from binarycpython.utils.functions import (
## Help functionality
print(get_help_super(print_help=True, return_dict=False, fail_silently=False))
print(get_help_all(print_help=True))
print(get_help('M_1'))
#
\ No newline at end of file
......@@ -39,8 +39,10 @@ test_pop.set(
# test_pop.return_argline()
## return version info
# version_info = test_pop.return_binary_c_version_info()
# print(version_info)
version_info = test_pop.return_binary_c_version_info()
print(version_info)
quit()
## Use custom arg file
# test_pop.evolve_population(custom_arg_file='/home/david/projects/binary_c_root/binary_c-python/tests/population/custom_arg_file.txt')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment