snippsat 661 Master Poster

but absolutelly no doubt that building web on PHP will be faster/easier,

That is of course a lot bullshit for someone that use Python.
I use Python for web development and don't like messy PHP.
PHP: a fractal of bad design

I wrote a little about Python and web here.
http://www.daniweb.com/software-development/python/threads/468399/learning-python

snippsat 661 Master Poster

No one can help if you dont give more info than this,should not be so hard to understand.
Here one with same error,he post where in code error come from and full traceback.
http://stackoverflow.com/questions/8164704/text-to-xml-in-python

snippsat 661 Master Poster

That's not the whole traceback.
Post whole traceback and code where traceback occur.

snippsat 661 Master Poster

Fix your indentations(4 space)
Python will not work with wrong indentations.
Shall look like this.

def __init__(self, image, x, y):
    self.image= image
    self.xPos=x
    self.yPos=y
    self.dir=1

If you dont know this,read some basic lesson before you try pygame.
Like byte og python

snippsat 661 Master Poster

Kind off help whit some clear messages.

>>> we_dot_do_homework_if_no_effort_is_shown = 2
>>> 1 % we_dot_do_homework_if_no_effort_is_shown
1
>>> 2 % we_dot_do_homework_if_no_effort_is_shown
0
>>> 3 % we_dot_do_homework_if_no_effort_is_shown
1
>>> 4 % we_dot_do_homework_if_no_effort_is_shown
0
>>> stupid = 3
>>> show_effort = 4
>>> if stupid % we_dot_do_homework_if_no_effort_is_shown == 1:
	print'Odd'
else:
	print 'even'

	
Odd
>>> if show_effort % we_dot_do_homework_if_no_effort_is_shown == 1:
	print'Odd'
else:
	print 'even'

	
even
>>>
snippsat 661 Master Poster

This code had been better without a class,and this is not the OOP way of thinking.
One function for Addition/Division....... can be shorten by eval()

>>> a = eval('5+8886/45*4554545')
>>> a
899370824.3333334

Here an example with class.

import math
class Calculator(object):
    '''Doc_string info about class'''
    def calculate(self, expression):
        self.value = eval(expression)

    def square(self, sqrt1):
        '''This look like a function,but inside a class is called a method'''
        self.b = math.sqrt(sqrt1)
        
    def __str__(self):
        return self.value
        return self.b

#here a make the method of class short
#and i do user_input and printing outside of the class(you can of course make a menu but not in the class)
a = Calculator()
print('Calculate +-*/ and Square Root')
b = input('values')
a.calculate(b)
print('The sum of %s is %d' % (b, a.value))

c = int(input('Enter Square Root value'))
a.square(c)
print('The square Root of %d is %d' % (c, a.b))

''' my output-->
Calculate +-*/ and Square Root
The sum of 45+78*4545/56 is 6375
The square Root of 25 is 5
'''
snippsat 661 Master Poster

There are several problem here.
Python 3.x only use input(raw_input only work for 2.x) = assign variable(can not use in = in a if statement. == Compares if the objects are equal

To get a integer to return you can do it like this.

number_of_courses = int(input ('Please enter...'))

This will not store variabls,so only last input will count.
Look at dictionary as woooee suggsest.

for number_of_courses in range (0, number_of_courses):
       major = raw_input('Enter class type') #cmsc, math, etc..
       coursenum = input('Enter course number')
snippsat 661 Master Poster

input is a method that is build in to python.
And you can not do this input.find

>>> input.find

Traceback (most recent call last):
  File "<pyshell#53>", line 1, in <module>
    input.find
AttributeError: 'builtin_function_or_method' object has no attribute 'find'

>>> input('your number: ')
your number: 5
5

And comparing app,app1 to 1 is always false.

>>> app == 1
False
>>>