<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'problem with simple Cookie creation....???' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'problem with simple Cookie creation....???' posted on the 'Python' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 25 May 2013 23:07:29 -0700</pubDate>
    <lastBuildDate>Sat, 25 May 2013 23:07:29 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>problem with simple Cookie creation....???</title>
      <link>http://www.programmersheaven.com/mb/python/181199/181199/problem-with-simple-cookie-creation/</link>
      <description>&lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by andohung at  2003-4-5 22:30:30&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
I tried to create a Cookie in python and try to test it if its in the os.environ.&lt;br /&gt;
but the Cookie wasn't created or detected afterwards...&lt;br /&gt;
here is my code.&lt;br /&gt;
                           &lt;br /&gt;
                           C = Cookie.SimpleCookie()&lt;br /&gt;
                           C["username"] = tusername&lt;br /&gt;
                           C["validated"] = tvalidated&lt;br /&gt;
&lt;br /&gt;
                           if os.environ.has_key("HTTP_COOKIE"):&lt;br /&gt;
                                cookie_exist = "yes"&lt;br /&gt;
                           else:&lt;br /&gt;
                                cookie_exist = "no"&lt;br /&gt;
&lt;br /&gt;
                           print cookie_exist&lt;br /&gt;
&lt;br /&gt;
anyone pls help!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/181199/181199/problem-with-simple-cookie-creation/</guid>
      <pubDate>Sat, 05 Apr 2003 22:29:21 -0700</pubDate>
      <category>Python</category>
    </item>
    <item>
      <title>Re: problem with simple Cookie creation....???</title>
      <link>http://www.programmersheaven.com/mb/python/181199/181494/re-problem-with-simple-cookie-creation/#181494</link>
      <description>&lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by Moderator at 2003-4-7 8:44:42&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by andohung at  2003-4-5 22:30:30&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: I tried to create a Cookie in python and try to test it if its in the os.environ.&lt;br /&gt;
: but the Cookie wasn't created or detected afterwards...&lt;br /&gt;
: here is my code.&lt;br /&gt;
:                            &lt;br /&gt;
:                            C = Cookie.SimpleCookie()&lt;br /&gt;
:                            C["username"] = tusername&lt;br /&gt;
:                            C["validated"] = tvalidated&lt;br /&gt;
: &lt;br /&gt;
:                            if os.environ.has_key("HTTP_COOKIE"):&lt;br /&gt;
:                                 cookie_exist = "yes"&lt;br /&gt;
:                            else:&lt;br /&gt;
:                                 cookie_exist = "no"&lt;br /&gt;
: &lt;br /&gt;
:                            print cookie_exist&lt;br /&gt;
: &lt;br /&gt;
: anyone pls help!&lt;br /&gt;
&lt;br /&gt;
Well, what did you do with the cookie once you created it?  If you don't include it in the http headers of a webpage, it will never be set anywhere.  Cookies are used for state management in web browsers.  You set them by including Set-Cookie directives in the http headers of a webpage, and the browser returns them when it requests that page again from the server.&lt;br /&gt;
&lt;br /&gt;
Here's a simple script I just wrote and dropped in my Apache server's cgi-bin:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
#!C:\Python22\python.exe

import Cookie, cgi, cgitb, os

cgitb.enable()

print 'Content-type: text/plain'

c = Cookie.SimpleCookie()
c['username'] = 'bobjones'
c['password'] = 'foobar'

print c

print # end of headers

for k, v in os.environ.items():
	print k, "=", v
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
The first time I viewed it, there was no HTTP_COOKIE variable in the results because the cookie wasn't set until I viewed the page.  Reloading the page, however, included the HTTP_COOKIE variable because my browser was then able to return it to the server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;em&gt;&lt;span style="color: Blue;"&gt;&lt;span style="color: Red;"&gt;i&lt;/span&gt;nfidel&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/181199/181494/re-problem-with-simple-cookie-creation/#181494</guid>
      <pubDate>Mon, 07 Apr 2003 08:41:17 -0700</pubDate>
      <category>Python</category>
    </item>
    <item>
      <title>Re: problem with simple Cookie creation....???</title>
      <link>http://www.programmersheaven.com/mb/python/181199/181539/re-problem-with-simple-cookie-creation/#181539</link>
      <description>: &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by Moderator at 2003-4-7 8:44:42&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by andohung at  2003-4-5 22:30:30&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: : I tried to create a Cookie in python and try to test it if its in the os.environ.&lt;br /&gt;
