Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Running Python From the terminal in OS.X 10.4 Tiger

  • 20-12-2007 7:05pm
    #1
    Registered Users, Registered Users 2 Posts: 945 ✭✭✭


    Has anyone any experience with programming in Python on Mac OS.X 10.4 from the command line? I'm trying to teach myself Python and would appreciate knowing if I'm choosing a way that has many known and avoidable complications (weird error messages from the terminal or anything).

    I ask because from what I've read (I'm following this guide here - http://diveintopython.org/installing_python/macosx.html ) "On Mac OS X, you have two choices for installing Python: install it, or don't install it. You probably want to install it." (I've a copy of O'Reilly's Introducing Python out of the library too but since its from 1999 its not exactly giving me the latest install information)

    The linked resources are for Panther (v10.2, I think).

    Since I've only been using OS X for a few months and have never learned a programming language before I'd appreciate any advice.

    Note: I understand that this may seem to be a of programmer's board post, but I posted it here as I think its more about doing the best way of installing / running something in OS X than it is about the ins and outs of a programming language. Still, I won't argue if its moved.


Comments

  • Closed Accounts Posts: 636 ✭✭✭conor2007


    sorry cant help
    i have had problems installing in perl - it takes a lot of time to master thats all i can say to help


  • Registered Users, Registered Users 2 Posts: 6,424 ✭✭✭440Hz


    What problems are you having with that guide? It looks comprehensive to me, and easy enough to follow, how far have you gotten in the installation process, if any?

    On another note, is there a particular reason you need Python? As a first programming language it might be a tad adventurous.

    If you are having specific installation/running issues, if you point them out can hopefully help out.


  • Closed Accounts Posts: 4,842 ✭✭✭steveland?


    I installed perl recently using an app 440Hz pointed out a while ago called MacPorts

    Install MacPorts, open terminal, type port search python, find the package you want in that list and then type sudo port install <packagename>

    Ipso Facto you got Python. It'll fetch all the dependencies, configure and build each and install Python for you.

    Real handy program, very similar user-wise to apt-get in Debian Linux


  • Registered Users, Registered Users 2 Posts: 945 ✭✭✭a5y


    440Hz wrote: »
    What problems are you having with that guide? It looks comprehensive to me, and easy enough to follow, how far have you gotten in the installation process, if any?

    I followed the guide without anything spectacularly wrong happening.
    'Cept in applications files I've not got myself two similar

    MacPython 2.4 (Date Modified 27 July 2007)
    Mac-Python2.3 (Installed Today)

    Seems I've installed a slightly outdated version of Python? Seems strange that it was installed that along ago, as I didn't have my laptop then.
    440Hz wrote: »
    On another note, is there a particular reason you need Python? As a first programming language it might be a tad adventurous.

    If you are having specific installation/running issues, if you point them out can hopefully help out.

    I read up on the differences between languages. I chose it because it seems to have a reputation for being fun. As I'm learning this more or less recreationally thats important. (Really I'd like to make my Nabaztag do some new tricks).

    Also, it seems to be compatible with C and C++ and stuff too, which is probably more important long term than it being fun. Though getting complete control of the wiggling ears matters to me too.


  • Registered Users, Registered Users 2 Posts: 6,424 ✭✭✭440Hz


    a5y wrote: »
    I followed the guide without anything spectacularly wrong happening.
    'Cept in applications files I've not got myself two similar

    MacPython 2.4 (Date Modified 27 July 2007)
    Mac-Python2.3 (Installed Today)

    Seems I've installed a slightly outdated version of Python? Seems strange that it was installed that along ago, as I didn't have my laptop then.

    Have you tried to run it from the terminal?

    Typing 'python' should tell you which version the system decides to run. It would be worth looking at the man pages for python too, just to familiarise yourself with it (run 'man python' from the terminal, hit 'q' to exit).
    a5y wrote: »
    I read up on the differences between languages. I chose it because it seems to have a reputation for being fun. As I'm learning this more or less recreationally thats important. (Really I'd like to make my Nabaztag do some new tricks).

    Also, it seems to be compatible with C and C++ and stuff too, which is probably more important long term than it being fun. Though getting complete control of the wiggling ears matters to me too.

    The first language I studied was Java (not that im suggesting you start there), since then, I've gone through my fair share. When we started Java in first year, 80% of us were lost, none of us had programming backgrounds and even though we were doing non-OO (Object Oriented) stuff, a lot of people still had difficulty with it. Since those days, I lecture programming modules, to novice programmers with little or no programming background, and honestly I find C is the best place to start.

    Whether you learn C with the intention of developing, or even if you never write a line of C, I honestly think that reading some C (not C++) books, for the basic rudiments of programming is the way to start. You won't get bogged down in OO, you will just get a simple introduction into what programming is all about, the semantics and syntax you can adopt for Python or whatever later on. IMHO, that is what I would advise anyway.


  • Advertisement
Advertisement