User Profile

Collapse

Profile Sidebar

Collapse
Mandrah
Mandrah
Last Activity: Dec 1 '06, 04:55 AM
Joined: Nov 3 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Mandrah
    started a topic Processing an XHTML form using CGI script

    Processing an XHTML form using CGI script

    I'm having problems casting input information from an XHTML form as a different type in a CGI script using Python.
    For just a simple example I'd use the XHTML code:
    [HTML]<?xml version = "1.0" encoding = "utf-8"?>
    <!DOCTYPE html PUBLIC "-//w3c//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

    <html>
    <head>
    ...
    See more | Go to post

  • That line.split() was what I was looking for. Thank you!
    See more | Go to post

    Leave a comment:


  • Mandrah
    started a topic Processing a comma-delimited text file. [solved]

    Processing a comma-delimited text file. [solved]

    I have a single text file with several lines of information with three items separated by commas. An example of a few lines:

    name1, email1, password1
    name2, email2, password2
    name3, email3, password3

    Using:
    Code:
    def main():
        f = open("database.txt","r")
        print f.readlines()
    main()
    the program prints a list similar to:

    ['name1,...
    See more | Go to post
No activity results to display
Show More
Working...