Python Forum
Web Form to Python Script to Text File to zip file to web
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Web Form to Python Script to Text File to zip file to web
#1
Greetings folks,
I might be over thinking my question but let me ask it and get feedback from experts.

I want to have a web form that has multiple fields (devicename, redundant, sharedIP, indaIP, indbIP) and I want to pass those variables to a python script that will then run and create some text files that I will use for other things and then I will have the text files added to a zipped file and then return an html page to the user with a link to the zip file. What I am trying to do is create files that engineers can use to configure some devices.

So engineer would put the information in the browser and then they would get a zipped file with multiple text files that they will use to configure a device (standalone) or a pair of devices (High Availability)

Do I use Flask, or CGO or what? I have done this with perl in the past, but can't wrap my head around how to do this all with python.
Any help would be appreciated.

Thanks
Wally
Reply
#2
(Aug-09-2020, 11:24 AM)wfsteadman Wrote: Do I use Flask, or CGO or what?
Flask is fine for this,it should be a quite manageable/simple task to do.
The obstacle here can be more that you new to this in Python/Flask.
Look at some tutorial eg this match the task pretty good,if just change some stuff.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  open a text file using list() Pedroski55 2 114 Feb-25-2026, 06:57 PM
Last Post: noisefloor
  If I open a file write or append, is the file loaded into RAM? Pedroski55 11 1,118 Jan-14-2026, 07:49 AM
Last Post: Pedroski55
  How to Randomly Print a Quote From a Text File When User Types a Command on Main Menu BillKochman 13 7,272 Dec-16-2025, 05:29 PM
Last Post: zodazy
Question [SOLVED] Linefeed when writing "f" strings to text file? Winfried 5 858 Nov-04-2025, 11:51 AM
Last Post: buran
  How can I write formatted (i.e. bold, italic, change font size, etc.) text to a file? JohnJSal 13 36,670 May-20-2025, 12:26 PM
Last Post: hanmen9527
  How to remove unwanted images and tables from a Word file using Python? rownong 2 2,306 Feb-04-2025, 08:30 AM
Last Post: Pedroski55
  pass arguments from bat file to pyhon script from application absolut 2 2,880 Jan-13-2025, 11:05 AM
Last Post: DeaD_EyE
  Best way to feed python script of a file absolut 6 2,504 Jan-11-2025, 07:03 AM
Last Post: Gribouillis
  Removal of watermark logo pdf file Python druva 0 1,684 Jan-01-2025, 11:55 AM
Last Post: druva
  How to write variable in a python file then import it in another python file? tatahuft 4 2,253 Jan-01-2025, 12:18 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020