Prev: error: Setup script exited with error: command 'gcc' failed with exit status 1
Next: How to use python to register a service (an existing .exe file)
From: joy99 on 15 Feb 2010 17:04 Dear Group, I am trying to learn CGI. I was checking Python Docs. There are multiple modules. Which one to start with? Is there any other material or URL for step by step learning of CGI. My next question is: I want to test it. I have a small personal computer. I have internet but is connected by a service provider. I do not have personal web page. Can I use my personal computer as a client as well as a server? If your kind time permits to answer me these questions, I would be hugely benefited. Wishing you a happy day ahead, Best Regards, Subhabrata.
From: John Gordon on 15 Feb 2010 17:58 In <631b0785-38db-4c12-a82a-7b11e2235e23(a)o16g2000prh.googlegroups.com> joy99 <subhakolkata1234(a)gmail.com> writes: > Can I use my personal computer as a client as well as a server? Yes, if you install a web server on your PC. You would then use "localhost" in your browser instead of a standard web address. Assuming you're running Windows, have a look at this page to download the Apache web server: http://mirror.candidhosting.com/pub/apache/httpd/binaries/win32/README.html -- John Gordon A is for Amy, who fell down the stairs gordon(a)panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies"
From: Jonathan Gardner on 15 Feb 2010 18:52 On Feb 15, 2:04 pm, joy99 <subhakolkata1...(a)gmail.com> wrote: > > I am trying to learn CGI. I was checking Python Docs. There are > multiple modules. Which one to start with? > Is there any other material or URL for step by step learning of CGI. > I would suggest skipping 15 years of internet progress and going with a more modern framework. I recommend Pylons, although Django and web.py are not bad. > My next question is: > I want to test it. I have a small personal computer. I have internet > but is connected by a service provider. I do not have personal web > page. Can I use my personal computer as a client as well as a server? > Yes. The nature of the internet means anyone that connects can be a client or a server or both at the same time. Heck, you don't even need to have a connection to the internet. Just play with 127.0.0.1, which points right back to the same machine you're running on. I do this all the time for developing and testing out websites or change to websites I work on.
From: Mel on 15 Feb 2010 19:36 joy99 wrote: > Dear Group, > > I am trying to learn CGI. I was checking Python Docs. There are > multiple modules. Which one to start with? > Is there any other material or URL for step by step learning of CGI. > > My next question is: > I want to test it. I have a small personal computer. I have internet > but is connected by a service provider. I do not have personal web > page. Can I use my personal computer as a client as well as a server? A server can be as simple as: #!/usr/bin/env python # -*- coding: ASCII -*- '''Simple CGI server in Python $Id$''' import getopt, os, sys from BaseHTTPServer import HTTPServer from CGIHTTPServer import CGIHTTPRequestHandler port = 8000 opts, args = getopt.getopt (sys.argv[1:], 'd:p:', ['www=', 'port=']) for o, v in opts: if o in ['-d', '--www']: os.chdir (v) elif o in ('-p', '--port'): port = int (v) handler = HTTPServer (('', port), CGIHTTPRequestHandler) handler.serve_forever() If you run this like mycgiserver.py --www=my_www_dir and put your web pages under my_www_dir, and your CGI programs under my_www_dir/cgi-bin then pointing your browser to <http://localhost:8000/> will show you your site. Mel.
From: Lawrence D'Oliveiro on 15 Feb 2010 23:22
In message <631b0785-38db-4c12- a82a-7b11e2235e23(a)o16g2000prh.googlegroups.com>, joy99 wrote: > Is there any other material or URL for step by step learning of CGI. There's the official spec here <http://hoohoo.ncsa.illinois.edu/cgi/interface.html>. |