Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - m_p_w

Pages: [1]
Python / Re: pySFML on linux how to make it work
« on: September 10, 2016, 05:40:49 am »
Actually only "from sfml import sf" is needed

Python / Re: Python bindings?
« on: September 10, 2016, 05:39:01 am »
By my understanding the author of PySFML used Cython.
Cython is extension of Python to interpret C/C++ code (Please, Correct me if I am wrong).

Python / sprite.setTextureRect(sf::IntRect(0,0,64,64)) in PySFML
« on: September 10, 2016, 05:35:33 am »
Guys, I wasn't able to find this in PySFML documentation.
What is PySFML version of sprite.setTextureRect(sf::IntRect(0,0,64,64)) ???

Python / Re: pySFML on linux how to make it work
« on: September 10, 2016, 12:14:30 am »
I managed to make it work!!!!!

import sfml as sf
from sfml import sf  # I added this line and it works 100% :D

window = sf.RenderWindow(sf.VideoMode(800, 600), "text example")

while window.is_open:
    for event in window.events:
        if type(event) is sf.CloseEvent:


Python / pySFML on linux how to make it work
« on: September 09, 2016, 06:39:18 pm »
This might be stupid question, but I am not sure what do to. Basically I have install sfml-dev (2.3.2) and later python-sfml(2.2) and cython(0.23.4) because by my understanding python-sfml is "not a pure python library. Rather, it is a set of extensions that provide a Pythonic API around a C++ library. As such, every PySFML object is really a wrapped C++ object which can be manipulated through Python methods".

Now I have wrote a small program (displaying a window) in python, but I get error 'module' object has no attribute 'RenderWindow'.

What am I doing wrong? I am sorry for asking :(

I know it might sound like I am clinically retarded, but normally after installing pygame, I didn't have to link anything when programming in python in geany IDE, but when it comes to SFML and G++, I had to link the SFML libraries. It is possible that I have to link somehow pySFML (if so, how to do it)?

Pages: [1]