: : but the Cookie wasn't created or detected afterwards...&lt;br /&gt;
: : here is my code.&lt;br /&gt;
: :                            &lt;br /&gt;
: :                            C = Cookie.SimpleCookie()&lt;br /&gt;
: :                            C["username"] = tusername&lt;br /&gt;
: :                            C["validated"] = tvalidated&lt;br /&gt;
: : &lt;br /&gt;
: :                            if os.environ.has_key("HTTP_COOKIE"):&lt;br /&gt;
: :                                 cookie_exist = "yes"&lt;br /&gt;
: :                            else:&lt;br /&gt;
: :                                 cookie_exist = "no"&lt;br /&gt;
: : &lt;br /&gt;
: :                            print cookie_exist&lt;br /&gt;
: : &lt;br /&gt;
: : anyone pls help!&lt;br /&gt;
: &lt;br /&gt;
: Well, what did you do with the cookie once you created it?  If you don't include it in the http headers of a webpage, it will never be set anywhere.  Cookies are used for state management in web browsers.  You set them by including Set-Cookie directives in the http headers of a webpage, and the browser returns them when it requests that page again from the server.&lt;br /&gt;
: &lt;br /&gt;
: Here's a simple script I just wrote and dropped in my Apache server's cgi-bin:&lt;br /&gt;
: &lt;br /&gt;
: &lt;pre class="sourcecode"&gt;
: #!C:\Python22\python.exe
: 
: import Cookie, cgi, cgitb, os
: 
: cgitb.enable()
: 
: print 'Content-type: text/plain'
: 
: c = Cookie.SimpleCookie()
: c['username'] = 'bobjones'
: c['password'] = 'foobar'
: 
: print c
: 
: print # end of headers
: 
: for k, v in os.environ.items():
: 	print k, "=", v
: &lt;/pre&gt;&lt;br /&gt;
: &lt;br /&gt;
: The first time I viewed it, there was no HTTP_COOKIE variable in the results because the cookie wasn't set until I viewed the page.  Reloading the page, however, included the HTTP_COOKIE variable because my browser was then able to return it to the server.&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;span style="font-size: large;"&gt;&lt;em&gt;&lt;span style="color: Blue;"&gt;&lt;span style="color: Red;"&gt;i&lt;/span&gt;nfidel&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
Can you make websites with Python?!&lt;br /&gt;
&lt;br /&gt;
Id think that the regualr HTML &lt;br /&gt;
&lt;pre class="sourcecode"&gt; Would be a lot better =P &lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/181199/181539/re-problem-with-simple-cookie-creation/#181539</guid>
      <pubDate>Mon, 07 Apr 2003 13:00:22 -0700</pubDate>
      <category>Python</category>
    </item>
    <item>
      <title>Re: problem with simple Cookie creation....???</title>
      <link>http://www.programmersheaven.com/mb/python/181199/181541/re-problem-with-simple-cookie-creation/#181541</link>
      <description>: Can you make websites with Python?!&lt;br /&gt;
: &lt;br /&gt;
: Id think that the regualr HTML &lt;br /&gt;
: &lt;pre class="sourcecode"&gt; Would be a lot better =P &lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Define "make websites with Python".  If you mean "can you write cgi scripts in Python" then the answer is, obviously, "yes".  You can also embed the Python interpreter into Apache, though I haven't been able to make that work beyond the trivial test script that comes with mod_python.  You can also create high-quality, interactive, dynamic websites using Zope and/or Plone which are both written in Python.  There are other programs too: Draco, CherryPy, Spyce, etc that all have something to do with "making websites with Python".&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;em&gt;&lt;span style="color: Blue;"&gt;&lt;span style="color: Red;"&gt;i&lt;/span&gt;nfidel&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/181199/181541/re-problem-with-simple-cookie-creation/#181541</guid>
      <pubDate>Mon, 07 Apr 2003 13:04:05 -0700</pubDate>
      <category>Python</category>
    </item>
    <item>
      <title>Re: problem with simple Cookie creation....???</title>
      <link>http://www.programmersheaven.com/mb/python/181199/181634/re-problem-with-simple-cookie-creation/#181634</link>
      <description>: Well, what did you do with the cookie once you created it?  If you don't include it in the http headers of a webpage, it will never be set anywhere.  Cookies are used for state management in web browsers.  You set them by including Set-Cookie directives in the http headers of a webpage, and the browser returns them when it requests that page again from the server.&lt;br /&gt;
