<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>Python Feed - Programmer's Heaven</title>
    <link>http://www.programmersheaven.com/feed/Tag/1739/RSS.aspx</link>
    <description>Events at Programmer's Heaven related to Python.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 25 May 2013 20:43:52 -0700</pubDate>
    <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>
    <item>
      <title>Fatal Python error: GC object already tracked</title>
      <link>http://www.programmersheaven.com/mb/python/421039/421039/ReadMessage.aspx#421039</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/jadeite100/"&gt;jadeite100&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/python/421039/421039/ReadMessage.aspx#421039"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;Hi: &lt;br /&gt;
 &lt;br /&gt;
In the UT web site it says we're suppose to use Python 2.52: &lt;br /&gt;
&lt;a href="http://www.cdf.utoronto.ca/~csc148h/winter/python.shtml"&gt;http://www.cdf.utoronto.ca/~csc148h/winter/python.shtml&lt;/a&gt; &lt;br /&gt;
I am currently using Windows XP SP3 in my laptop. &lt;br /&gt;
 &lt;br /&gt;
When I ran the following code in my home computer I get the following exception after the highlighted line in yellow: &lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; import media &lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; f = media.choose_file() &lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; pic = media.load_picture(f) &lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Fatal Python error: GC object already tracked &lt;br /&gt;
 &lt;br /&gt;
This application has requested the Runtime to terminate it in an unusual way. &lt;br /&gt;
Please contact the application's support team for more information. &lt;br /&gt;
 &lt;br /&gt;
I checked the UT labs and they're using also Python 2.52. &lt;br /&gt;
I downloaded and install the following libraries: &lt;br /&gt;
 &lt;br /&gt;
?Python Imaging Library (PIL)  &lt;br /&gt;
?pygame  &lt;br /&gt;
?numpy  &lt;br /&gt;
?PyGraphics 2 &lt;br /&gt;
 &lt;br /&gt;
Am I missing something on my laptop to get the above error? How can I tell which software above is install? Maybe I am missing some software? &lt;br /&gt;
At the UT lab I was able to run the following successfully and see the picture: &lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; import media &lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; f = media.choose_file() &lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; pic = media.load_picture(f) &lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; medial.show(pic) &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
Has anybody managed to get the following code working in Windows XP SP3: &lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; import media &lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; f = media.choose_file() &lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; pic = media.load_picture(f) &lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; media.show(pic) &lt;br /&gt;
 &lt;br /&gt;
Yours, &lt;br /&gt;
 &lt;br /&gt;
Frustrated. &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/421039/421039/ReadMessage.aspx#421039</guid>
      <pubDate>Tue, 18 Jan 2011 11:19:23 -0700</pubDate>
    </item>
    <item>
      <title>Where to see the WingIde Output Console</title>
      <link>http://www.programmersheaven.com/mb/python/420926/420926/ReadMessage.aspx#420926</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/jadeite100/"&gt;jadeite100&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/python/420926/420926/ReadMessage.aspx#420926"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;Hi All: &lt;br /&gt;
 &lt;br /&gt;
Where do I see the output of the run in WingIde. Is there a view to see the console for the output result. &lt;br /&gt;
 &lt;br /&gt;
In dos-prompt: c:\test4&amp;gt;Pyton stylecheck.py stack.py I get the following output: &lt;br /&gt;
stack.py:32:31: W292 no newline at end of file. &lt;br /&gt;
 &lt;br /&gt;
I don't see this statement in WinIde. I believe it is related to the console: &lt;br /&gt;
 &lt;br /&gt;
stack.py:32:31: W292 no newline at end of file. &lt;br /&gt;
 &lt;br /&gt;
Any help or hint will be greatly appreciated it.&lt;br /&gt;
&lt;br /&gt;
Yours, &lt;br /&gt;
 &lt;br /&gt;
Frustrated.  &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/420926/420926/ReadMessage.aspx#420926</guid>
      <pubDate>Thu, 13 Jan 2011 23:54:11 -0700</pubDate>
    </item>
    <item>
      <title>How to set "Initial Directory"</title>
      <link>http://www.programmersheaven.com/mb/python/420925/420925/ReadMessage.aspx#420925</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/jadeite100/"&gt;jadeite100&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/python/420925/420925/ReadMessage.aspx#420925"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;Hi All:  &lt;br /&gt;
  &lt;br /&gt;
I am using WingIde 3.1.3 and Python 2.5.  &lt;br /&gt;
In the menu "Edit/Configure Python". For "Initial Directory" I used "Custom" and set to "c:\test4". I am using windows xp with sp3.  &lt;br /&gt;
I placed the stylecheck.py and stack.py files in c:\test4.  &lt;br /&gt;
I click on "Python Shell". I type "stylecheck" and click enter and get the following error:  &lt;br /&gt;
&amp;gt;&amp;gt; stylecheck  &lt;br /&gt;
Traceback (most recent call last):  &lt;br /&gt;
  File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;string&amp;gt;  &lt;br /&gt;
NameError: name 'stylecheck' is not defined  &lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt;   &lt;br /&gt;
  &lt;br /&gt;
How can I make the "Python shell" find my file "stylecheck.py"?  &lt;br /&gt;
Any help or hint will be greatly appreciated it.&lt;br /&gt;
&lt;br /&gt;
Yours,  &lt;br /&gt;
  &lt;br /&gt;
Frustrated.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/420925/420925/ReadMessage.aspx#420925</guid>
      <pubDate>Thu, 13 Jan 2011 23:53:04 -0700</pubDate>
    </item>
    <item>
      <title>Re: help choosing a language</title>
      <link>http://www.programmersheaven.com/mb/Linux/418626/418710/ReadMessage.aspx#418710</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Josh+Code/"&gt;Josh Code&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/Linux/418626/418710/ReadMessage.aspx#418710"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/Linux/Board.aspx"&gt;LINUX programming&lt;/a&gt; forum.&lt;/p&gt;Learn c.&lt;br /&gt;
&lt;br /&gt;
Lots of tutorials are available to help with the initial part of the learning curve.  &lt;br /&gt;
&lt;br /&gt;
It works in every platform there are compilers for.&lt;br /&gt;
&lt;br /&gt;
It is a general purpose language with the power to do everything a scripting language like Python and Perl can do and much more.  &lt;br /&gt;
&lt;br /&gt;
It is far more efficient, using less memory and far less processing resources/time to execute than scripting languages like Python and Perl.&lt;br /&gt;
&lt;br /&gt;
c is basically an ancestor to many modern programming languages which makes learning it a great first step to learning many other languages in popular use today.&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/418626/418710/ReadMessage.aspx#418710</guid>
      <pubDate>Tue, 14 Sep 2010 09:36:16 -0700</pubDate>
    </item>
    <item>
      <title>Re: import csv and then be able to add year revenue</title>
      <link>http://www.programmersheaven.com/mb/python/417789/418484/ReadMessage.aspx#418484</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/blemidon/"&gt;blemidon&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/python/417789/418484/ReadMessage.aspx#418484"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;You have to split the row:&lt;br /&gt;
