i'm learning python and i have to say i already like it way more than php. sure php has pear and you can get your module on that way, but python is just so elegant and simple -- like LISP, my first programming love
( Read more... )
That's exactly my feeling about Python; it makes programming enjoyable. The way it lets you combine procedural, OO and functional programming in whatever mix you prefer is very liberating.
Python is my language of choice, and has been for the best part of a decade.
can you help me get vars out of an html form? i am trying to upload a file via an html form and then stream the content across a telnet port. i have everything except extracting the content of the file. what should i use?! halp! i've been looking at cgi...
Are you writing a CGI script, or something else (WSGI web app or somesuch)?
If the former, the cgi module is your friend. The form field which is an uploaded file will have a .file attribute you can read like an opened file; there's a code snippet here.
Comments 11
Python is my language of choice, and has been for the best part of a decade.
Reply
Reply
If the former, the cgi module is your friend. The form field which is an uploaded file will have a .file attribute you can read like an opened file; there's a code snippet here.
Reply
from splunk import auth, search
import splunk.rest
import logging as logger
import time
import telnetlib
import base64
import cgi, os
import cgitb; cgitb.enable()
foo = '''
Inputs
class inputs(splunk.rest.BaseRestHandler ( ... )
Reply
( ... )
Reply
Reply
Reply
Reply
Leave a comment