Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Jul 12th, 2005, 11:21 AM   #1
Flinch
Newbie
 
Join Date: Jul 2005
Posts: 1
Rep Power: 0 Flinch is on a distinguished road
Python and Pygame

Well, I am a newb when it comes to Python, but not programming in general. I am an experienced PHP programmer, but that's off-topic. Anyway, I downloaded Python v2.3 and Pygame v1.6 for Python 2.3 and installed both; Python to Program Files\Python23 and Pygame to Program Files\Python23\Lib\site-packages. Now, to my bleak understanding, to use a module in Python, you use Import. So, I do this:

import pygame

Now, when I try to do anythin with that module I get errors:

>>>pygame.init()
Traceback (most recent call last):
  File "<pyshell#6>", line 1, in -toplevel-
    pygame.init()
AttributeError: 'module' object has no attribute 'init'

I have read all of the intro articles at pygame.org on how to install and get it working, and they all say to just use import. I know it's importing pygame because when I print pygame it tells me the directory of the installed module.

>>>print pygame
<module 'pygame' from 'C:\Program Files\Python23\lib\pygame.pyc'>

I would really appreciate any help at all.
Flinch is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:48 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC