Python

Discussion in 'General Discussion' started by Matteo, Jan 12, 2014.

  1. Matteo

    Matteo New Member

    Joined:
    Jan 9, 2014
    Messages:
    10
    Likes Received:
    0
    How I create a new file in the IDLE Python editor please?
     
  2. Matteo

    Matteo New Member

    Joined:
    Jan 9, 2014
    Messages:
    10
    Likes Received:
    0
    On ubuntu?
     
  3. mkopack

    mkopack Member

    Joined:
    Jun 14, 2013
    Messages:
    451
    Likes Received:
    21
    File-New in the menu at the top of the screen...?
     
  4. Matteo

    Matteo New Member

    Joined:
    Jan 9, 2014
    Messages:
    10
    Likes Received:
    0
    There isn't new There are open terminal or open tab
     
  5. Matteo

    Matteo New Member

    Joined:
    Jan 9, 2014
    Messages:
    10
    Likes Received:
    0
    Yes mkopack
     
  6. mkopack

    mkopack Member

    Joined:
    Jun 14, 2013
    Messages:
    451
    Likes Received:
    21
    Ok, I think the issue here is that you're in the command line terminal, NOT in the IDLE IDE.

    IDLE is an application you'd have to launch (and I honestly don't remember if it is even installed on the system image by default.)

    Keep in mind that python is just a language. You can use whatever text editor (vi, emacs, etc.) you want to create a new python file, save it, and then run it from the command line by doing "python myfile" (where myfile is the name of your python file.)
     
  7. mkopack

    mkopack Member

    Joined:
    Jun 14, 2013
    Messages:
    451
    Likes Received:
    21
    IDLE is just a special text editor that is really useful for doing Python development that lets you run your python code directly from within the IDLE environment. You can do python with or without IDLE.

    Hope this helps.
     
  8. Matteo

    Matteo New Member

    Joined:
    Jan 9, 2014
    Messages:
    10
    Likes Received:
    0
    How i install idle?
     
  9. mkopack

    mkopack Member

    Joined:
    Jun 14, 2013
    Messages:
    451
    Likes Received:
    21
    I don't have the system in front of me to check this. So your best bet is to do the following:

    sudo apt-get update
    sudo apt-cache search idle (this will show you all the various packages that can be installed with the word IDLE in their name or description)

    Find the package that sounds like it's the IDLE application, I don't remember what it's called but it'll have IDLE in the name.

    then:

    sudo apt-get install (name of the package)


    Note - I'm pretty sure there's at least 2 different versions depending upon which version of Python you're using 2.x vs 3.x. Pick whichever one you want it to be.

    --Mike
     

Share This Page