: &lt;br /&gt;
: Here's a simple script I just wrote and dropped in my Apache server's cgi-bin:&lt;br /&gt;
: &lt;br /&gt;
: &lt;pre class="sourcecode"&gt;
: #!C:\Python22\python.exe
: 
: import Cookie, cgi, cgitb, os
: 
: cgitb.enable()
: 
: print 'Content-type: text/plain'
: 
: c = Cookie.SimpleCookie()
: c['username'] = 'bobjones'
: c['password'] = 'foobar'
: 
: print c
: 
: print # end of headers
: 
: for k, v in os.environ.items():
: 	print k, "=", v
: &lt;/pre&gt;&lt;br /&gt;
: &lt;br /&gt;
: The first time I viewed it, there was no HTTP_COOKIE variable in the results because the cookie wasn't set until I viewed the page.  Reloading the page, however, included the HTTP_COOKIE variable because my browser was then able to return it to the server.&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;span style="font-size: large;"&gt;&lt;em&gt;&lt;span style="color: Blue;"&gt;&lt;span style="color: Red;"&gt;i&lt;/span&gt;nfidel&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
what is "cgitb"&lt;br /&gt;
i used this script and try to run it&lt;br /&gt;
but it returns an import module error on the "cgitb"&lt;br /&gt;
&lt;br /&gt;
and what do u mean by "include the cookie in the http headers of a webpage"????&lt;br /&gt;
&lt;br /&gt;
is it just to create the cookie after printing "'Content-type: text/plain'" as the header?&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/181199/181634/re-problem-with-simple-cookie-creation/#181634</guid>
      <pubDate>Tue, 08 Apr 2003 01:35:24 -0700</pubDate>
      <category>Python</category>
    </item>
    <item>
      <title>Re: problem with simple Cookie creation....???</title>
      <link>http://www.programmersheaven.com/mb/python/181199/181638/re-problem-with-simple-cookie-creation/#181638</link>
      <description>Now I modified the code to see if the the Cookie C exist...&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------------------&lt;br /&gt;
C = Cookie.SimpleCookie() &lt;br /&gt;
C["username"] = tusername &lt;br /&gt;
C["validated"] = tvalidated &lt;br /&gt;
&lt;br /&gt;
print C  #just to see if the Cookie has been created...&lt;br /&gt;
&lt;br /&gt;
if os.environ.has_key("HTTP_COOKIE"): &lt;br /&gt;
cookie_exist = "yes, Cookie detected by HTTP" &lt;br /&gt;
else: &lt;br /&gt;
cookie_exist = "no, Cookie does not detected by HTTP" &lt;br /&gt;
&lt;br /&gt;
print cookie_exist &lt;br /&gt;
----------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
When I run the cgi in the browser, The result is:&lt;br /&gt;
Set-Cookie: username=john; Set-Cookie: validated=yes; no Cookie does not detected by HTTP&lt;br /&gt;
&lt;br /&gt;
so the Cookie exist by does not store in the os.environ......&lt;br /&gt;
whats wrong???&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/181199/181638/re-problem-with-simple-cookie-creation/#181638</guid>
      <pubDate>Tue, 08 Apr 2003 01:46:46 -0700</pubDate>
      <category>Python</category>
    </item>
    <item>
      <title>Re: problem with simple Cookie creation....???</title>
      <link>http://www.programmersheaven.com/mb/python/181199/181731/re-problem-with-simple-cookie-creation/#181731</link>
      <description>: Now I modified the code to see if the the Cookie C exist...&lt;br /&gt;
