Python programming

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

Post Reply
User avatar
Niualj
Posts: 6
Joined: November 23rd, 2015, 4:33 pm

Python programming

Post by Niualj »

I can programm with Python2/3 and a bit C++.
My question is, where i should go, to help programming Wesnoth?
I'am from Germany and new in this Forum, so please forgive me if i posted this on the wrong place.
User avatar
Pentarctagon
Project Manager
Posts: 5564
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Python programming

Post by Pentarctagon »

There's Easy Coding. You could also ask in the #wesnoth-dev channel on freenode.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
User avatar
Elvish_Hunter
Posts: 1575
Joined: September 4th, 2009, 2:39 pm
Location: Lintanir Forest...

Re: Python programming

Post by Elvish_Hunter »

Niualj wrote:I can programm with Python2/3 and a bit C++.
The fact that you know both Python 2 and 3 is certainly useful, as almost every Python tool need to be upgraded to Py3. This summer, I did it for wmllint, wmlscope and wmlindent.
The Python scripts can be found in the data/tools directory. In my opinion, the tools should work on Python 3.2 at least (this means no 3.3 / 3.4 / 3.5 specific stuff), as this is the version used by the oldest Ubuntu LTS currently supported, which is 12.04 - also, Python 3.5 doesn't work on Windows XP.
Pentarctagon wrote:You could also ask in the #wesnoth-dev channel on freenode.
You can, but don't expect an immediate answer. Since the channel is logged, many users read the logs and answer at a later time. You can get the logs here: http://www.wesnoth.org/irclogs/
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
User avatar
Niualj
Posts: 6
Joined: November 23rd, 2015, 4:33 pm

Re: Python programming

Post by Niualj »

So what i should heed, when i update one script?
If i write one script in Python3, can Wesnoth notice that and run it, even though it isn't anymore written in Python2?
My last Question: If i have updated a script, where i can publish it?

noch mal fals jemand mir die Fragen auf Deutsch beantworten kann:
Was muss ich beachten wenn ich solch ein Skript update?
Wenn ich das Skript in Python3 umschreibe, erkennt das Wesnoth automatisch?
Und außerdem, wo kann ich es veröffentlichen wenn ich es denn schaffe?
Weiß wirklich niemand eine Antwort darauf? Wen kann ich sonst fragen, der es besser weiß als die hier im Forum?
User avatar
Niualj
Posts: 6
Joined: November 23rd, 2015, 4:33 pm

Re: Python programming

Post by Niualj »

What is the Problem with my Question? Did i not written understandable enough?
User avatar
Elvish_Hunter
Posts: 1575
Joined: September 4th, 2009, 2:39 pm
Location: Lintanir Forest...

Re: Python programming

Post by Elvish_Hunter »

Niualj wrote:So what i should heed, when i update one script?
You can refer to Python's official documentation. The 3.0 release had a quite exhaustive page about what changed and what you need to do: https://docs.python.org/3.0/whatsnew/3.0.html
Niualj wrote:If i write one script in Python3, can Wesnoth notice that and run it, even though it isn't anymore written in Python2?
Wesnoth internally doesn't use any Python. If a user tries to run a Python 3 script in Python 2, he'll usually get a nice error message. That shouldn't be a problem, given that multiple Python interpreters can be installed in the same system.
Niualj wrote:My last Question: If i have updated a script, where i can publish it?
Our preferred way is to create a pull request on GitHub: you fork Wesnoth in your account, push the modifications there, and then generate a PR that we'll be able to review. If you can't do that, you can file a bug report at our bug tracker on Gna and attach the updated file there.
Niualj wrote:What is the Problem with my Question?
Simply said, I didn't notice the post. My bad :(
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
Post Reply