SFML community forums
Bindings - other languages => Python => Topic started by: nonexistent on October 25, 2009, 04:48:24 pm
-
I have a bit of code that draws a rectangle on the screen:
drawRect = Shape.Rectangle(rect.Left, rect.Top, rect.Right, rect.Bottom, Color.Green)
renderWindow.Draw(drawRect)
This works fine in Linux but crashes running under Windows (no error output in console before the program dies). This same behavior occurs on two of my team's computers (both Windows Vista). We are using Python3.0 and PySFML 1.5.
Is this a bug anyone has encountered before?
-
Well, lucky you!
sf.Shape doesn't exist for me ...
>>> from PySFML import sf
>>> sf.Shape
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Shape'
[/quote]
Maybe i missed something ... but what ?
Adema
P.S : under linux
-
nonexistent, can you provide a complete example?
adema, can you describe which steps you took to build and install PySFML?
-
Tank: I wrote a minimal example and that runs correctly for some reason. I guess it must have been some quirk with the previous project I was working on :?:
Oh well, guess things are fine now. I had hacked together a draw rectangle function to work around this earlier by drawing a resized blank sprite.