Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install sy

How to install sy

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install sy
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.0dev-20100729 Failed View build log
0.3dev Failed View build log
Windows (64-bit)
1.0dev-20100729 Failed View build log
0.3dev Failed View build log
Mac OS X (10.5+)
0.3dev
1.0dev-20100729 Failed View build log
0.3dev Available View build log
Linux (32-bit)
0.3dev
1.0dev-20100729 Failed View build log
0.3dev Available View build log
Linux (64-bit)
0.3dev
1.0dev-20100729 Failed View build log
0.3dev Available View build log
 
License
BSD
Imports
Lastest release
version 1.0dev-20100729 on Jan 5th, 2011

This library is a set of easy to use modules for system administration tasks. To use the library import the version you want as sy in your script:

# Import the library

System Message: ERROR/3 (<string>, line 10)

Inconsistent literal block quoting.

import sy1 as sy

# Replace lines in '/etc/hosts' that match nis.* sy.path.replace_lines('/etc/hosts', 'nis.*', '10.2.3.1 ldap') 1

# Fetch information about the interface hme0 hme0 = sy.net.intf.get('hme0')

# Get the IP of hme0 hme0.ipaddress '192.168.2.2'

# Check if hme0 is up hme0.is_up True

# Find files named '.pl' but time out after 10 seconds out, err = sy.cmd.do('find /mnt -name {}', '.pl', timeout=10)

# Setup a rotating log file that wont fill the disk sy.log.to_file('/var/tmp/app.log')

# Check if port 22 is answering on bart if not sy.net.ip.port_is_open('bart', 22): sy.log.warning('Ssh is down on bart')

Changes in the sy1 library is guaranteed to not break your code. When incompatible changes are introduced new version will be installed as sy2, sy3 and so on.

The library is heavily inspired by Werkzeug which is a great WSGI utility collection.

Developing

The repository path for sy is located at http://bitbucket.org/pauldiacon/sy. Clone with mercurial by typing:

$ hg clone http://zscmp01/hg/proj/dia/sbpy

The requirements for developing are listed in dev-reqs.pip that can be install with pip with:

$ pip install -r devl-reqs.pip

The library currently targets python 2.4.4 - 2.6.

Testing

To run the test suite use nose:

$ nosetests -a '!host' tests

The !host parameter tells the suite to not run tests that change the hosts configuration (like reconfiguring network interfaces).

There currently isn't any automated way to run the testsuite on virtual machines. This feature is greatly needed to be able to test all parts of the library and to test it on different versions and operating systems.

Documentation

The documentation is built with sphinx and is located under the docs folder.

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.