Closed robmarkcole closed 6 years ago
Yup. Can definitely be done with the current set up.
Something like the following should work. I haven't tested it, just wrote it in here. But it should be close.
<section-start>
```python
import os
from glob import glob
from IPython.display import display, Markdown
path_to_watch = '/a/path/here'
glob_string = os.path.join(path_to_watch, '*.jpg')
```
</section-start>
<section-filechange paths="[path_to_watch]">
```python
filepath_list = glob(glob_string)
markdown_string = '\n'.join([
"* {}".format(filepath)
for filepath in filepath_list
])
display(Markdown(markdown_string))
```
</section-filechange>
With the same application in mind, is it possible to programatically display input text fields, in this case using the column headers from a database?
Yup, programmatically create a pandas dataframe and use the table variable. Would that work?
Your example works nicely
Good to hear :)
I have a use case which may require functionaltiy added. I want to use scriptedforms to capture a list of images saved during an experiment run. I will use a form to enter the experiment parameters (in my case camera exposure time etc) and I want the form to display a list of all the .jpg images saved in a folder. At the and of the experiment run I will post the paths of all saved .jpg to an external database. Thereore my request is: live updating table of all .jpg files in a folder. Is this possible?