May 24, 2019, 11:14:18 PM

Author Topic: Learning Python  (Read 829 times)

Offline Pfaber11

  • Full Member
  • ***
  • Posts: 181
Learning Python
« on: April 30, 2019, 02:13:49 PM »
As I posted elsewhere on this forum I have taken it on myself to try and learn Python . Well I'm 2 days in and am struggling a bit . wish they had some decent documentation like AGK2 . What I need is a list of all the key words and commands with examples of how to use them . I'm only on my second day and was hoping to at least by able to open a graphics window or any window for that matter . I'll post back here when I make some progress. installed another module for it  called pygame . It's a module for game programming  that's 3 I've got so far . If anybody has any advice on where to start it'd be most welcome . I've read a few tutorials and am watching videos on you tube.

Offline Derron

  • Hero Member
  • *****
  • Posts: 2087
Re: Learning Python
« Reply #1 on: April 30, 2019, 02:48:09 PM »
Python itself does not have that many "commands" you have to learn.

If you use libraries/modules then of course you need to learn their commands - and it depends on the module on how well they are documented.


bye
Ron

Offline MikeHart

  • Hero Member
  • *****
  • Posts: 571
  • Cerberus-X Dev Team
    • Cerberus X
Re: Learning Python
« Reply #2 on: April 30, 2019, 02:53:00 PM »
Regarding pygame.... it took me not even a minute to google for it, find its website. Top menu.. getting started. And there tutorials.

Offline MikeHart

  • Hero Member
  • *****
  • Posts: 571
  • Cerberus-X Dev Team
    • Cerberus X
Re: Learning Python
« Reply #3 on: April 30, 2019, 02:54:16 PM »
Btw. google for w3schools and python. The damn internet is full of tutorials.

Offline Pfaber11

  • Full Member
  • ***
  • Posts: 181
Re: Learning Python
« Reply #4 on: April 30, 2019, 03:04:01 PM »
yes just gotta get used to the coding style . found some good stuff about pygame to get me started . This oop stuff is taking some getting used to. I will not give up . what I could really do with is some printed out example code to get the ball rolling.

Offline MikeHart

  • Hero Member
  • *****
  • Posts: 571
  • Cerberus-X Dev Team
    • Cerberus X

Offline Pfaber11

  • Full Member
  • ***
  • Posts: 181
Re: Learning Python
« Reply #6 on: May 02, 2019, 09:41:03 AM »
Thanks MikeHart just downloaded the 4 python books in the bundle paid a dollar. not bad considering The AGK tutorials are 20 to 30 quid each. so far my python setup has only cost me a dollar. not bad really in fact it's awesome. gonna get some serious reading in today. the way I see it is if I don't get on with it by the 10th June I'll be downloading AGK studio so got over a month to try and get to grips with it. When I started with AGK2 it took a few months to find my feet so I'm going to be patient. Thanks and thumbs up on the books.

Offline Rick Nasher

  • Hero Member
  • *****
  • Posts: 684
Re: Learning Python
« Reply #7 on: May 03, 2019, 11:48:28 PM »
Perhaps this helps too:

https://projects.raspberrypi.org/en/codeclub

Then just follow the 3 python links and more if you have a Pi.

And as Mike suggested:
https://www.w3schools.com/python/default.asp

They are usually pretty good at showing all that's possible.

For keywords etc: https://www.w3schools.com/python/python_reference.asp
_______________________________________
 B3D + physics + shaders + X-platform = AGK!
:D ..ALIENBREED *LIVES* (thanks to Qube).. :D
_______________________________________

Offline Pfaber11

  • Full Member
  • ***
  • Posts: 181
Re: Learning Python
« Reply #8 on: May 04, 2019, 07:56:12 AM »
Don't have a pie but the link to the school seems pretty good. thanks.

Offline Krischan

  • Full Member
  • ***
  • Posts: 197
    • Krischan's Homepage
Re: Learning Python
« Reply #9 on: May 04, 2019, 05:04:26 PM »
Thanks for the books hint - I've just bought it too. I've never coded anything in Python until last week - I had to rewrite a Python script and so I got into it. It's a nice language but I've only scratched the surface yet.
Kind regards
Krischan

Windows 10 Pro | i7 9700K@ 3.6GHz | RTX 2080 8GB]
My Blitzbasic Archive | Extrasolar Project | My Github projects

Offline Pfaber11

  • Full Member
  • ***
  • Posts: 181
Re: Learning Python
« Reply #10 on: May 09, 2019, 12:47:58 PM »
Hey that's cool i've got a few lines down so far but that's about it . Installed pygame so will be taking a look at that soon .
I'm coming from AGK2 what is your main language before python ? I think it's gonna take months before I get  to grips with it but what the hell I've got the time  at the moment . I almost stopped after a few days but have got back on the wagon . The hardest thing is getting those first few lines down to start the ball rolling . Which I have now. We're off.

Offline Pfaber11

  • Full Member
  • ***
  • Posts: 181
Re: Learning Python
« Reply #11 on: May 09, 2019, 10:22:07 PM »
well I've been playing with python most of the evening and now know how to open a window using pygame. I am progressing slowly . trying to find a command the equivalent of sleep in AGK but am finding it hard at the moment . The documentation is very slow to use but I am getting there in small steps . according to what I have read using panda 3d is as fast as c++ . we'll see I suppose . sticking to pygame for now . Don't want to try and run before I can walk . Gonna try and write a simple ish game and see what I come up with . probably gonna take me a couple of months but should learn a bit from it . That's what I did with AGK and seems to be the way to do it . A way anyway. Bonjour

Offline Pfaber11

  • Full Member
  • ***
  • Posts: 181
Re: Learning Python
« Reply #12 on: May 10, 2019, 07:12:00 AM »
Well my task today will be to put some graphics on the screen , and maybe get them moving . onwards and upwards . I'll let you know how I get on once I've done it (if).

Offline Pfaber11

  • Full Member
  • ***
  • Posts: 181
Re: Learning Python
« Reply #13 on: May 10, 2019, 07:22:20 PM »
well I'm getting there got graphics working . Bought myself a notebook and a few pens and am making notes . Feeling much more confident I can do this now , The pieces of the puzzle are coming together and faster than I thought . The 16 months I spent learning AGK2 are really helping me now . I think I'm gonna like python after all. using pygame  at the moment but I think It only does 2d but also got panda3d for the 3d stuff but I'll concentrate on what I'm doing now to get me going then in a few weeks I should be ready to move onto the 3d side of it . I think I've put in about a week so far and am happy with my progress . So far I've spent 1 dollar on some e books and a quid on a notebook and some pens . would I recommend  python to anybody else  the truth is I don't know but I will in a couple of months . I'm hoping that the games I produce will be as good as the ones I've made with AGK2 and from the demo I've seen of panda3d I believe this is attainable. Have a nice evening I'm gonna take a quick look around on here then off to read a book on yes you guessed it python.

Offline Pfaber11

  • Full Member
  • ***
  • Posts: 181
Re: Learning Python
« Reply #14 on: May 10, 2019, 07:32:14 PM »
By the way guys thanks for all the links you guys have posted . This is the first time I've tried anything different to basic and I think it's sinking in now . Did have a problem converting my .py files to exe files . It does it then at the end says I don't have permissions at the end . Anybody know how I can resolve this . they run fine as .py files.