Author Topic: Linux python  (Read 4537 times)

0 Members and 2 Guests are viewing this topic.

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Linux python
« on: September 19, 2011, 12:56:06 am »
I have just decided to learn python with my father. So my question is:
what are the things that I have to do in order to get python to work on my linux computer?
Is there something that the computer allready comes with, or do you have to download something?
Note: the computer's OS is open suse 11.1... I am pretty sure.

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Linux python
« Reply #1 on: September 19, 2011, 01:25:58 am »
I'm 90% percent sure you already have Python.

Try typing in 'python' in your terminal, and see if it spasms.

If you don't have Python installed by default, just download a copy of Python from whatever repository you use or directly from Python's website.

The default IDE is called IDLE, and it works fine, but it looks like crap on Linux boxes, so you might want to consider getting a different IDE if that sort of thing bothers you (I like Geany, myself).


My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Linux python
« Reply #2 on: September 19, 2011, 09:38:09 am »
I have just decided to learn python with my father. So my question is:
what are the things that I have to do in order to get python to work on my linux computer?
Is there something that the computer allready comes with, or do you have to download something?
Note: the computer's OS is open suse 11.1... I am pretty sure.

OpenSUSE? You can install packages named "python" and "python-idle". "python2.6", "python2.7", etc should also be available.

The Python IDLE was not made for Linux, it was made with Windows in mind, because of its crappy console. On Linux, I recommend you just use the terminal, because it's very good.

To make a file use a text editor (vim, nano, emacs, gedit, geany, etc), and then to run the file use:

Code: [Select]
python name_of_file.py

Good luck!

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Linux python
« Reply #3 on: September 19, 2011, 10:03:29 am »
Hey, good luck. Most Linux distros come with Python pre-installed. I know Ubuntu does, and that's the only linux I've used, so yeah.
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Linux python
« Reply #4 on: September 19, 2011, 12:59:58 pm »
Hey, good luck. Most Linux distros come with Python pre-installed. I know Ubuntu does, and that's the only linux I've used, so yeah.

In fact, most of them *have to* because A LOT of programs use python and thus linux distros have python pre-installed for program compatibility, unlike *cough* Microsoft *cough*.

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: Linux python
« Reply #5 on: September 19, 2011, 03:34:54 pm »
Sweet, it does come with it installed... I just did it in the terminal.
But how do you execute the programs? I know that they are interpreted, but from where do you run them?
 ???

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Linux python
« Reply #6 on: September 19, 2011, 06:03:35 pm »
If you write a script named 'test.py', navigate using the terminal to the folder containing the file, then type in 'python test.py'.

My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline flyingfisch

  • I'm 1337 now!
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1620
  • Rating: +94/-17
  • Testing, testing, 1...2...3...4...5...6...7...8..9
    • View Profile
    • Top Page Website Design
Re: Linux python
« Reply #7 on: September 19, 2011, 06:11:29 pm »
If you want to know where you can learn python, here you go: http://www.khanacademy.org/#computer-science
« Last Edit: September 19, 2011, 06:11:49 pm by flyingfisch »



Quote from: my dad
"welcome to the world of computers, where everything seems to be based on random number generators"



The Game V. 2.0

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: Linux python
« Reply #8 on: September 19, 2011, 06:34:43 pm »
Awesome! thank you. now the real work begins... ;)

Offline flyingfisch

  • I'm 1337 now!
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1620
  • Rating: +94/-17
  • Testing, testing, 1...2...3...4...5...6...7...8..9
    • View Profile
    • Top Page Website Design
Re: Linux python
« Reply #9 on: September 19, 2011, 06:42:05 pm »
and you may want to use pyscripter: http://code.google.com/p/pyscripter/downloads/list

screenie:




Quote from: my dad
"welcome to the world of computers, where everything seems to be based on random number generators"



The Game V. 2.0

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Linux python
« Reply #10 on: September 25, 2011, 12:28:22 am »