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

last update. the rest is in the binary_c-python repo

parent b617bec4
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,6 @@ import subprocess
import socket
# Functions for the automatic logging of stuff
def autogen_C_logging_code(logging_dict):
# See example_perl.pm autologging
"""
......@@ -194,7 +193,6 @@ def return_compilation_dict():
'inc': inc
}
# compilation_dict = return_compilation_dict('libcustomlogging')
def compile_shared_lib(code, sourcefile_name, outfile_name):
"""
Function to write the custom logging code to a file and then compile it.
......@@ -224,21 +222,4 @@ def compile_shared_lib(code, sourcefile_name, outfile_name):
shell=True)
if res:
print('Output of compilation command:\n{}'.format(res))
# generate logging lines
logging_line = autogen_C_logging_code(
{
'MY_STELLAR_DATA': ['model.time', 'star[0].mass'],
'my_sss2': ['model.time', 'star[1].mass']
}
)
# Generate code around logging lines
created_code = binary_c_log_code(logging_line)
# print(created_code)
# quit()
compile_shared_lib(created_code, sourcefile_name='custom_logging.c', outfile_name='lib_custom_logging.so')
\ No newline at end of file
print('Output of compilation command:\n{}'.format(res))
\ No newline at end of file
File deleted
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