28.10.2021 Views

Python Tutorial ( PDFDrive )

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Regular-expression Modifiers - Option Flags ......................................... 320

Regular-expression patterns: ................................................................. 321

Regular-expression Examples ............................................... 322

Literal characters: ................................................................................... 322

Character classes: ................................................................................. 322

Special Character Classes: .................................................................... 323

Repetition Cases: ................................................................................... 323

Nongreedy repetition: ............................................................................. 323

Grouping with parentheses: ................................................................... 323

Backreferences: ..................................................................................... 324

Alternatives: ........................................................................................... 324

Anchors: ................................................................................................. 324

Special syntax with parentheses: ........................................................... 324

Python CGI Programming ..................................................... 326

Web Browsing ........................................................................................ 326

CGI Architecture Diagram ...................................................................... 327

Web Server Support & Configuration ..................................................... 327

First CGI Program .................................................................................. 327

Content-type:text/html ................................................................ 328

Hello Word! This is my first CGI program .......................................... 328

HTTP Header ......................................................................................... 328

CGI Environment Variables .................................................................... 328

GET and POST Methods ....................................................................... 329

Passing Information using GET method: ............................................... 329

Simple URL Example : Get Method ....................................................... 330

Content-type:text/html ................................................................ 330

Hello ZARA ALI ..................................................................................... 330

Simple FORM Example: GET Method ................................................... 330

Passing Information using POST method: ............................................. 331

Passing Checkbox Data to CGI Program ............................................... 331

Passing Radio Button Data to CGI Program .......................................... 332

Passing Text Area Data to CGI Program ............................................... 333

Passing Drop Down Box Data to CGI Program ..................................... 334

Using Cookies in CGI ............................................................................. 335

How It Works? ........................................................................................ 335

Setting up Cookies ................................................................................. 335

Retrieving Cookies ................................................................................. 335

File Upload Example: ............................................................................. 336

How To Raise a "File Download" Dialog Box? ....................................... 337

TUTORIALS POINT

Simply Easy Learning

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!