vendredi 21 juillet 2017

How can I call a python function that takes arguments from html?

At my internship I have the job to program a web-interface for an e-mail server that runs apache.

The script needs to be able to browse to a specified path (i need argument passing for that), search the files in the folder for a string and list the folders content.

So, how can i pass arguments from an html webpage to my python script and call the corrosponding function?

For example, i have a textfield and onclick of the "Navigate" button i take the input of the field and call the navigate_to(path) method in my python script.

I dove into cgi, but that couldnt help me and the resources i find online are slim and way above my reach (programming custom tags in django?).

Is there a way to do that, and if not with python - what is the other best way to get to the result?

Aucun commentaire:

Enregistrer un commentaire