&lt;br /&gt;
values = row.split('|')&lt;br /&gt;
&lt;br /&gt;
this create a tuple of the values:&lt;br /&gt;
&lt;br /&gt;
('2009', '1', '22', '56.23')&lt;br /&gt;
&lt;br /&gt;
You can then access the columns by&lt;br /&gt;
values[0] etc.&lt;br /&gt;
Be aware that this values are strs.&lt;br /&gt;
You need to convert them to float if you want to make a sum.&lt;br /&gt;
&lt;br /&gt;
v = float(values[3].strip())&lt;br /&gt;
&lt;br /&gt;
Here v will be 56.23&lt;br /&gt;
strip() removes whitespaces, just to be sure.&lt;br /&gt;
&lt;br /&gt;
Hope it helps:&lt;br /&gt;
Imre Horvath</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/417789/418484/ReadMessage.aspx#418484</guid>
      <pubDate>Sun, 29 Aug 2010 08:34:51 -0700</pubDate>
    </item>
    <item>
      <title>Re: Pyhton Basics.</title>
      <link>http://www.programmersheaven.com/mb/python/417774/418483/ReadMessage.aspx#418483</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/blemidon/"&gt;blemidon&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/python/417774/418483/ReadMessage.aspx#418483"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;There are some good books for beginners: e.g Learning Python and Programming Python&lt;br /&gt;
