Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: HOWTO: Install pyshaper (like netlimiter for linux)

  1. #1
    Join Date
    Dec 2005
    Beans
    231
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    HOWTO: Install pyshaper (like netlimiter for linux)

    Here's the site for pyshaper. This tutorial is going to be a quick and dirty that I will clean up later...

    http://www.freenet.org.nz/python/pyshaper/

    Take a look, see if it's what you're looking for. If it is, read on.

    First, you need the requirements for the package you can get from the repos.

    Code:
    sudo apt-get install python-geoip python-tk tk8.5 python-pmw tcpdump
    Now, go install the file. Grab the file from the download link, extract it, and then install it by executing this in the same directory:

    Code:
    sudo make install
    Now the tricky part. There's a requirement not mentioned, and that's also by the same author.

    http://www.freenet.org.nz/python/ezsqlobject/

    First, you need to get it's base library. The reason we're grabbing 0.6 version is because the ezsqlobject library breaks with anything higher (they removed a feature in higher releases called DBMConnection)

    Code:
    sudo apt-get install python-setuptools
    sudo easy_install SQLObject==0.6
    This grabs easy_install, like PEAR but for python. In other words, it's a repository for python scripts and libraries specifically.

    Now go and get the ezsqlobject library from above, and extract it somewhere. Then, in the directory:

    Code:
    sudo python setup.py install

    Use this to start the daemon:
    Code:
    sudo pyshaper start
    use this to start the gui
    Code:
    sudo pyshaper
    I woudl very much suggest you read the man page, it has a bunch of good information.
    Code:
    man pyshaper
    If the box says "Needs Windows 2000 or better" why won't it work on Linux?

    There are 10 types of people...those who understand binary, and those who don't.

  2. #2
    Join Date
    May 2008
    Beans
    2

    Re: HOWTO: Install pyshaper (like netlimiter for linux)

    Hey dragonfyre13,

    Just wanted to say thanks for the great tutorial, it was very helpful!

    -inversions

  3. #3
    Join Date
    Apr 2006
    Beans
    136
    Distro
    Ubuntu

    Re: HOWTO: Install pyshaper (like netlimiter for linux)

    This tutorial is not working for me under Jaunty.
    Specifically the following command doesn't seem to work anymore:
    sudo easy_install SQLObject==0.6

    It returns an HTML page now, don't think this old version is still being shared by sf.net?

    Code:
    sudo easy_install SQLObject==0.6
    Searching for SQLObject==0.6
    Reading http://pypi.python.org/simple/SQLObject/
    Reading http://sqlobject.org/
    Reading http://sqlobject.org/devel/
    Reading http://sqlobject.org
    Best match: SQLObject 0.6
    Downloading http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.6.tar.gz?download
    error: Unexpected HTML page found at http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.6.tar.gz?download
    Last edited by snek; August 6th, 2009 at 07:35 AM.

  4. #4
    Join Date
    Jan 2007
    Location
    Fbd(NCR), India
    Beans
    111
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Talking Re: HOWTO: Install pyshaper (like netlimiter for linux)

    thanks for the info. I had been using Wonder Shaper (which doesn't have a GUI) and is practically featureless. Just what I needed....
    Trying to shift to an environment I know is secure.

  5. #5
    Join Date
    Apr 2006
    Beans
    136
    Distro
    Ubuntu

    Re: HOWTO: Install pyshaper (like netlimiter for linux)

    I found an SVN repo which still has 0.6 here:
    http://svn.colorstudy.com/SQLObject/branches/0.6/

    Will try to see if I can install it manually

    EDIT: One step further!
    Code:
    sudo aptitude install subversion
    sudo svn co http://svn.colorstudy.com/SQLObject/branches/0.6/
    cd 0.6
    sudo easy_install .
    sudo python setup.py install
    But when I try
    Code:
    sudo pyshaper start
    I still get an error:
    Code:
    /usr/local/bin/pyshaper:23: DeprecationWarning: The popen2 module is deprecated.  Use the subprocess module.
      import sys, os, commands, re, traceback, signal, time, stat, StringIO, popen2, sha
    /usr/local/bin/pyshaper:23: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
      import sys, os, commands, re, traceback, signal, time, stat, StringIO, popen2, sha
    Traceback (most recent call last):
      File "/usr/local/bin/pyshaper", line 35, in <module>
        import ezsqlobject
    ImportError: No module named ezsqlobject
    EDIT2: Fixed this problem! I forgot to follow the step for ezsqlobject! d0h!
    Code:
    cd ezsqlobject-0.1.1/
    sudo python setup.py install
    sudo pyshaper start
    Code:
    /usr/local/bin/pyshaper:23: DeprecationWarning: The popen2 module is deprecated.  Use the subprocess module.
      import sys, os, commands, re, traceback, signal, time, stat, StringIO, popen2, sha
    /usr/local/bin/pyshaper:23: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
      import sys, os, commands, re, traceback, signal, time, stat, StringIO, popen2, sha
    pyshaper detached into background as daemon with pid 27618
    pyshaper: version 0.1.3 now running on 30 second cycle...
    Last edited by snek; August 6th, 2009 at 10:54 AM.

  6. #6
    Join Date
    Dec 2009
    Beans
    1

    Re: HOWTO: Install pyshaper (like netlimiter for linux)

    As of Ubuntu karmic, the above instructions didn't work for me, it failed trying to run pyshaper, with the error
    Code:
    Traceback (most recent call last):
      File "/usr/local/bin/pyshaper", line 35, in <module>
        import ezsqlobject
    ImportError: No module named ezsqlobject
    Solved by editing the pyshaper.py file, replacing
    Code:
    import ezsqlobject
    to:
    Code:
    import sqlobject

  7. #7
    Join Date
    Dec 2008
    Beans
    256

    Re: HOWTO: Install pyshaper (like netlimiter for linux)

    Works with no errors here in lucid. Thanks!

  8. #8
    Join Date
    Dec 2006
    Location
    Vancouver Island, Canada
    Beans
    112
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: HOWTO: Install pyshaper (like netlimiter for linux)

    Little bit of an old thread - but certainly, this works just fine on 11.04, thanks for the concise and clear instructions.

  9. #9
    Join Date
    Mar 2010
    Location
    SOUTH AFRIKA
    Beans
    31
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: HOWTO: Install pyshaper (like netlimiter for linux)

    Thanks worked perfectly

  10. #10
    Join Date
    Jul 2011
    Beans
    2

    Re: HOWTO: Install pyshaper (like netlimiter for linux)

    works for me as well on ubuntu 11.04..thanks

Page 1 of 2 12 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
  •