Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8261077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:16:46+00:00 2026-06-08T03:16:46+00:00

We’ve got a number of perl and python scripts we want to expose to

  • 0

We’ve got a number of perl and python scripts we want to expose to some of our teammates for casual usage; and we really don’t want ot deal with getting them setup with git, perl, python, dependencies, etc.

One idea we had was to write a descriptor for each script as to what arguments it needed; and then let a simple HTML page call a CGI script with the appropriate arguments, wait and return stdout to the user.

This seems such a simple need that I’m amazed that I can’t find anything like it existing out there. No framework that renders out the form, that puts out a virtual console screen…

There are, of course, major security concerns. Can anyone recommend a solution that does the above, or something else similar?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T03:16:48+00:00Added an answer on June 8, 2026 at 3:16 am

    I think you’re looking at the problem the wrong way.

    No generic framework for running scripts would be likely to help type-checking the arguments to an arbitrary perl or python script, since they’re just strings (whether passed to sys.argv/$ARGV or as CGI environment variables).

    But if you split this into parts, they’re all pretty easy, and mostly orthogonal.

    First, how do you do type-checking on the fields? Well, if you’re willing to require HTML 5, just put the appropriate type and other parameters on the fields:

    <input name="foo" type="number" required>
    

    If you need to support older browsers, google “HTML form validation” or “JS form validation” and you’ll find hundreds of libraries that do things, either by simplifying the JS you’d have to write, or by letting you attach stock validators by name or CSS style, e.g.:

      // ...
      <input name="foo" id="foo">
    </form>
    <script>
      // ...
      Validator.add("foo", type="number", required=true)
    </script>
    

    As usual jQuery is tremendously helpful. There are some solutions that let you write something identical to HTML 5; articles like this one show how easy it is to build one from scratch. Or, even simpler, just use the Validation plugin, so you only need one line of JS.

    For setting up the form to trigger your scripts, any stock CGI framework will do this out of the box.

    For making the scripts return their stdout to the user, that’s built-in to CGI too. However, make sure to configure your server to send content-type text/plain instead of text/html (for the directory the scripts are in, or for *.cgi or *.py/*.pl, or whatever’s appropriate).

    So, what’s left? Do you want to generate the forms automatically from, say, some database mapping script names to type validation strings? Again, nobody’s going to have a generic library that builds forms out of your type string format. But it’s pretty easy to write with jQuery. Just create a form with an empty fieldset and action. In #(document).ready (or on selecting from an option menu, or whatever), add fields with the appropriate validation attributes to the empty fieldset. (Or, alternatively, if you’re using a simple script-based validation library, just modify the library code to use your type descriptors directly instead of using some other format.) You can also set the action attribute here (if you’re using HTML 5 or the Validation plugin, so you don’t need a custom submit script), or just hit the URL from your custom submit script (if you’re doing validation in a way that already needs it).

    So, yes, there’s some code to be written here. But any solution is going to require some code—you have to feed the types into it somehow, right?—and using popular general-purpose libraries (e.g., jQuery with the Validation plugin) is probably going to require no more code than any more special-purpose framework would have. As well as being a lot more customizable, and maintainable (it’s a lot easier to find people who have jQuery experience than people who have experience with some narrow-purpose library).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.