I think the best way is to start to write a program, and if you have difficulties, ask the forums.&lt;br /&gt;
(I've always write a CD/DVD catalog program in every programming language I have to learn:)&lt;br /&gt;
&lt;br /&gt;
Imre Horvath</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/417774/418483/ReadMessage.aspx#418483</guid>
      <pubDate>Sun, 29 Aug 2010 08:29:02 -0700</pubDate>
    </item>
    <item>
      <title>Re: how to convert .pyc files to .py files in python</title>
      <link>http://www.programmersheaven.com/mb/python/417262/417862/ReadMessage.aspx#417862</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/shatteredcode/"&gt;shatteredcode&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/python/417262/417862/ReadMessage.aspx#417862"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;Hello, &lt;br /&gt;
&lt;br /&gt;
2 things: &lt;br /&gt;
&lt;br /&gt;
1. Make sure the project that you have is OK with you changing their software, otherwise what you're doing is illegal.&lt;br /&gt;
&lt;br /&gt;
2. I found a couple of places where this could be done, but one is not free if the files are over 5kb.&lt;br /&gt;
&lt;br /&gt;
DePython is an online service which will do this, but only up to Python 2.5, and costs some money after 5kb.&lt;br /&gt;
&lt;a href="http://depython.net/"&gt;http://depython.net/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
UnPyc supports 2.6 as well, but some people say it doesn't work. I've never needed to use the tool, so I'm not sure.&lt;br /&gt;
&lt;br /&gt;
Hope it helped!&lt;br /&gt;
&lt;br /&gt;
-Rick</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/417262/417862/ReadMessage.aspx#417862</guid>
      <pubDate>Wed, 14 Jul 2010 06:08:49 -0700</pubDate>
    </item>
    <item>
      <title>MVC Website in Python</title>
      <link>http://www.programmersheaven.com/mb/python/417861/417861/ReadMessage.aspx#417861</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/shatteredcode/"&gt;shatteredcode&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/python/417861/417861/ReadMessage.aspx#417861"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;Hi All,&lt;br /&gt;
&lt;br /&gt;
I'd like to build a website in Python, and I'd like to use the popular "Model View Controller" design pattern while doing it. I was wondering if anyone knew of any books on doing such a thing in Python, or just information on that design pattern in general.&lt;br /&gt;
&lt;br /&gt;
Thanks for the help!&lt;br /&gt;
&lt;br /&gt;
-Rick</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/417861/417861/ReadMessage.aspx#417861</guid>
      <pubDate>Wed, 14 Jul 2010 06:01:59 -0700</pubDate>
    </item>
    <item>
      <title>Amazon SimpleDB Developer Guide</title>
      <link>http://www.programmersheaven.com/book/903-Amazon+SimpleDB+Developer+Guide/info.aspx</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Duanesm/"&gt;Duanesm&lt;/a&gt; submitted a new &lt;a href="http://www.programmersheaven.com/book/903-Amazon+SimpleDB+Developer+Guide/info.aspx"&gt;book&lt;/a&gt;.&lt;/p&gt;This book acts as a guide for developers to examine and review the Simple DB data model. It also provides an in-depth understanding of the Amazon SimpleDB database, with PHP, Java, and Python examples, and teaches to run optimized database-backed applications on Amazon's Web Services cloud.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/book/903-Amazon+SimpleDB+Developer+Guide/info.aspx</guid>
      <pubDate>Tue, 08 Jun 2010 23:24:02 -0700</pubDate>
    </item>
    <item>
      <title>Re: I seem to be missing a crucial piece here.</title>
      <link>http://www.programmersheaven.com/mb/python/416801/416846/ReadMessage.aspx#416846</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/blemidon/"&gt;blemidon&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/python/416801/416846/ReadMessage.aspx#416846"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;This post has been deleted.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/416801/416846/ReadMessage.aspx#416846</guid>
      <pubDate>Sun, 30 May 2010 02:24:50 -0700</pubDate>
    </item>
    <item>
      <title>Re: I seem to be missing a crucial piece here.</title>
      <link>http://www.programmersheaven.com/mb/python/416801/416823/ReadMessage.aspx#416823</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/blemidon/"&gt;blemidon&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/python/416801/416823/ReadMessage.aspx#416823"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;You can declare a variable with None value (It's the same as NULL in c), it means 'Nothing':&lt;br /&gt;
name = None&lt;br /&gt;
for tuples, dirs, arrays you can do this:&lt;br /&gt;
t = ()&lt;br /&gt;
d = {}&lt;br /&gt;
a = []&lt;br /&gt;
&lt;br /&gt;
If you want to change a global var from function, use global:&lt;br /&gt;
&lt;br /&gt;
name = None # it's empty, but declared&lt;br /&gt;
def getUsrName():&lt;br /&gt;
  global name&lt;br /&gt;
  name = 'someone'&lt;br /&gt;
&lt;br /&gt;
This changes the global name to 'someone'&lt;br /&gt;
&lt;br /&gt;
Hope this helps:&lt;br /&gt;
Imre Horvath&lt;br /&gt;
Regards: -blemidon-</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/416801/416823/ReadMessage.aspx#416823</guid>
      <pubDate>Sat, 29 May 2010 11:51:13 -0700</pubDate>
    </item>
    <item>
      <title>Function Variable</title>
      <link>http://www.programmersheaven.com/mb/python/404247/404247/ReadMessage.aspx#404247</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Garrett85/"&gt;Garrett85&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/python/404247/404247/ReadMessage.aspx#404247"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;In the follwoing program I am having trouble understanding this function.&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
def ask_yes_no(question):
    """Ask a yes or no question."""
    response = None
    while response not in ("y", "n"):
        response = raw_input(question).lower()
    return response&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Shouldn't question be response, or response be question? I know thought question was just a variable that held that date sent to the function.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;# Tic-Tac-Toe
# Plays the game of tic-tac-toe against a human opponent
   
# global constants
X = "X"
O = "O"
EMPTY = " "
TIE = "TIE"
NUM_SQUARES = 9


def display_instruct():
    """Display game instructions."""  
    print \
    """
    Welcome to the greatest intellectual challenge of all time: Tic-Tac-Toe.  
    This will be a showdown between your human brain and my silicon processor.  

    You will make your move known by entering a number, 0 - 8.  The number 
    will correspond to the board position as illustrated:
    
                    0 | 1 | 2
                    ---------
                    3 | 4 | 5
                    ---------
                    6 | 7 | 8

    Prepare yourself, human.  The ultimate battle is about to begin. \n
    """


def ask_yes_no(question):
    """Ask a yes or no question."""
    response = None
    while response not in ("y", "n"):
        response = raw_input(question).lower()
    return response


def ask_number(question, low, high):
    """Ask for a number within a range."""
    response = None
    while response not in range(low, high):
        response = int(raw_input(question))
    return response


def pieces():
    """Determine if player or computer goes first."""
    go_first = ask_yes_no("Do you require the first move? (y/n): ")
    if go_first == "y":
        print "\nThen take the first move.  You will need it."
        human = X
        computer = O
    else:
        print "\nYour bravery will be your undoing... I will go first."
        computer = X
        human = O
    return computer, human


def new_board():
    """Create new game board."""
    board = []
    for square in range(NUM_SQUARES):
        board.append(EMPTY)
    return board


def display_board(board):
    """Display game board on screen."""
    print "\n\t", board[0], "|", board[1], "|", board[2]
    print "\t", "---------"
    print "\t", board[3], "|", board[4], "|", board[5]
    print "\t", "---------"
    print "\t", board[6], "|", board[7], "|", board[8], "\n"


def legal_moves(board):
    """Create list of legal moves."""
    moves = []
    for square in range(NUM_SQUARES):
        if board[square] == EMPTY:
            moves.append(square)
    return moves


def winner(board):
    """Determine the game winner."""
    WAYS_TO_WIN = ((0, 1, 2),
                   (3, 4, 5),
                   (6, 7, 8),
                   (0, 3, 6),
                   (1, 4, 7),
                   (2, 5, 8),
                   (0, 4, 8),
                   (2, 4, 6))
    
    for row in WAYS_TO_WIN:
        if board[row[0]] == board[row[1]] == board[row[2]] != EMPTY:
            winner = board[row[0]]
            return winner

    if EMPTY not in board:
        return TIE

    return None


def human_move(board, human):
    """Get human move."""  
    legal = legal_moves(board)
    move = None
    while move not in legal:
        move = ask_number("Where will you move? (0 - 8):", 0, NUM_SQUARES)
        if move not in legal:
            print "\nThat square is already occupied, foolish human.  Choose another.\n"
    print "Fine..."
    return move


def computer_move(board, computer, human):
    """Make computer move."""
    # make a copy to work with since function will be changing list
    board = board[:]
    # the best positions to have, in order
    BEST_MOVES = (4, 0, 2, 6, 8, 1, 3, 5, 7)

    print "I shall take square number",
    
    # if computer can win, take that move
    for move in legal_moves(board):
        board[move] = computer
        if winner(board) == computer:
            print move
            return move
        # done checking this move, undo it
        board[move] = EMPTY
    
    # if human can win, block that move
    for move in legal_moves(board):
        board[move] = human
        if winner(board) == human:
            print move
            return move
        # done checkin this move, undo it
        board[move] = EMPTY

    # since no one can win on next move, pick best open square
    for move in BEST_MOVES:
        if move in legal_moves(board):
            print move
            return move


def next_turn(turn):
    """Switch turns."""
    if turn == X:
        return O
    else:
        return X

    
def congrat_winner(the_winner, computer, human):
    """Congratulate the winner."""
    if the_winner != TIE:
        print the_winner, "won!\n" 
    else:
        print "It's a tie!\n"

    if the_winner == computer:
        print "As I predicted, human, I am triumphant once more.  \n" \
              "Proof that computers are superior to humans in all regards."

    elif the_winner == human:
        print "No, no!  It cannot be!  Somehow you tricked me, human. \n" \
              "But never again!  I, the computer, so swears it!"

    elif the_winner == TIE:
        print "You were most lucky, human, and somehow managed to tie me.  \n" \
              "Celebrate today... for this is the best you will ever achieve."


def main():
    display_instruct()
    computer, human = pieces()
    turn = X
    board = new_board()
    display_board(board)

    while not winner(board):
        if turn == human:
            move = human_move(board, human)
            board[move] = human
        else:
            move = computer_move(board, computer, human)
            board[move] = computer
        display_board(board)
        turn = next_turn(turn)

    the_winner = winner(board)
    congrat_winner(the_winner, computer, human)


# start the program
main()
raw_input("\n\nPress the enter key to quit.")&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/404247/404247/ReadMessage.aspx#404247</guid>
      <pubDate>Sat, 10 Oct 2009 09:40:00 -0700</pubDate>
    </item>
    <item>
      <title>Re: Indexing Strings</title>
      <link>http://www.programmersheaven.com/mb/python/402203/403300/ReadMessage.aspx#403300</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Garrett85/"&gt;Garrett85&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/python/402203/403300/ReadMessage.aspx#403300"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;Thanks for the help. I really appreciate it.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/402203/403300/ReadMessage.aspx#403300</guid>
      <pubDate>Thu, 08 Oct 2009 23:28:23 -0700</pubDate>
    </item>
    <item>
      <title>Indexing Strings</title>
      <link>http://www.programmersheaven.com/mb/python/402203/402203/ReadMessage.aspx#402203</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Garrett85/"&gt;Garrett85&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/python/402203/402203/ReadMessage.aspx#402203"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;In the code below, the only part I'M having trouble with is word[position]. I know this is something really simple but I've always had trouble understanding these kinds of statements. I know that it print a random letter (position) from (word). What I don't know is why or how it does that. That's the part that never seems to get explained to me. How can you just put [] around part of a statement and everything just work right? Thanks.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
# Random Access
# Demonstrates string indexing

import random

word = "index"
print "The word is: ", word, "\n"

high = len(word)
low = -len(word)

for i in range(10):
    position = random.randrange(low, high)
    print "word[", position, "]\t", word[position]

raw_input("\n\nPress the enter key to exit.")&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/402203/402203/ReadMessage.aspx#402203</guid>
      <pubDate>Mon, 05 Oct 2009 23:16:04 -0700</pubDate>
    </item>
    <item>
      <title>String Indexing</title>
      <link>http://www.programmersheaven.com/mb/python/401898/401898/ReadMessage.aspx#401898</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Garrett85/"&gt;Garrett85&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/python/401898/401898/ReadMessage.aspx#401898"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;In the code below, the only part I'M having trouble with is word[position]. I know this is something really simple but I've always had trouble understanding these kinds of statements. I know that it print a random letter (position) from (word). What I don't know is &lt;strong&gt;why&lt;/strong&gt; or &lt;strong&gt;how&lt;/strong&gt; it does that. That's the part that never seems to get explained to me. How can you just put [] around part of a statement and everything just work right? Thanks.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;# Random Access
# Demonstrates string indexing

import random

word = "index"
print "The word is: ", word, "\n"

high = len(word)
low = -len(word)

for i in range(10):
    position = random.randrange(low, high)
    print "word[", position, "]\t", word[position]

raw_input("\n\nPress the enter key to exit.")&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/401898/401898/ReadMessage.aspx#401898</guid>
      <pubDate>Sat, 03 Oct 2009 12:35:08 -0700</pubDate>
    </item>
    <item>
      <title>Python IDEL</title>
      <link>http://www.programmersheaven.com/mb/python/400503/400503/ReadMessage.aspx#400503</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Garrett85/"&gt;Garrett85&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/python/400503/400503/ReadMessage.aspx#400503"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;Hey, I've just started with python and I'M using python's IDE, IDEL, &amp;amp; Wing IDE. When I read my book on python programming it shows the programs running in a traditional DOS type of window. But neither of my IDEs run my programs in this traditional form and I would prefer that. Can someone tell me what's up and how to fix it? Thanks.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/400503/400503/ReadMessage.aspx#400503</guid>
      <pubDate>Sat, 26 Sep 2009 16:37:12 -0700</pubDate>
    </item>
    <item>
      <title>Strings</title>
      <link>http://www.programmersheaven.com/mb/python/399583/399583/ReadMessage.aspx#399583</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Garrett85/"&gt;Garrett85&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/python/399583/399583/ReadMessage.aspx#399583"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;I can't find the error in the following code, can someone help me out please? I really don't like this python IDE, is there a better one I can use?&lt;br /&gt;
&lt;br /&gt;
Here is the error message I'M getting.&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
  File "&amp;lt;pyshell#14&amp;gt;", line 1, in -toplevel-&lt;br /&gt;
    + "\nBut what " + "you don't know," + " is that " + "it's one real" \&lt;br /&gt;
TypeError: bad operand type for unary +&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;# Silly Strings
# Demonstrates string concatenation and repetition


print "You can concatenate two " + "strings with the '+' operator." \

    + "\nBut what " + "you don't know," + " is that " + "it's one real" \
    + "l" + "y" + " long string, created from the concatenation " \
    + "of " + "thirty-two " + "different strings, broken across " \
    + "nice lines." + " Now you are" + " impressed?\n\n" + "See, " \
    + "even newlines can be embedded into a single string, making" \
    + " it look " + "as " + "if " + "it" + "'s " + "got " + "to " \
    + "be" + " multiple strings." + " Okay, now this " + "one " \
    + "long" + "string " + "is over!"

print \
"""
If you really like a string, you can repeat it. For example, who doesn't
like pie? That's right, nobody. But if you really like it, you should
say it liek you mean it:""",

print "Pie" * 10

print "\nNow that's good eating."

raw_input("\n\nPress the enter key to exit.")&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/399583/399583/ReadMessage.aspx#399583</guid>
      <pubDate>Wed, 23 Sep 2009 09:30:38 -0700</pubDate>
    </item>
    <item>
      <title>raw input("")</title>
      <link>http://www.programmersheaven.com/mb/python/398957/398957/ReadMessage.aspx#398957</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Garrett85/"&gt;Garrett85&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/python/398957/398957/ReadMessage.aspx#398957"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;I've just started a book on programming wit Python after getting very frustrated with C++ and C#. But I can't get this very simple program to compile, it says there is something wrong with "input"&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;# Game over
# Demonstrates the print command

print "Game Over"

raw input("\n\nPress Enter to exit.")&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Thanks for any and all reply's.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/398957/398957/ReadMessage.aspx#398957</guid>
      <pubDate>Mon, 21 Sep 2009 09:11:06 -0700</pubDate>
    </item>
    <item>
      <title>Leveraging industrial-strength Python testing</title>
      <link>http://www.programmersheaven.com/article/103097-Leveraging+industrial-strength+Python+testing/info.aspx</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Solrac/"&gt;Solrac&lt;/a&gt; submitted a new &lt;a href="http://www.programmersheaven.com/article/103097-Leveraging+industrial-strength+Python+testing/info.aspx"&gt;article&lt;/a&gt;.&lt;/p&gt;This article asks what the Python frameworks do when they introspect a test module to discover what tests live inside of it. It also looks at details like how common test setup and teardown is supported, or not supported, by Zope, py.test and nose. Learn how these testing frameworks will support your Python development.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/article/103097-Leveraging+industrial-strength+Python+testing/info.aspx</guid>
      <pubDate>Thu, 25 Jun 2009 10:48:58 -0700</pubDate>
    </item>
    <item>
      <title>Leveraging industrial-strength Python testing</title>
      <link>http://www.programmersheaven.com/article/103096-Leveraging+industrial-strength+Python+testing/info.aspx</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Solrac/"&gt;Solrac&lt;/a&gt; submitted a new &lt;a href="http://www.programmersheaven.com/article/103096-Leveraging+industrial-strength+Python+testing/info.aspx"&gt;article&lt;/a&gt;.&lt;/p&gt;This article asks what the Python frameworks do when they introspect a test module to discover what tests live inside of it. It also looks at details like how common test setup and teardown is supported, or not supported, by Zope, py.test and nose. Learn how these testing frameworks will support your Python development.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/article/103096-Leveraging+industrial-strength+Python+testing/info.aspx</guid>
      <pubDate>Thu, 25 Jun 2009 10:44:53 -0700</pubDate>
    </item>
    <item>
      <title>Re: Parsing something with regex</title>
      <link>http://www.programmersheaven.com/mb/python/392266/392514/ReadMessage.aspx#392514</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/ghostdog74/"&gt;ghostdog74&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/python/392266/392514/ReadMessage.aspx#392514"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;&lt;pre class="sourcecode"&gt;
portdata="""
Starting Nmap 4.76 ( &lt;a href="http://nmap.org"&gt;http://nmap.org&lt;/a&gt; ) at 2009-06-12 22:53 CDT
Interesting ports on jb-Laptop (127.0.0.1):
Not shown: 984 closed ports
PORT      STATE SERVICE
21/tcp    open  ftp
22/tcp    open  ssh
25/tcp    open  smtp
110/tcp   open  pop3
139/tcp   open  netbios-ssn
143/tcp   open  imap
445/tcp   open  microsoft-ds
465/tcp   open  smtps
587/tcp   open  submission
631/tcp   open  ipp
993/tcp   open  imaps
995/tcp   open  pop3s
2020/tcp  open  xinupageserver
5222/tcp  open  unknown
5900/tcp  open  vnc
10000/tcp open  snet-sensor-mgmt

Interesting ports on 192.168.0.1:
Not shown: 999 closed ports
PORT   STATE SERVICE
80/tcp open  http
MAC Address: 00:09:5B:AA:7E:1A (Netgear)

Nmap done: 2 IP addresses (2 hosts up) scanned in 4.35 seconds
"""
    
portdata=portdata.split("\n")
for items in portdata:
    if "/" in items and not "Starting" in items:
        print items        
&lt;/pre&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/392266/392514/ReadMessage.aspx#392514</guid>
      <pubDate>Thu, 18 Jun 2009 20:11:27 -0700</pubDate>
    </item>
    <item>
      <title>Parsing something with regex</title>
      <link>http://www.programmersheaven.com/mb/python/392266/392266/ReadMessage.aspx#392266</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/dbrandt/"&gt;dbrandt&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/python/392266/392266/ReadMessage.aspx#392266"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;I'm trying to parse some output of the program Nmap with regular expressions.&lt;br /&gt;
&lt;br /&gt;
From this output:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
Starting Nmap 4.76 ( &lt;a href="http://nmap.org"&gt;http://nmap.org&lt;/a&gt; ) at 2009-06-12 22:53 CDT
Interesting ports on jb-Laptop (127.0.0.1):
Not shown: 984 closed ports
PORT      STATE SERVICE
21/tcp    open  ftp
22/tcp    open  ssh
25/tcp    open  smtp
110/tcp   open  pop3
139/tcp   open  netbios-ssn
143/tcp   open  imap
445/tcp   open  microsoft-ds
465/tcp   open  smtps
587/tcp   open  submission
631/tcp   open  ipp
993/tcp   open  imaps
995/tcp   open  pop3s
2020/tcp  open  xinupageserver
5222/tcp  open  unknown
5900/tcp  open  vnc
10000/tcp open  snet-sensor-mgmt

Interesting ports on 192.168.0.1:
Not shown: 999 closed ports
PORT   STATE SERVICE
80/tcp open  http
MAC Address: 00:09:5B:AA:7E:1A (Netgear)

Nmap done: 2 IP addresses (2 hosts up) scanned in 4.35 seconds
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
...I'd like to get this:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
['21/tcp    open  ftp
22/tcp    open  ssh
25/tcp    open  smtp
110/tcp   open  pop3
139/tcp   open  netbios-ssn
143/tcp   open  imap
445/tcp   open  microsoft-ds
465/tcp   open  smtps
587/tcp   open  submission
631/tcp   open  ipp
993/tcp   open  imaps
995/tcp   open  pop3s
2020/tcp  open  xinupageserver
5222/tcp  open  unknown
5900/tcp  open  vnc
10000/tcp open  snet-sensor-mgmt',
'80/tcp open  http']
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Right now, I can do as follows:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
portdata = re.search("PORT\s+STATE\s+SERVICE.*\d/\S+\s+\S+\s+\S+", data, re.DOTALL)
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
This works when I'm getting the ports for just one host, but for more than one it won't match correctly.  Any htelp?&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/392266/392266/ReadMessage.aspx#392266</guid>
      <pubDate>Fri, 12 Jun 2009 20:55:56 -0700</pubDate>
    </item>
    <item>
      <title>Re: Parsing HTML with RegExp: could you help me?</title>
      <link>http://www.programmersheaven.com/mb/python/391720/392171/ReadMessage.aspx#392171</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/ghostdog74/"&gt;ghostdog74&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/python/391720/392171/ReadMessage.aspx#392171"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;check your regular expression. Compile it with re.DOTALL|re.MULTILINE</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/391720/392171/ReadMessage.aspx#392171</guid>
      <pubDate>Thu, 11 Jun 2009 02:00:47 -0700</pubDate>
    </item>
    <item>
      <title>More powerful Python testing techniques</title>
      <link>http://www.programmersheaven.com/article/102898-More+powerful+Python+testing+techniques/info.aspx</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Solrac/"&gt;Solrac&lt;/a&gt; submitted a new &lt;a href="http://www.programmersheaven.com/article/102898-More+powerful+Python+testing+techniques/info.aspx"&gt;article&lt;/a&gt;.&lt;/p&gt;Look at how the leading Python testing frameworks provide robust auto-discovery of your application tests. Make sure your applications are written right the first time, and that they stay working through months and years of further tweaks and improvements.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/article/102898-More+powerful+Python+testing+techniques/info.aspx</guid>
      <pubDate>Fri, 05 Jun 2009 09:18:28 -0700</pubDate>
    </item>
    <item>
      <title>Avoid common querying mistakes with better Django models</title>
      <link>http://www.programmersheaven.com/article/102808-Avoid+common+querying+mistakes+with+better+Django+models/info.aspx</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Solrac/"&gt;Solrac&lt;/a&gt; submitted a new &lt;a href="http://www.programmersheaven.com/article/102808-Avoid+common+querying+mistakes+with+better+Django+models/info.aspx"&gt;article&lt;/a&gt;.&lt;/p&gt;This article sheds light on some of the lesser-known features of the Django ORM in particular, but SQLAlchemy users may find some of the cautions about inefficient query generation applicable to their own code. Learn how to avoid common querying mistakes, use model managers to encapsulate complex queries, and take advantage of the powerful new aggregation features available in Django V1.1</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/article/102808-Avoid+common+querying+mistakes+with+better+Django+models/info.aspx</guid>
      <pubDate>Wed, 20 May 2009 14:07:05 -0700</pubDate>
    </item>
    <item>
      <title>Re: Wing IDE</title>
      <link>http://www.programmersheaven.com/mb/python/391083/391154/ReadMessage.aspx#391154</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/anthrax11/"&gt;anthrax11&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/python/391083/391154/ReadMessage.aspx#391154"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;You should give a bit more information, it's hard to say what the problem is.&lt;br /&gt;
&lt;br /&gt;
Firstly, you obviously need to make sure you have &lt;a href="http://python.org/"&gt;Python&lt;/a&gt; installed. If you do, then python programs should run with a double-click.&lt;br /&gt;
&lt;br /&gt;
Then check the syntax, Python 2.6 does not need parentheses around the parameter while the new Python 3 does ( print "Hello World!" vs. print ("Hello world!") )&lt;br /&gt;
&lt;br /&gt;
Next, check that you saved the file with the .py extension, not .txt or .py.txt or something like that.&lt;br /&gt;
&lt;br /&gt;
If you get a black box flashing by, then it probably works, but you're not waiting for a keypress. Add raw_input('Press Enter...') if that's the case.&lt;br /&gt;
&lt;br /&gt;
Running the program from the &lt;a href="http://www.bleepingcomputer.com/tutorials/tutorial76.html"&gt;command line&lt;/a&gt; will show you any syntax errors in your program.&lt;br /&gt;
&lt;br /&gt;
Have fun!</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/391083/391154/ReadMessage.aspx#391154</guid>
      <pubDate>Mon, 18 May 2009 07:41:17 -0700</pubDate>
    </item>
    <item>
      <title>Wing IDE</title>
      <link>http://www.programmersheaven.com/mb/python/391083/391083/ReadMessage.aspx#391083</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Garrett85/"&gt;Garrett85&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/python/391083/391083/ReadMessage.aspx#391083"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;I'M trying to learn Python and as you might expect, I start with "Hello World". But I can't get anything to happen. How do I execute and view the end result of my code?&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/391083/391083/ReadMessage.aspx#391083</guid>
      <pubDate>Sat, 16 May 2009 17:26:53 -0700</pubDate>
    </item>
    <item>
      <title>Industrial-strength Python testing frameworks</title>
      <link>http://www.programmersheaven.com/article/102741-Industrial-strength+Python+testing+frameworks/info.aspx</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Solrac/"&gt;Solrac&lt;/a&gt; submitted a new &lt;a href="http://www.programmersheaven.com/article/102741-Industrial-strength+Python+testing+frameworks/info.aspx"&gt;article&lt;/a&gt;.&lt;/p&gt;The recent emergence of industrial-strength Python testing frameworks means that Python tests are being written more succinctly, more uniformly, and with better reporting of results than ever before. Adopting one of the new generation of Python testing frameworks will provide concise idioms and uniform testing techniques that, in the past, every Python project had to supply for itself.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/article/102741-Industrial-strength+Python+testing+frameworks/info.aspx</guid>
      <pubDate>Fri, 08 May 2009 09:17:53 -0700</pubDate>
    </item>
    <item>
      <title>Why Python</title>
      <link>http://www.programmersheaven.com/mb/python/390502/390502/ReadMessage.aspx#390502</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Garrett85/"&gt;Garrett85&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/python/390502/390502/ReadMessage.aspx#390502"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;I've tried in the past to learn C++ and now C#. In both cases I get so far into it and then things just start getting to complicated. Would python be a better place to start? And if so, why? Also, most of the jobs I see in the local adds are for C++, Java, and PHP (.NET). Is there a job market for python programmers?&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/390502/390502/ReadMessage.aspx#390502</guid>
      <pubDate>Wed, 06 May 2009 10:11:10 -0700</pubDate>
    </item>
    <item>
      <title>Scaling Django web apps on Apache</title>
      <link>http://www.programmersheaven.com/article/102618-Scaling+Django+web+apps+on+Apache/info.aspx</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Solrac/"&gt;Solrac&lt;/a&gt; submitted a new &lt;a href="http://www.programmersheaven.com/article/102618-Scaling+Django+web+apps+on+Apache/info.aspx"&gt;article&lt;/a&gt;.&lt;/p&gt;Django is a lightweight framework with vibrant community surrounding it. Create a simple Django application and learn how to deploy it to the Web on a server running Apache and mod_python. Finally, learn how Django applications can and should be scaled as your application's requirements grow.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/article/102618-Scaling+Django+web+apps+on+Apache/info.aspx</guid>
      <pubDate>Thu, 09 Apr 2009 11:11:40 -0700</pubDate>
    </item>
    <item>
      <title>ChartDirector for Python 4.1</title>
      <link>http://www.programmersheaven.com/download/28380/download.aspx</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Peter+Kwan/"&gt;Peter Kwan&lt;/a&gt; submitted a new &lt;a href="http://www.programmersheaven.com/download/28380/download.aspx"&gt;file&lt;/a&gt;.&lt;/p&gt;ChartDirector is a fast and powerful charting component for creating professional and clickable charts. It's unique layering architecture enables you to synthesize the charts you want using standard chart layers. ChartDirector's comprehensive chart styles include pie, donut, bar, line, spline, step line, trend line, curve-fitting, inter-line filling, area, band, scatter, bubble, floating box, box-whisker, waterfall, contour, heat map, surface, vector, finance, gantt, radar, polar, rose, pyramid, cone, funnel, angular and linear meters and guages. ChartDirector charts are interactive with full suite of mouse events, supporting tool tips, clickable chart objects, and &amp;quot;drag to zoom&amp;quot; and &amp;quot;drag to scroll&amp;quot; features. AJAX enabled features allow charts to update without refreshing web pages. Easy to use and with comprehensive documentation. Come with numerous examples. Free trial available.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/download/28380/download.aspx</guid>
      <pubDate>Wed, 08 Apr 2009 11:27:36 -0700</pubDate>
    </item>
    <item>
      <title>ChartDirector for Python 4.1</title>
      <link>http://www.programmersheaven.com/download/28380/download.aspx</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Peter+Kwan/"&gt;Peter Kwan&lt;/a&gt; submitted a new &lt;a href="http://www.programmersheaven.com/download/28380/download.aspx"&gt;file&lt;/a&gt;.&lt;/p&gt;ChartDirector is a fast and powerful charting component for creating professional and clickable charts. It's unique layering architecture enables you to synthesize the charts you want using standard chart layers. ChartDirector's comprehensive chart styles include pie, donut, bar, line, spline, step line, trend line, curve-fitting, inter-line filling, area, band, scatter, bubble, floating box, box-whisker, waterfall, contour, heat map, surface, vector, finance, gantt, radar, polar, rose, pyramid, cone, funnel, angular and linear meters and guages. ChartDirector charts are interactive with full suite of mouse events, supporting tool tips, clickable chart objects, and &amp;quot;drag to zoom&amp;quot; and &amp;quot;drag to scroll&amp;quot; features. AJAX enabled features allow charts to update without refreshing web pages. Easy to use and with comprehensive documentation. Come with numerous examples. Free trial available.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/download/28380/download.aspx</guid>
      <pubDate>Wed, 08 Apr 2009 11:23:28 -0700</pubDate>
    </item>
    <item>
      <title>Extremely powerful and flexable Python Multiprocessing</title>
      <link>http://www.programmersheaven.com/article/102515-Extremely+powerful+and+flexable+Python+Multiprocessing/info.aspx</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Solrac/"&gt;Solrac&lt;/a&gt; submitted a new &lt;a href="http://www.programmersheaven.com/article/102515-Extremely+powerful+and+flexable+Python+Multiprocessing/info.aspx"&gt;article&lt;/a&gt;.&lt;/p&gt;Learn to scale your UNIX Python applications to multiple cores by using the multiprocessing module which is built into Python 2.6. Multiprocessing mimics parts of the threading API in Python to give the developer a high level of control over flocks of processes, but also incorporates many additional features unique to processes.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/article/102515-Extremely+powerful+and+flexable+Python+Multiprocessing/info.aspx</guid>
      <pubDate>Wed, 25 Mar 2009 10:07:19 -0700</pubDate>
    </item>
    <item>
      <title>Amazon cloud computing SimpleDB boto Python processing</title>
      <link>http://www.programmersheaven.com/article/101929-Amazon+cloud+computing+SimpleDB+boto+Python+processing/info.aspx</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Solrac/"&gt;Solrac&lt;/a&gt; submitted a new article called '&lt;a href="http://www.programmersheaven.com/article/101929-Amazon+cloud+computing+SimpleDB+boto+Python+processing/info.aspx"&gt;Amazon cloud computing SimpleDB boto Python processing&lt;/a&gt;'.&lt;/p&gt;Amazon SimpleDB (SDB) is a fast, scalable real-time dataset indexing and querying framework that makes it easy to store and retrieve structured data for Amazon Web Services-based applications in the cloud. In this article, learn some of the basic concepts of Amazon Cloud computing and check out some of the functions provided by the third-party open source Python library named boto. You will get familiar with Amazon Cloud computing and SDB by running small snippets of boto code in a Python shell.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/article/101929-Amazon+cloud+computing+SimpleDB+boto+Python+processing/info.aspx</guid>
      <pubDate>Thu, 12 Feb 2009 15:59:46 -0700</pubDate>
    </item>
    <item>
      <title>Eclipse DLTK IDE for Perl, Python, and PHP scripting</title>
      <link>http://www.programmersheaven.com/article/101805-Eclipse+DLTK+IDE+for+Perl,+Python,+and+PHP+scripting/info.aspx</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Solrac/"&gt;Solrac&lt;/a&gt; submitted a new article called '&lt;a href="http://www.programmersheaven.com/article/101805-Eclipse+DLTK+IDE+for+Perl%2c+Python%2c+and+PHP+scripting/info.aspx"&gt;Eclipse DLTK IDE for Perl, Python, and PHP scripting&lt;/a&gt;'.&lt;/p&gt;Eclipse presents a wealth of capabilities for building tools for compiled languages like C and the Java programming language, but provides little support for scripting languages like Perl, Python, and PHP. For these and similar languages, the Eclipse Dynamic Languages Toolkit (DLTK) comes to the rescue. This tutorial Walks you through the process of building a DLTK-based IDE and provides sample code for each step.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/article/101805-Eclipse+DLTK+IDE+for+Perl%2c+Python%2c+and+PHP+scripting/info.aspx</guid>
      <pubDate>Thu, 05 Feb 2009 10:15:20 -0700</pubDate>
    </item>
    <item>
      <title>All the Lightweight Web servers of the world</title>
      <link>http://www.programmersheaven.com/article/101722-All+the+Lightweight+Web+servers+of+the+world/info.aspx</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Solrac/"&gt;Solrac&lt;/a&gt; submitted a new article called '&lt;a href="http://www.programmersheaven.com/article/101722-All+the+Lightweight+Web+servers+of+the+world/info.aspx"&gt;All the Lightweight Web servers of the world&lt;/a&gt;'.&lt;/p&gt;There's far more to the world of Web servers than just Apache and IIS. While lightweight Web servers have much in common, there's also variation within the category. Most are written in C, but several other implementation languages have proven successful among the servers with which I've experimented, including Erlang, Java, Lisp, Lua, Perl, Python, and Tcl. If there's a language you favor, you can probably find a lightweight Web server here coded for your convenience. Survey the possibilities and see how they apply to you.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/article/101722-All+the+Lightweight+Web+servers+of+the+world/info.aspx</guid>
      <pubDate>Thu, 22 Jan 2009 19:10:09 -0700</pubDate>
    </item>
    <item>
      <title>Python 3 changes breaks backwards compatibility</title>
      <link>http://www.programmersheaven.com/article/101482-Python+3+changes+breaks+backwards+compatibility/info.aspx</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Solrac/"&gt;Solrac&lt;/a&gt; submitted a new article called '&lt;a href="http://www.programmersheaven.com/article/101482-Python+3+changes+breaks+backwards+compatibility/info.aspx"&gt;Python 3 changes breaks backwards compatibility&lt;/a&gt;'.&lt;/p&gt;Python 3 is the latest version of Guido van Rossum's powerful general-purpose programming language. Whether the Python community will accept version 3 is anyone's guess. The breaking of backwards compatibility will mean supporting two different versions in parallel. This article covers changes to input/output (I/O), the new bytes data type, changes to strings and string formatting, and finally, changes to the built-in dict type.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/article/101482-Python+3+changes+breaks+backwards+compatibility/info.aspx</guid>
      <pubDate>Mon, 22 Dec 2008 12:25:28 -0700</pubDate>
    </item>
    <item>
      <title>PythGuestbook v1.0</title>
      <link>http://www.programmersheaven.com/download/36210/download.aspx</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/jonathan_hdw/"&gt;jonathan_hdw&lt;/a&gt; submitted a new file called '&lt;a href="http://www.programmersheaven.com/download/36210/download.aspx"&gt;PythGuestbook v1.0&lt;/a&gt;'.&lt;/p&gt;Simple, customizable guestbook written in Python. This was one 
of my first &amp;quot;real&amp;quot; python scripts. enjoy.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/download/36210/download.aspx</guid>
      <pubDate>Thu, 04 Dec 2008 06:09:23 -0700</pubDate>
    </item>
    <item>
      <title>Re: I'm pretty new to Python and i'm havin troubles</title>
      <link>http://www.programmersheaven.com/mb/python/381322/382144/ReadMessage.aspx#382144</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/acerimusdux/"&gt;acerimusdux&lt;/a&gt; posted the message '&lt;a href="http://www.programmersheaven.com/mb/python/381322/382144/ReadMessage.aspx#382144"&gt;Re: I'm pretty new to Python and i'm havin troubles&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;: Ok I'm new to python since january.  i've read a intro book &lt;br /&gt;
: cover-to-cover and have written some code of my own, but i have a &lt;br /&gt;
: nerve-racking problem thats giving my a headache.  I can save a &lt;br /&gt;
: module just fine, but when i try to import it into another program &lt;br /&gt;
: it gives me a syntax error and highlights the middle "5" in the &lt;br /&gt;
: "Python 2.&lt;strong&gt;5&lt;/strong&gt;.5" at the top of the page.&lt;br /&gt;
: &lt;br /&gt;
: Please assist, what's going on and how can i fix it?&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
If it's highlighting a syntax error, it must be interpreting that line as code. If it isn't code, but a comment at the top of the page, you should check whether it's properly commented out. Does the line begin with "# "?&lt;br /&gt;
&lt;br /&gt;
(or, if you want to put a docstring there at the top of the file, enclose it in triple quotes)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/381322/382144/ReadMessage.aspx#382144</guid>
      <pubDate>Sat, 22 Nov 2008 12:40:23 -0700</pubDate>
    </item>
    <item>
      <title>Python: List tutorial</title>
      <link>http://www.programmersheaven.com/article/100713-Python:+List+tutorial/info.aspx</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/rui_acp/"&gt;rui_acp&lt;/a&gt; submitted a new article called '&lt;a href="http://www.programmersheaven.com/article/100713-Python%3a+List+tutorial/info.aspx"&gt;Python: List tutorial&lt;/a&gt;'.&lt;/p&gt;A simple and easy tutorial about list manipulation and usage in python with a quick reference to tuples.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/article/100713-Python%3a+List+tutorial/info.aspx</guid>
      <pubDate>Mon, 29 Sep 2008 05:55:46 -0700</pubDate>
    </item>
    <item>
      <title>Re: Programming tools</title>
      <link>http://www.programmersheaven.com/mb/windows/374834/374844/ReadMessage.aspx#374844</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/bradwang/"&gt;bradwang&lt;/a&gt; posted the message '&lt;a href="http://www.programmersheaven.com/mb/windows/374834/374844/ReadMessage.aspx#374844"&gt;Re: Programming tools&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/windows/Board.aspx"&gt;Windows programming&lt;/a&gt; forum.&lt;/p&gt;: Hi there, &lt;br /&gt;
: &lt;br /&gt;
: I have been doing a bit of programming in C# and PHP, as well as &lt;br /&gt;
: some Python and a wee bit of C++ in visual studio express. It's kind &lt;br /&gt;
: of nice and it does the trick, except that appearantly none of these &lt;br /&gt;
: allow me to produce regular *.exe files that can run on a Windows &lt;br /&gt;
: machine right there and then, without forcing the user to download &lt;br /&gt;
: .NET Framework, Java virtual machine, or a Python interpreter. &lt;br /&gt;
: &lt;br /&gt;
: So I am looking for freeware that would allow me to quickly develop &lt;br /&gt;
: and produce standalone Windows applications. I very much like Visual &lt;br /&gt;
: Studio (Express) but it doesn't generate standalone GUI apps. &lt;br /&gt;
: &lt;br /&gt;
: Could anyone recommend free compilers/IDEs/Languages I could use to &lt;br /&gt;
: quickly produce standalone GUI applications?&lt;br /&gt;
: &lt;br /&gt;
: I never developped desktop GUIs manually, so I would much prefer a &lt;br /&gt;
: WYSIWYG IDE like the one of Visual Studio.&lt;br /&gt;
: &lt;br /&gt;
: ALl suggestions are welcomed.&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I think then you'd probably use some old programming tools like Visual Basic or Delphi. They can help you build standalone windows GUI application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: Green;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;strong&gt;Brad Wang - .NET Freelancer from China&lt;br /&gt;
MSN: brad_wang_cn@hotmail.com&lt;br /&gt;
Skype: brad_wang&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/windows/374834/374844/ReadMessage.aspx#374844</guid>
      <pubDate>Wed, 03 Sep 2008 18:47:20 -0700</pubDate>
    </item>
    <item>
      <title>Free download Python ebooks</title>
      <link>http://www.programmersheaven.com/mb/python/374654/374654/ReadMessage.aspx#374654</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/jmaneesh/"&gt;jmaneesh&lt;/a&gt; posted the message '&lt;a href="http://www.programmersheaven.com/mb/python/374654/374654/ReadMessage.aspx#374654"&gt;Free download Python ebooks&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;Dear Friends,&lt;br /&gt;
&lt;br /&gt;
You are free to download Python ebooks.&lt;br /&gt;
&lt;br /&gt;
apart from that AJAX, ASP.NET, VB.NET, SQL Server, PHP, JAVA, software, oracle, Unix, Google Adsense, Linus, SAP, Pearl and much more ebooks also available.&lt;br /&gt;
&lt;br /&gt;
Download from &lt;br /&gt;
&lt;a href="http://freedownload12.blogspot.com/"&gt;http://freedownload12.blogspot.com/&lt;/a&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/374654/374654/ReadMessage.aspx#374654</guid>
      <pubDate>Fri, 29 Aug 2008 23:48:50 -0700</pubDate>
    </item>
    <item>
      <title>Re: Why doesn't the loop work?</title>
      <link>http://www.programmersheaven.com/mb/python/373147/374505/ReadMessage.aspx#374505</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Gabe/"&gt;Gabe&lt;/a&gt; posted the message '&lt;a href="http://www.programmersheaven.com/mb/python/373147/374505/ReadMessage.aspx#374505"&gt;Re: Why doesn't the loop work?&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;&lt;strong&gt;IndexError&lt;/strong&gt; is a class whose instance is raised as an exception if an invalid index is used on a sequence, therefore it cannot be false as a logical expression.  Use &lt;strong&gt;try&lt;/strong&gt; and &lt;strong&gt;except&lt;/strong&gt; instead:&lt;br /&gt;
&lt;pre class="sourcecode"&gt; 
#Finds out what numbers are prime.
primes = [2,3,5,7,11,13,17,19,23]
finish = int(raw_input("What number would you like to check to? "))
start = 24
while start &amp;gt;= finish:
    x = 0
    &lt;span style="color: Red;"&gt;try:&lt;/span&gt;
        while start % primes[x] != 0:
           x = x + 1
    &lt;span style="color: Red;"&gt;except IndexError:&lt;/span&gt;
        primes.append(start)
    start = start + 1
print primes
&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/373147/374505/ReadMessage.aspx#374505</guid>
      <pubDate>Mon, 25 Aug 2008 15:20:04 -0700</pubDate>
    </item>
    <item>
      <title>EMV Common Perso. Specification</title>
      <link>http://www.programmersheaven.com/mb/python/373259/373259/ReadMessage.aspx#373259</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/benosas/"&gt;benosas&lt;/a&gt; posted the message '&lt;a href="http://www.programmersheaven.com/mb/python/373259/373259/ReadMessage.aspx#373259"&gt;EMV Common Perso. Specification&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;Hello,&lt;br /&gt;
&lt;br /&gt;
I work in a smart card peronalization company. I am trying to convert character-delimited data to EMV CPS using python. Does anyone know how to go about doing this? I would appreciate any help. Thanks a lot.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/373259/373259/ReadMessage.aspx#373259</guid>
      <pubDate>Wed, 09 Jul 2008 01:42:26 -0700</pubDate>
    </item>
    <item>
      <title>Why doesn't the loop work?</title>
      <link>http://www.programmersheaven.com/mb/python/373147/373147/ReadMessage.aspx#373147</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/falcon3166/"&gt;falcon3166&lt;/a&gt; posted the message '&lt;a href="http://www.programmersheaven.com/mb/python/373147/373147/ReadMessage.aspx#373147"&gt;Why doesn't the loop work?&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;Why doesn't the loop in the following code work?&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
#Finds out what numbers are prime.
primes = [2,3,5,7,11,13,17,19,23]
finish = int(raw_input("What number would you like to check to? "))
start = 24
while start &amp;gt;= finish:
    x = 0
    while start % primes[x] != 0:
        if IndexError:
            break
        else:
            x = x + 1
    else:
        primes.append[start]
    start = start + 1
print primes
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
When run, it just prints out the default set of primes after taking the number you want the program to check up to.&lt;br /&gt;
Swat spam before it fills your inbox!</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/373147/373147/ReadMessage.aspx#373147</guid>
      <pubDate>Fri, 04 Jul 2008 16:22:37 -0700</pubDate>
    </item>
    <item>
      <title>Help with dir()</title>
      <link>http://www.programmersheaven.com/mb/python/373055/373055/ReadMessage.aspx#373055</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Navic/"&gt;Navic&lt;/a&gt; posted the message '&lt;a href="http://www.programmersheaven.com/mb/python/373055/373055/ReadMessage.aspx#373055"&gt;Help with dir()&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/python/Board.aspx"&gt;Python&lt;/a&gt; forum.&lt;/p&gt;I'm new to Python and have the Python Reference Manual Release 2.5.2 as my only guide so far, but here's my problem:&lt;br /&gt;
&lt;br /&gt;
I've got a custom class 'Foo' with two functions - 'hello' and 'goodbye' that just print a string.&lt;br /&gt;
&lt;br /&gt;
I'm assigning the output of the dir() function to a variable and want to then perform a dir() on each index value of the first variable and Python doesn't like it.  Here's what I've got:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
a = dir()
print dir(a[0])
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
When I execute this the output is the generic classes and does not include the functions of my custom Foo class at all.  Now when I forget about assigning the output of the dir() to an array and just hard code dir(Foo) it works fine, returning my two functions.  I've noticed that the problem is related to the compiler reading it as a string or a 'literal' I guess it's called, because the output of these two commands is completely different:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
dir(Foo)
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
dir('Foo')
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
The first output without the quotes being the one I'm trying to get by an array variable of the entire generic dir() function alone.&lt;br /&gt;
&lt;br /&gt;
I've printed out the array for testing purposes and sure enough, index 0 is Foo so it should in theory work.&lt;br /&gt;
&lt;br /&gt;
Is there some kind of pickle method or function I need to perform to make dir(a[0]) work???&lt;br /&gt;
&lt;br /&gt;
Thanks!&lt;br /&gt;
Navic</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/python/373055/373055/ReadMessage.aspx#373055</guid>
      <pubDate>Tue, 01 Jul 2008 01:00:39 -0700</pubDate>
    </item>
  </channel>
</rss>