: &lt;br /&gt;
: -----------------------------------------------------------&lt;br /&gt;
: C = Cookie.SimpleCookie() &lt;br /&gt;
: C["username"] = tusername &lt;br /&gt;
: C["validated"] = tvalidated &lt;br /&gt;
: &lt;br /&gt;
: print C  #just to see if the Cookie has been created...&lt;br /&gt;
: &lt;br /&gt;
: if os.environ.has_key("HTTP_COOKIE"): &lt;br /&gt;
: cookie_exist = "yes, Cookie detected by HTTP" &lt;br /&gt;
: else: &lt;br /&gt;
: cookie_exist = "no, Cookie does not detected by HTTP" &lt;br /&gt;
: &lt;br /&gt;
: print cookie_exist &lt;br /&gt;
: ----------------------------------------------------------&lt;br /&gt;
: &lt;br /&gt;
: When I run the cgi in the browser, The result is:&lt;br /&gt;
: Set-Cookie: username=john; Set-Cookie: validated=yes; no Cookie does not detected by HTTP&lt;br /&gt;
: &lt;br /&gt;
: so the Cookie exist by does not store in the os.environ......&lt;br /&gt;
: whats wrong???&lt;br /&gt;
&lt;br /&gt;
There's nothing wrong.  Even though you've created a cookie object, it doesn't get set in the environment until it has been set in the browser so the browser can include it as part of the request.  Think of cookies as variables in the browser.  When the browser calls your script, the variables are not set yet.  Your script creates the variables and sends them back to the browser as part of the http text.  Now they are set in the browser.  The NEXT time that browser requests your script, it sends those variables back to the server as part of the request.  Only then will os.environ have an HTTP_COOKIE variable set.  See, os.environ is the environment of the server.  You have created a python object that wraps cookies, but you are not modifying the server environment.  You're just managing the values that you will send to the client.&lt;br /&gt;
&lt;br /&gt;
1.  Browser requests script from server&lt;br /&gt;
&lt;br /&gt;
2.  Server executes script and returns data, including cookie values, to browser&lt;br /&gt;
&lt;br /&gt;
3.  Browser loads html and sets cookies&lt;br /&gt;
&lt;br /&gt;
4.  Browser requests same script from server again and sends the cookie values&lt;br /&gt;
&lt;br /&gt;
5.  Server accepts request and sets HTTP_COOKIE to contain cookie values sent by browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;em&gt;&lt;span style="color: Blue;"&gt;&lt;span style="color: Red;"&gt;i&lt;/span&gt;nfidel&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/181199/181731/re-problem-with-simple-cookie-creation/#181731</guid>
      <pubDate>Tue, 08 Apr 2003 10:20:18 -0700</pubDate>
      <category>Python</category>
    </item>
    <item>
      <title>Re: problem with simple Cookie creation....???</title>
      <link>http://www.programmersheaven.com/mb/python/181199/181736/re-problem-with-simple-cookie-creation/#181736</link>
      <description>: : &lt;pre class="sourcecode"&gt;
