Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
binary_c-python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Izzard, Robert Dr (Maths & Physics)
binary_c-python
Commits
97df1796
Commit
97df1796
authored
5 years ago
by
David Hendriks
Browse files
Options
Downloads
Patches
Plain Diff
cleaned up the function and added the header info
parent
6880748a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
binarycpython/utils/functions.py
+10
-8
10 additions, 8 deletions
binarycpython/utils/functions.py
include/binary_c_python.h
+9
-2
9 additions, 2 deletions
include/binary_c_python.h
with
19 additions
and
10 deletions
binarycpython/utils/functions.py
+
10
−
8
View file @
97df1796
...
@@ -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
):
"""
"""
...
...
This diff is collapsed.
Click to expand it.
include/binary_c_python.h
+
9
−
2
View file @
97df1796
...
@@ -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__);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment