streamlit-ace
streamlit-ace copied to clipboard
Can it run/compiled when it run?
This is just a text editor with syntax highlighting. But you can send the code for execution, for example, using subprocess.
How? How do i compile a input code from code editor then execute it in another area/column? I don't understand suprocess that you said
def get_dataframe_by_name(**kwargs):
print(kwargs['name'])
return kwargs['name']
content = st_ace(**kwargs)
if content is not None:
global_dict = {}
locals_dict = {
'st': st,
'dataframes': dataframe_settings,
'get_dataframe_by_name': get_dataframe_by_name
}
exec(content, global_dict, locals_dict)
content:
name = get_dataframe_by_name(name='xxxxxx') st.write(name)