Python Extensions?

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

intomo
Posts: 51
Joined: 22 Nov 2010, 21:21
Location: Los Angeles

Python Extensions?

Postby intomo » 16 Nov 2021, 03:53

I see in the new admin that I can choose between Java and Python to build extensions. Are there Python code examples, etc? Thanks in advance.
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Python Extensions?

Postby Lapo » 16 Nov 2021, 08:20

Hi,
it's always been there, since the beginning :)
Keep in mind Python is supported for testing / prototyping, not for production.

If you're familiar with how Jython works (the Java-based implementation of Python 2.x) you should be able to use it, There's an Extension example under SFS2X/extensions/pyTest that comes bundled with SFS2X.
This should give you an idea of how things work in Python. It essentially follows the same logic you would use in Java only with a Python syntax (an no need for recompilation after changes, of course). :)

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Malcolmtaify, Stevenor and 50 guests