Got any questions?

Video statistics:

Thank-yous, questions and comments

If this video tutorial was helpful please take some time to say thank-you to the authors for their hard work. Feel free to ask questions.
Let the author know why their video tutorial was useful - what are
you learning about? Did the video tutorial save you time? Would you like to see more?

All comments excluding tick-boxed quick-comments

Thanks. That helped. I had a bit of trouble understanding some of the spoken words. Perhaps you could intentionally speak more slowly when technical phrases or terms-of-art are being used, instead of speeding up through them.

Woops. I meant to post a comment here and instead posted it on video 1. Any thoughts on why the page won't load in Chrome? I realize this may not be very relevant to the tutorial, no obligation to answer unless you have an easy already known response.

Well if you wanted to use Python CGI stuff in the "real world" you probably wouldn't run it via the little Python server used before. It'd be ok if you were just using it at home or similar, but it's probably not suitable for wider use. Also in terms of hosting you'd be more likely to be able to run CGI scripts via apache (which helps avoid having to open up different ports etc).

As for security - well this style of web programming provides very little baked-in security. As a very direct way of doing stuff you have to consider the fact that anything that you write could go wrong. So when you read information from the user you have to make sure you've validated it.

In particular you have to be careful when reading/writing files, starting new processes, talking to databases and outputting html to the user. There are plenty of guides out there to web programming security, but key types to investigate are:

* SQL Injection

* Cross-site scripting exploit

* Cross-site request forgery

There are other types to worry about, but these will give you an idea of things to watch out for. They are also not specific to Python and/or CGI programming - all web-programming has to deal with these kinds of exploits.

Wow! I had no idea that Python was so powerful, that I could run a simple web server in basically 5 lines of code. I was able to take a large .html page I had made before, and stick sections of the text in string variables (like strVar = ''' my text '''), and have an entire web page recreated on the fly from the variables. I learnt a lot in basically just 15 minutes, and only 2 videos! Excellent. I can't wait to finish the series, but I have to leave for home now.

Please discuss more on the security risks of this type of easy server. I want to do a lot of work with this type of quick server.

Problem in lesson 2 using Win XP. I start the webserver running CGIServer.py. I then input into the browser http://127.0.0.1:8000 and can see the folders in the browser. However, if I click on the cgi-bin folder, I get the following error response:

cool! works easily on xp. I didn't realize I could run a little cgi server on xp. I don't know its limitations and how fully it simulates serverside situation. But for this type of example, it is easier and less annoying than uploading little py test progs to my website & running them.

Educating the Open-source Community With Showmedo

Although as important as the software it supports, education
and documentation are relatively neglected in the Open-source
world. Coders love to code, and explaining how best to use or
improve the software tends to be deferred or even
sidelined.

At Showmedo we believe the community can play a vital role
here and also say thanks for the tools and software that make
our lives easier. If you have a piece of software you love or a
programming langugage you are enthusiastic about, why not make
a screencast showing others how to use it? All the stuff you
wish you'd been told, the tips, tricks, insights that would
have saved you time and frustration.

Screencasting is easier than you think, and we're happy to
help you. You can
emailus for
advice or just use some of the how-to screencasts on the site.
This
screencasting learning-pathis a
good place to start.

CLUB SHOWMEDO

Are you learning Python? To keep the site running clean and ad-free we've started Club ShowMeDo. The club will allow you access to some special videos we're making to pass on programming skills we consider important to the development and enjoyment of Free Open Source Software (FOSS).

The focus at the moment is on developing with the Python programming language, one of the backbones of the FOSS movement with a huge number of included and third-party libraries.

THANKS

Feedback

Showmedo's development is fairly rapid and bugs will inevitably creep in. If you have any problems please drop us a line using the contact address below. Likewise, any suggestions for improvements to the site are gratefully received.