Author Topic: Python.  (Read 2304 times)

0 Members and 11 Guests are viewing this topic.

Offline RedGren8

  • NULL
  • Posts: 4
  • Cookies: 0
    • View Profile
Python.
« on: May 28, 2012, 05:32:59 pm »
Hi! I wanted to learn about Python but when I read some books about it I find it difficult to understand it. So can you show me the place where I can learn it? A place for dummies is good enough! ;D Thanks!

Offline pl0tuS

  • Knight
  • **
  • Posts: 320
  • Cookies: 22
    • View Profile
Re: Python.
« Reply #1 on: May 28, 2012, 05:40:53 pm »
which books did you read?


--Approved future mod :D --Factionwars

Offline RedGren8

  • NULL
  • Posts: 4
  • Cookies: 0
    • View Profile
Re: Python.
« Reply #2 on: May 28, 2012, 05:42:51 pm »
I read some Ebooks on the Internet and I also read "Byte Of Python"


Offline centizen

  • Peasant
  • *
  • Posts: 70
  • Cookies: 8
  • Certified Evil Genius
    • View Profile
Re: Python.
« Reply #3 on: May 28, 2012, 05:48:11 pm »
Check out Googles Python Classes:


http://code.google.com/edu/languages/google-python-class/


Especially, do the exercises in the first exercise pack, they are a good starting point. Post here if you get stuck and I will do what I can (but won't hold your hand fyi). Python is a great language and I think you will like it.


http://code.google.com/edu/languages/google-python-class/exercises/basic.html

Offline pl0tuS

  • Knight
  • **
  • Posts: 320
  • Cookies: 22
    • View Profile
Re: Python.
« Reply #4 on: May 28, 2012, 06:35:16 pm »
« Last Edit: May 28, 2012, 06:40:01 pm by pl0tuS »


--Approved future mod :D --Factionwars

Offline RedGren8

  • NULL
  • Posts: 4
  • Cookies: 0
    • View Profile
Re: Python.
« Reply #5 on: May 28, 2012, 06:39:44 pm »
I installed Python 3.2.3, I opened IDLE and write print "Hello, World!" then I clicked enter and it said Syntax error: invalid syntax. How can I fixed it?

Offline Deque

  • P.I.N.N.
  • Global Moderator
  • Overlord
  • *
  • Posts: 1203
  • Cookies: 518
  • Programmer, Malware Analyst
    • View Profile
Re: Python.
« Reply #6 on: May 28, 2012, 06:43:13 pm »
I installed Python 3.2.3, I opened IDLE and write print "Hello, World!" then I clicked enter and it said Syntax error: invalid syntax. How can I fixed it?

You have to decide if you want to learn Python 2 or Python 3. Your version of hello-world only works with Python 2.
« Last Edit: May 28, 2012, 06:44:44 pm by Deque »

Offline pl0tuS

  • Knight
  • **
  • Posts: 320
  • Cookies: 22
    • View Profile
Re: Python.
« Reply #7 on: May 28, 2012, 06:46:07 pm »
Yeah the documents I gave are for Python 2. I assumed you were talking about Python 2.

Python v3.2.3 documentation
« Last Edit: May 28, 2012, 06:51:20 pm by pl0tuS »


--Approved future mod :D --Factionwars

Offline Stackprotector

  • Administrator
  • Titan
  • *
  • Posts: 2515
  • Cookies: 205
    • View Profile
Re: Python.
« Reply #8 on: May 28, 2012, 08:03:41 pm »
print("Hello evilzone masters")
« Last Edit: May 28, 2012, 08:03:52 pm by Factionwars »
~Factionwars

Offline techb

  • Soy Sauce Feeler
  • Global Moderator
  • King
  • *
  • Posts: 2350
  • Cookies: 345
  • Aliens do in fact wear hats.
    • View Profile
    • github
Re: Python.
« Reply #9 on: May 28, 2012, 10:06:18 pm »
Honestly, I'd stick with Python 2.x because a lot of third party libs like PIL don't work with python3 yet. You can do most things in 2.x as in 3. Such as the print method. print("hello world") works in Python 2.x aswell.
>>>import this
-----------------------------

Offline RedGren8

  • NULL
  • Posts: 4
  • Cookies: 0
    • View Profile
Re: Python.
« Reply #10 on: May 29, 2012, 03:02:45 am »
So should I use Python 3 or Python 2?


Offline techb

  • Soy Sauce Feeler
  • Global Moderator
  • King
  • *
  • Posts: 2350
  • Cookies: 345
  • Aliens do in fact wear hats.
    • View Profile
    • github
Re: Python.
« Reply #11 on: May 29, 2012, 03:24:54 am »
I would go with 2.6 or 2.7
>>>import this
-----------------------------

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: Python.
« Reply #12 on: May 29, 2012, 09:47:30 am »
Moved to Python section...

Offline centizen

  • Peasant
  • *
  • Posts: 70
  • Cookies: 8
  • Certified Evil Genius
    • View Profile
Re: Python.
« Reply #13 on: May 29, 2012, 07:04:48 pm »
My recommend would be to go with 2.7, as it is compatible with almost all 3rd party libraries which is really where python becomes it's most useful. It's still under active development; so major updates in 3 are backported to 2.7. There's really no particular reason to go with three unless you want to work with straigh data bits instead of having everything encoded with unicode.


I use 2.7 and every other python professional I know does too

Offline flowjob

  • Knight
  • **
  • Posts: 327
  • Cookies: 46
  • Pastafarian
    • View Profile
Re: Python.
« Reply #14 on: May 29, 2012, 07:24:35 pm »
I agree with centizen,and additionally you will find much more tutorials and books about Python 2.x than about 3.x
And a lot more people know 2.x better,so you will find more help/answers than with 3.x
Quote
<phil> I'm gonna DDOS the washing machine with clothes packets.
<deviant_sheep> dont use too much soap or youll cause a bubble overflow