Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Interactive command line tutorial with python

  1. #1
    Join Date
    Apr 2005
    Location
    Canada
    Beans
    641
    Distro
    The Feisty Fawn Testing

    Interactive command line tutorial with python

    Hello everyone,
    Seeing some requests for an interactive command line tutorial (like the ruby online tutorial), I wrote this tutor with python. I am relatively new to python and would appreciate comments and advice. Please untar the files to your desktop and run cmd_tutor.py from the terminal. As you can see, cmd_tutor.py parses 'lessons' written in a standard format. So it is very easy to extend this by writing more lessons.
    Thanks

    Update March 2009 - A new version can be downloaded from google code.
    Attached Files Attached Files
    Last edited by raja; March 21st, 2009 at 02:34 AM. Reason: Update
    Registered Linux User 425324
    Ubuntu user # 12843
    Wrapping workspaces in Gnome
    Gmail notifier for Dzen

  2. #2
    Join Date
    Dec 2005
    Location
    Copenhagen, Denmark
    Beans
    386
    Distro
    Kubuntu 7.04 Feisty Fawn

    Re: Interactive command line tutorial with python

    Very nice idea.. Just make the break between showing words shorter.. It is very annoying, because it is slower than I read... (And english is not even my native language).

    EDIT:
    If you add
    #!/usr/bin/env python
    as the first line.. The file can be executed with ./cmd_tutor.py
    Last edited by tkjacobsen; March 10th, 2007 at 05:12 PM.
    Troels Kofoed Jacobsen
    Consult the wiki before posting: wiki.ubuntu.com

  3. #3
    Join Date
    Apr 2005
    Location
    Canada
    Beans
    641
    Distro
    The Feisty Fawn Testing

    Re: Interactive command line tutorial with python

    Quote Originally Posted by tkjacobsen View Post
    Very nice idea.. Just make the break between showing words shorter.. It is very annoying, because it is slower than I read... (And english is not even my native language).
    Thanks. I am planning to have an optional argument to have it go faster. Of course you can modify the sleep time in the function slowprint to make it faster.
    Registered Linux User 425324
    Ubuntu user # 12843
    Wrapping workspaces in Gnome
    Gmail notifier for Dzen

  4. #4
    Join Date
    Dec 2005
    Location
    Copenhagen, Denmark
    Beans
    386
    Distro
    Kubuntu 7.04 Feisty Fawn

    Re: Interactive command line tutorial with python

    Quote Originally Posted by raja View Post
    Thanks. I am planning to have an optional argument to have it go faster. Of course you can modify the sleep time in the function slowprint to make it faster.
    I know, but the people who will use it don't.. But it is great if you just add it as a choice when starting the program.
    Troels Kofoed Jacobsen
    Consult the wiki before posting: wiki.ubuntu.com

  5. #5
    Join Date
    Apr 2005
    Location
    Canada
    Beans
    641
    Distro
    The Feisty Fawn Testing

    Re: Interactive command line tutorial with python

    Quote Originally Posted by tkjacobsen View Post
    I know, but the people who will use it don't.. But it is great if you just add it as a choice when starting the program.
    Point well taken. Thanks again for taking the time.
    Registered Linux User 425324
    Ubuntu user # 12843
    Wrapping workspaces in Gnome
    Gmail notifier for Dzen

  6. #6
    Join Date
    Apr 2006
    Beans
    368
    Distro
    Edubuntu 7.04 Feisty Fawn

    Re: Interactive command line tutorial with python

    I only did lesson 1 but it was pretty cool. I ended up typing quit and changing the sleep interval like you said though.

  7. #7
    Join Date
    Apr 2005
    Location
    Canada
    Beans
    641
    Distro
    The Feisty Fawn Testing

    Re: Interactive command line tutorial with python

    Update !

    Here is the new version with the promised '-q' argument that will disable the slow printing. Also there are five brand new lessons. An install script is added so that the program can be installed and called up from the command line easily. More details here.

    Suggestions are welcome.
    Attached Files Attached Files
    Last edited by raja; April 9th, 2007 at 01:10 AM.
    Registered Linux User 425324
    Ubuntu user # 12843
    Wrapping workspaces in Gnome
    Gmail notifier for Dzen

  8. #8
    Join Date
    Apr 2005
    Location
    Canada
    Beans
    641
    Distro
    The Feisty Fawn Testing

    Re: Interactive command line tutorial with python

    No triers yet ?
    Registered Linux User 425324
    Ubuntu user # 12843
    Wrapping workspaces in Gnome
    Gmail notifier for Dzen

  9. #9
    Join Date
    Jul 2006
    Location
    Texas
    Beans
    300
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Interactive command line tutorial with python

    At first, I installed it:
    Code:
    sudo python install.py install
    After I did that, cmd_tutor would give me errors. I was only able to run it as sudo. Is this a problem with my configuration or a bug in the install process?

    I uninstalled it, and just run it from the src directory and it works fine that way.

    I do like it better with the -q option.

  10. #10
    Join Date
    Apr 2005
    Location
    Canada
    Beans
    641
    Distro
    The Feisty Fawn Testing

    Re: Interactive command line tutorial with python

    Thanks Mike.
    There was a problem with the file permissions. I have changed the install script and it will be OK now.
    Registered Linux User 425324
    Ubuntu user # 12843
    Wrapping workspaces in Gnome
    Gmail notifier for Dzen

Page 1 of 3 123 LastLast

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
  •