: : #!C:\Python22\python.exe
: : 
: : import Cookie, cgi, cgitb, os
: : 
: : cgitb.enable()
: : 
: : print 'Content-type: text/plain'
: : 
: : c = Cookie.SimpleCookie()
: : c['username'] = 'bobjones'
: : c['password'] = 'foobar'
: : 
: : print c
: : 
: : print # end of headers
: : 
: : for k, v in os.environ.items():
: : 	print k, "=", v
: : &lt;/pre&gt;&lt;br /&gt;
: : &lt;br /&gt;
: : The first time I viewed it, there was no HTTP_COOKIE variable in the results because the cookie wasn't set until I viewed the page.  Reloading the page, however, included the HTTP_COOKIE variable because my browser was then able to return it to the server.&lt;br /&gt;
: : &lt;br /&gt;
: : &lt;br /&gt;
: : &lt;span style="font-size: large;"&gt;&lt;em&gt;&lt;span style="color: Blue;"&gt;&lt;span style="color: Red;"&gt;i&lt;/span&gt;nfidel&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;
: : &lt;br /&gt;
: &lt;br /&gt;
: what is "cgitb"&lt;br /&gt;
: i used this script and try to run it&lt;br /&gt;
: but it returns an import module error on the "cgitb"&lt;br /&gt;
: &lt;br /&gt;
: and what do u mean by "include the cookie in the http headers of a webpage"????&lt;br /&gt;
: &lt;br /&gt;
: is it just to create the cookie after printing "'Content-type: text/plain'" as the header?&lt;br /&gt;
&lt;br /&gt;
cgitb is a cgi traceback module.  It returns an html formatted error message to help with debugging.  If it won't import then you must have an older version of Python or that module is missing.  Just remove those commands from the script.&lt;br /&gt;
&lt;br /&gt;
HTTP data has information called headers that comes before the actual data.  The header is separated from the data by a blank line.  Basically, anything that comes before a blank line is treated by a web browser as a sort of metadata that tells the browser what to do with the data that follows.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
Content-type: text/html
Set-Cookie: username=john;

&amp;lt;html&amp;gt;
...
&amp;lt;/html&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;em&gt;&lt;span style="color: Blue;"&gt;&lt;span style="color: Red;"&gt;i&lt;/span&gt;nfidel&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/181199/181736/re-problem-with-simple-cookie-creation/#181736</guid>
      <pubDate>Tue, 08 Apr 2003 10:26:13 -0700</pubDate>
      <category>Python</category>
    </item>
    <item>
      <title>Re: problem with simple Cookie creation....???</title>
      <link>http://www.programmersheaven.com/mb/python/181199/181955/re-problem-with-simple-cookie-creation/#181955</link>
      <description>: : Can you make websites with Python?!&lt;br /&gt;
: : &lt;br /&gt;
: : Id think that the regualr HTML &lt;br /&gt;
: : &lt;pre class="sourcecode"&gt; Would be a lot better =P &lt;/pre&gt;&lt;br /&gt;
: &lt;br /&gt;
: Define "make websites with Python".  If you mean "can you write cgi scripts in Python" then the answer is, obviously, "yes".  You can also embed the Python interpreter into Apache, though I haven't been able to make that work beyond the trivial test script that comes with mod_python.  You can also create high-quality, interactive, dynamic websites using Zope and/or Plone which are both written in Python.  There are other programs too: Draco, CherryPy, Spyce, etc that all have something to do with "making websites with Python".&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;span style="font-size: large;"&gt;&lt;em&gt;&lt;span style="color: Blue;"&gt;&lt;span style="color: Red;"&gt;i&lt;/span&gt;nfidel&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
wow!! then thats awesome!!!  I can do the easy math things&lt;br /&gt;
&lt;pre class="sourcecode"&gt; a = 1 
b = 2
a + b = 3 &lt;/pre&gt; &lt;br /&gt;
&lt;br /&gt;
things like that =D tonight, when i get home, im at school again, im going to go through a lot of the tutorials, i tried to use Flash 5, to make a website, but it didnt work too well!!&lt;br /&gt;
&lt;br /&gt;
I will also get some of the add-ons, is&lt;br /&gt;
Python.org the place to get the add-ons for python?&lt;br /&gt;
&lt;br /&gt;
Also, a question about PH, how do i save my signature? hehe&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/181199/181955/re-problem-with-simple-cookie-creation/#181955</guid>
      <pubDate>Wed, 09 Apr 2003 08:19:56 -0700</pubDate>
      <category>Python</category>
    </item>
    <item>
      <title>Re: problem with simple Cookie creation....???</title>
      <link>http://www.programmersheaven.com/mb/python/181199/181988/re-problem-with-simple-cookie-creation/#181988</link>
      <description>: things like that =D tonight, when i get home, im at school again, im going to go through a lot of the tutorials, i tried to use Flash 5, to make a website, but it didnt work too well!!&lt;br /&gt;
