Page 1 of 1

Learning python

Posted: Wed Mar 20, 2013 9:55 am
by La Muerte
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 :)

Posted: Wed Mar 20, 2013 10:47 am
by Omega_K2
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.

Posted: Wed Mar 20, 2013 11:40 am
by La Muerte
Ok thanks, and what software is recommended? :)

Posted: Wed Mar 20, 2013 11:47 am
by Ayuto
I would recommend Notepad++ for writing code and Python 3.3 (since Source.Python uses 3.3) for testing Source Engine independent code.

Posted: Wed Mar 20, 2013 3:02 pm
by Woody
I would also recommend Notepad++.

Posted: Sun Mar 24, 2013 9:42 am
by Mahi
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.

Posted: Sun Mar 24, 2013 11:40 am
by La Muerte
Ah great, thanks I think that'll get me started decently :)

Posted: Tue Mar 26, 2013 1:12 am
by satoon101
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

Posted: Tue Mar 26, 2013 5:21 am
by Woody
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.