Results 1 to 4 of 4

Thread: Python Lesson 1 Question

  1. #1
    Join Date
    Dec 2008
    Location
    Belgium
    Beans
    Hidden!

    Python Lesson 1 Question

    Hi all,
    I wanted to start to learn how to program in Python when I saw it in Full Circle Magazine(ISSUE27)

    But I don't get the line:

    Before we
    can run the program, we need
    to set it to be executable. Do
    this by typing
    chmod +x hello.py
    in the folder where you saved
    your python file. Now let's run
    the program.
    screenshot of the page (http://img171.imageshack.us/img171/5056/python1.jpg)

    does anyone know?


    (and yeh this is like really basic but i just want to learn some programming (or something)...)

  2. #2
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Python Lesson 1 Question

    To run the file as a program you have to make it executable.

    you can do this to see what chmod is.:
    man chmod

    and to see read, write and execute permissions of files.
    ls -l

    You can also run it

    python hello.py
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  3. #3
    Join Date
    Dec 2008
    Location
    Belgium
    Beans
    Hidden!

    Re: Python Lesson 1 Question

    Yay i got it executed!

    All i got was


    Hello. I am a python program.
    What is your name?
    I type my name press enter and nothing

    so not good yet
    but atleast i know how to execute! (atleast if it has to open in a therminal? )
    Last edited by WannabeFantasma; February 16th, 2010 at 11:36 PM.

  4. #4
    Join Date
    May 2008
    Location
    UK
    Beans
    1,451
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Python Lesson 1 Question

    You might find this would be answered in Programming Talk - although, which tends to be very good for general programming questions
    Tony - Happy to try to help.
    Unless otherwise stated - all code posted by me is untested. Remember to Mark the Thread as Solved.
    Ubuntu user number # 24044 Projects : TimeWarp - on the fly Backups

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •