Learning python

General discussion for off-topic subjects.
User avatar
La Muerte
Administrator
Posts: 180
Joined: Sun Jul 15, 2012 1:48 pm
Location: Belgium
Contact:

Learning python

Postby La Muerte » Wed Mar 20, 2013 9:55 am

I've been trying to learn some of the basics of Python. For this I've resorted to http://www.codecademy.com/tracks/python

Whilst doing this I was wondering, what is the recommended software to use whilst coding in python? E.g. "IDE, Notepad++"?

Any other suggestions on how to learn Python?
I figured first learning to understand the basics and then digging into the Source.Python documentation would be a good order to get started :)
Omega_K2
Senior Member
Posts: 227
Joined: Sat Jul 07, 2012 3:05 am
Location: Europe
Contact:

Postby Omega_K2 » Wed Mar 20, 2013 10:47 am

I'd go with the offical tutorial, it's pretty good.
http://docs.python.org/3/tutorial/index.html

Also apply what you've learned, and it will stick around, just reading isn't very fruitful I think. Try to create small scripts to whatever you've learned and you can get used to the SP api along the way :P
Of course you can also do stuff outside of SP, missing around with py directly - can be useful things even like scripts to clean up folder, extract info from files/websites and other little things that can be helpful.
Libraries: k2tools
Plugins (any): GSRPG (soon) | Pretty Status List | MySQLAds (soon)
Plugins (game-specific): None atm

If you happen to find a bug or need help, either post in the release threads or contact me in IRC gamesurge.net:6667 / #sourcepython
User avatar
La Muerte
Administrator
Posts: 180
Joined: Sun Jul 15, 2012 1:48 pm
Location: Belgium
Contact:

Postby La Muerte » Wed Mar 20, 2013 11:40 am

Ok thanks, and what software is recommended? :)
User avatar
Ayuto
Project Leader
Posts: 2193
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Postby Ayuto » Wed Mar 20, 2013 11:47 am

I would recommend Notepad++ for writing code and Python 3.3 (since Source.Python uses 3.3) for testing Source Engine independent code.
Woody
Global Moderator
Posts: 42
Joined: Sat Jul 07, 2012 2:45 am
Location: California

Postby Woody » Wed Mar 20, 2013 3:02 pm

I would also recommend Notepad++.
User avatar
Mahi
Senior Member
Posts: 236
Joined: Wed Aug 29, 2012 8:39 pm
Location: Finland

Postby Mahi » Sun Mar 24, 2013 9:42 am

There's no reason to go with Notepad++, the IDLE text editor that comes with the official python is more than enough for creating python scripts. If you need more control over your coding (you don't...), use emacs or vi. However, they require some time to learn and the benefits in python are minuscule.

What comes to learning, I would recommend using youtube. While youtube videos might not include just as much information as some written tutorials, I find it much easier to learn from someone speaking while being able to see what he does on a video. This is if you're just a beginner in programming, if you can program in some other languages, just go with the official python tutorial.

ps. As Ayuto mentioned, you should go with Python 3.3. For youtube videos, I would recommend thenewboston's python tutorials.
User avatar
La Muerte
Administrator
Posts: 180
Joined: Sun Jul 15, 2012 1:48 pm
Location: Belgium
Contact:

Postby La Muerte » Sun Mar 24, 2013 11:40 am

Ah great, thanks I think that'll get me started decently :)
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Tue Mar 26, 2013 1:12 am

Mahi wrote:There's no reason to go with Notepad++, the IDLE text editor that comes with the official python is more than enough for creating python scripts.
I have to disagree with this. Using a proper text editor is a much better way to go. I personally use Notepad2, though I occasionally use Notepad++ and now use Eclipse for major projects (including developing Source.Python). IDLE is a good way to test your code, though, as it helps you to understand in real-time the changes you make and how they affect everything else.

As far as learning, I have to say I have "never" watched a Python youtube video. Not saying that they don't help, but I find practicing in IDLE and looking through other people's code really helps to understand and learn better than a video possibly could. Different people learn in different ways, though, I guess. I learned a lot by looking through EventScripts libraries and following the path of different methods to see exactly how everything works. As always, if you have specific questions, don't hesitate to ask. I'm still learning new things almost every single day, as well, so share any knowledge you run across with the rest of us.

The Source.Python Development team has already decided that we will try our best to always use the most up-to-date Python version available. Currently, that means Python3.3.

*Edit: after looking through several of the videos you linked to, I can without a doubt say they are quite bad. I tried to give them a chance, I really did, but he really seems to not understand "why" things are the way they are. It would be much better if he went into at least "some" detail on that, so that people would better understand.

Satoon
Woody
Global Moderator
Posts: 42
Joined: Sat Jul 07, 2012 2:45 am
Location: California

Postby Woody » Tue Mar 26, 2013 5:21 am

satoon101 wrote:I have to disagree with this. Using a proper text editor is a much better way to go. I personally use Notepad2, though I occasionally use Notepad++ and now use Eclipse for major projects (including developing Source.Python). IDLE is a good way to test your code, though, as it helps you to understand in real-time the changes you make and how they affect everything else.

As far as learning, I have to say I have "never" watched a Python youtube video. Not saying that they don't help, but I find practicing in IDLE and looking through other people's code really helps to understand and learn better than a video possibly could. Different people learn in different ways, though, I guess. I learned a lot by looking through EventScripts libraries and following the path of different methods to see exactly how everything works. As always, if you have specific questions, don't hesitate to ask. I'm still learning new things almost every single day, as well, so share any knowledge you run across with the rest of us.

The Source.Python Development team has already decided that we will try our best to always use the most up-to-date Python version available. Currently, that means Python3.3.

*Edit: after looking through several of the videos you linked to, I can without a doubt say they are quite bad. I tried to give them a chance, I really did, but he really seems to not understand "why" things are the way they are. It would be much better if he went into at least "some" detail on that, so that people would better understand.

Satoon


I would agree with satoon. Using a proper text editor is key especially since python is so sensitive in terms of indentations. I have my Notepad++ set up so it shows spaces/tabs.

Return to “Whatever”

Who is online

Users browsing this forum: No registered users and 9 guests