&lt;br /&gt;
Well Flash is something totally different.  That is for making animations and fancy dynamic stuff like java applets.  Python doesn't do that.  You would use python to make a site like Programmer's Heaven or Plone.org.  No animations or anything, but message boards, mail, stuff like that.&lt;br /&gt;
&lt;br /&gt;
: I will also get some of the add-ons, is&lt;br /&gt;
: Python.org the place to get the add-ons for python?&lt;br /&gt;
&lt;br /&gt;
Python.org has links to many projects.  Also try SourceForge.net.  There's also the Vaults of Parnassus at &lt;a href="http://www.vex.net/parnassus/"&gt;http://www.vex.net/parnassus/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
: Also, a question about PH, how do i save my signature? hehe&lt;br /&gt;
&lt;br /&gt;
Click on the "My Settings" link in the blue "Members" box near the upper left.  Then click on the "Message Board Settings" link near the top.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;em&gt;&lt;span style="color: Blue;"&gt;&lt;span style="color: Red;"&gt;i&lt;/span&gt;nfidel&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/181199/181988/re-problem-with-simple-cookie-creation/#181988</guid>
      <pubDate>Wed, 09 Apr 2003 10:43:37 -0700</pubDate>
      <category>Python</category>
    </item>
    <item>
      <title>Re: problem with simple Cookie creation....???</title>
      <link>http://www.programmersheaven.com/mb/python/181199/184206/re-problem-with-simple-cookie-creation/#184206</link>
      <description>: : things like that =D tonight, when i get home, im at school again, im going to go through a lot of the tutorials, i tried to use Flash 5, to make a website, but it didnt work too well!!&lt;br /&gt;
: &lt;br /&gt;
: Well Flash is something totally different.  That is for making animations and fancy dynamic stuff like java applets.  Python doesn't do that.  You would use python to make a site like Programmer's Heaven or Plone.org.  No animations or anything, but message boards, mail, stuff like that.&lt;br /&gt;
: &lt;br /&gt;
: : I will also get some of the add-ons, is&lt;br /&gt;
: : Python.org the place to get the add-ons for python?&lt;br /&gt;
: &lt;br /&gt;
: Python.org has links to many projects.  Also try SourceForge.net.  There's also the Vaults of Parnassus at &lt;a href="http://www.vex.net/parnassus/"&gt;http://www.vex.net/parnassus/&lt;/a&gt;&lt;br /&gt;
: &lt;br /&gt;
: : Also, a question about PH, how do i save my signature? hehe&lt;br /&gt;
: &lt;br /&gt;
: Click on the "My Settings" link in the blue "Members" box near the upper left.  Then click on the "Message Board Settings" link near the top.&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;span style="font-size: large;"&gt;&lt;em&gt;&lt;span style="color: Blue;"&gt;&lt;span style="color: Red;"&gt;i&lt;/span&gt;nfidel&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
that plone.org is pretty cool....&lt;br /&gt;
&lt;br /&gt;
is iStormGames.com built the same way? thats my guild, i make some of the animations in flash for it...&lt;br /&gt;
&lt;br /&gt;
i wanna be able to make a msg board, and make a login database, i will try that one day =D&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;span style="color: Red;"&gt;  &lt;/span&gt;&lt;span style="color: Purple;"&gt;  &lt;/span&gt;&lt;span style="color: Green;"&gt;  &lt;/span&gt;&lt;span style="color: Blue;"&gt; k &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: xx-small;"&gt;&lt;span style="color: Red;"&gt;Pe&lt;/span&gt;&lt;span style="color: Green;"&gt;@&lt;/span&gt;&lt;span style="color: Blue;"&gt;cE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/181199/184206/re-problem-with-simple-cookie-creation/#184206</guid>
      <pubDate>Mon, 21 Apr 2003 08:15:11 -0700</pubDate>
      <category>Python</category>
    </item>
    <item>
      <title>Re: problem with simple Cookie creation....???</title>
      <link>http://www.programmersheaven.com/mb/python/181199/184276/re-problem-with-simple-cookie-creation/#184276</link>
      <description>: i wanna be able to make a msg board, and make a login database, i will try that one day =D&lt;br /&gt;
