Skip to main content
GameDev.net gamedev.net
🔒 Locked

Python Compile Error with Pygame

Started by Infinite_Daremo Aug 23, 2008 at 4:25 PM 2 replies 2.2k views
Original Post
Infinite_Daremo
Infinite_Daremo
Im using IronPythonStudio to attempt the following failure and im also using Pygame. Heres the error thats being thrown:
'PythonGame.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll'
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
'PythonGame.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_64\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll'
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
'PythonGame.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'IronPython.Runtime.Exceptions.PythonImportErrorException' occurred in IronPython.dll


I just made a console app and quickly added the following:
import os, sys
import pygame
from pygame.locals import *

pygame.init()

My_Window = pygame.display.set_mode((640, 480))


The jump from C++ to this has been a big slap in the face the syntax is nice but i cant seem to find any user friendly applications for it. Any help would be appreciated. Im not even sure if this is linked properly or anything its telling me theres no module named pygame. Can someone run me through a setup for this? Thanks. [Edited by - Infinite_Daremo on August 23, 2008 4:51:34 PM]
Oluseyi
Oluseyi
Use CPython for PyGame. IronPython is built for the .NET runtime, whereas PyGame is built (under Windows, via SDL) for Win32 access, and they don't play together nicely.
Infinite_Daremo
Infinite_Daremo
I found that here http://www.voidspace.org.uk/ironpython/cpython_extensions.shtml#download

and downloaded cext 0.1.4 but this line is throwing an error:

import clr
clr.AddReference('Python.Runtime')

with the following: Could not add reference to assembly Python.Runtime

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.