import pythong from allKnowledge

Jul 10, 2008 21:51

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... )

Leave a comment

Comments 11

kineticfactory July 11 2008, 10:17:34 UTC
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.

Reply

thecolorblue July 12 2008, 00:04:14 UTC
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...

Reply

kineticfactory July 12 2008, 11:52:42 UTC
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.

Reply

thecolorblue July 12 2008, 20:48:43 UTC
here's my code. i think it's not working because the modules i'm working with are not respecting files. but i need to do some more digging.

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


Btw: kineticfactory July 11 2008, 10:18:34 UTC

... )

Reply

Re: Btw: thecolorblue July 12 2008, 00:02:25 UTC
yes i frequently think of this xkcd strip while getting my pythOn.

Reply


onecm July 11 2008, 11:44:39 UTC
yay emma i'm so glad you are learning py. wellllcome.. to spending more time at the computer than before wahahaha. just kidding. but yea iz cool =D

Reply

thecolorblue July 12 2008, 00:03:13 UTC
with the power of py...i can go anywhere. oh wait that's reading rainbow, right?

Reply


Leave a comment

Up