&lt;br /&gt;
Making a message board is easy.  Making a &lt;em&gt;good&lt;/em&gt; message board takes more than just programming skills.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;em&gt;&lt;span style="color: Blue;"&gt;&lt;span style="color: Red;"&gt;i&lt;/span&gt;nfidel&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/181199/184276/re-problem-with-simple-cookie-creation/#184276</guid>
      <pubDate>Mon, 21 Apr 2003 15:43:22 -0700</pubDate>
      <category>Python</category>
    </item>
    <item>
      <title>Re: problem with simple Cookie creation....???</title>
      <link>http://www.programmersheaven.com/mb/python/181199/210354/re-problem-with-simple-cookie-creation/#210354</link>
      <description>&lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by Moderator at 2003-9-3 8:12:54&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
hi guys,&lt;br /&gt;
I have read all the posting on this but am also having trouble with cookie reading (or setting??)...&lt;br /&gt;
This doesn't run, could someone explain to me why?&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
#! /usr/bin/python
import cgi
from Cookie import SimpleCookie

html="""
&amp;lt;html&amp;gt;&amp;lt;h3&amp;gt;test page &amp;lt;/h3&amp;gt;&amp;lt;/html&amp;gt;"""
c = SimpleCookie()
c["username"] = "me"

if os.environ.has_key("HTTP_COOKIE"):
    cookie_exist = "yes, Cookie detected by HTTP"
else:
    cookie_exist = "no, Cookie does not detected by HTTP"
    
print c
print "Content-type: text/html\n\n"
print c
print html
&lt;/pre&gt;&lt;br /&gt;
Thank you for your help,&lt;br /&gt;
nevle&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: Red;"&gt;the board doesn't understand html tags, you have to use square brackets&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/181199/210354/re-problem-with-simple-cookie-creation/#210354</guid>
      <pubDate>Tue, 02 Sep 2003 18:14:04 -0700</pubDate>
      <category>Python</category>
    </item>
    <item>
      <title>Re: problem with simple Cookie creation....???</title>
      <link>http://www.programmersheaven.com/mb/python/181199/210481/re-problem-with-simple-cookie-creation/#210481</link>
      <description>: &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by Moderator at 2003-9-3 8:12:54&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: hi guys,&lt;br /&gt;
: I have read all the posting on this but am also having trouble with cookie reading (or setting??)...&lt;br /&gt;
: This doesn't run, could someone explain to me why?&lt;br /&gt;
: &lt;pre class="sourcecode"&gt;
: #! /usr/bin/python
: import cgi
: from Cookie import SimpleCookie
: 
: html="""
: &amp;lt;html&amp;gt;&amp;lt;h3&amp;gt;test page &amp;lt;/h3&amp;gt;&amp;lt;/html&amp;gt;"""
: c = SimpleCookie()
: c["username"] = "me"
: 
: if os.environ.has_key("HTTP_COOKIE"):
:     cookie_exist = "yes, Cookie detected by HTTP"
: else:
:     cookie_exist = "no, Cookie does not detected by HTTP"
:     
: print c
: print "Content-type: text/html\n\n"
: print c
: print html
: &lt;/pre&gt;&lt;br /&gt;
: Thank you for your help,&lt;br /&gt;
: nevle&lt;br /&gt;
: &lt;br /&gt;
: &lt;span style="color: Red;"&gt;the board doesn't understand html tags, you have to use square brackets&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You didn't import "os".&lt;br /&gt;
&lt;br /&gt;
Try also adding this line to the top, it may help in debugging cgi scripts running in a webserver:&lt;br /&gt;
&lt;br /&gt;
import cgitb; cgitb.enable()&lt;br /&gt;
&lt;br /&gt;
Look up the cgi and cgitb modules in your documentation for advice about their use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;em&gt;&lt;span style="color: Blue;"&gt;&lt;span style="color: Red;"&gt;i&lt;/span&gt;nfidel&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/181199/210481/re-problem-with-simple-cookie-creation/#210481</guid>
      <pubDate>Wed, 03 Sep 2003 08:16:23 -0700</pubDate>
      <category>Python</category>
    </item>
  </channel>
</rss>