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

cleaned up the function and added the header info

parent 6880748a
No related branches found
No related tags found
No related merge requests found
...@@ -53,11 +53,16 @@ def get_help(param_name, return_dict): ...@@ -53,11 +53,16 @@ def get_help(param_name, return_dict):
- available macros - available macros
This function reads out that structure and catches the different components of this output This function reads out that structure and catches the different components of this output
Presenting it in
Will print a dict
return_dict: wether to return the help info dictionary
""" """
if param_name in get_arg_keys(): available_arg_keys = get_arg_keys()
if param_name in available_arg_keys:
help_info = binary_c_python_api.return_help(param_name) help_info = binary_c_python_api.return_help(param_name)
cleaned = [el for el in help_info.split('\n') if not el==''] cleaned = [el for el in help_info.split('\n') if not el=='']
...@@ -104,12 +109,9 @@ def get_help(param_name, return_dict): ...@@ -104,12 +109,9 @@ def get_help(param_name, return_dict):
if return_dict: if return_dict:
return help_info_dict return help_info_dict
else:
print("{} is not a valid parameter name. Please choose from the following parameters:\n\t{}".format(param_name, list(available_arg_keys)))
get_help('RLOF_method', return_dict=True) return None
def run_system(**kwargs): def run_system(**kwargs):
""" """
......
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
#include "binary_c_API_prototypes.h" #include "binary_c_API_prototypes.h"
/* Binary_c's python API prototypes */ /* Binary_c's python API prototypes */
int run_binary (char * argstring, int run_binary(char * argstring,
char ** const outstring, char ** const outstring,
char ** const errorstring, char ** const errorstring,
size_t * const nbytes); size_t * const nbytes);
int run_binary_with_logfile (char * argstring, int run_binary_with_logfile(char * argstring,
char ** const outstring, char ** const outstring,
char ** const errorstring, char ** const errorstring,
size_t * const nbytes); size_t * const nbytes);
...@@ -29,6 +29,13 @@ int return_arglines(char ** const outstring, ...@@ -29,6 +29,13 @@ int return_arglines(char ** const outstring,
char ** const errorstring, char ** const errorstring,
size_t * const nbytes); size_t * const nbytes);
int return_help_info(char * argstring,
char ** const outstring,
char ** const errorstring,
size_t * const nbytes);
/* C macros */ /* C macros */
#define BINARY_C_APITEST_VERSION 0.1 #define BINARY_C_APITEST_VERSION 0.1
#define APIprint(...) APIprintf(__VA_ARGS__); #define APIprint(...) APIprintf(__VA_ARGS__);
......
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