SFML community forums

Bindings - other languages => Python => Topic started by: nonexistent on October 25, 2009, 04:48:24 pm

Title: Drawing Shape.Rectangle crashes on Windows
Post by: nonexistent on October 25, 2009, 04:48:24 pm
I have a bit of code that draws a rectangle on the screen:

Code: [Select]
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?
Title: Drawing Shape.Rectangle crashes on Windows
Post by: adema on February 24, 2010, 01:42:16 am
Well, lucky you!
sf.Shape doesn't exist for me ...
Code: [Select]

>>> 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
Title: Drawing Shape.Rectangle crashes on Windows
Post by: Tank on February 26, 2010, 10:04:38 am
nonexistent, can you provide a complete example?

adema, can you describe which steps you took to build and install PySFML?
Title: Drawing Shape.Rectangle crashes on Windows
Post by: nonexistent on March 09, 2010, 10:27:50 pm
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.