Below is my HTML code...

<!DOCTYPE html>
<html>
<body>

<h2>HTML Forms</h2>

<form action=" ">
  First name:<br>
  <input type="text" name="Directory" value="C:\MyDir">
  <br>
  <br>
  <input type="submit" value="VIEW">
</form> 

<p>I want is : If you I the "Submit" button, the form-data will be sent to 
a page called "/myscript.py and will perform the operation".</p>

</body>
</html>






myscript.py:

import os

def  f1():
       print ("Below are the files present in your Directory { }" 
.format(os.listdir("C:\MyDir "))

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a4fd2aa4-b28a-465f-aaab-dc279c4647d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to