Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

better name: desub

  • Loading branch information...
commit d0817653636867fa94d64998ec47a6462d5c1955 1 parent a667342
@kumar303 authored
View
4 README.rst
@@ -1,8 +1,8 @@
-subd is a Python module to work with a detached subprocess.
+desub is a Python module to work with a detached subprocess.
This is useful for making a web interface (or whatever) to monitor a
process running in the background. You can start a
process from a web request and serve subsequent requests
to report status on and show output for the process you started earlier.
-Full documentation: http://subd.readthedocs.org/en/latest/
+Full documentation: http://desub.readthedocs.org/en/latest/
View
1  desub/__init__.py
@@ -0,0 +1 @@
+from desub import *
View
10 subd/subd.py → desub/desub.py
@@ -18,12 +18,12 @@ def join(cmd_args, **kw):
"""
Join a subprocess or start one if it's not running.
- The return value is a :class:`subd.Subd` object.
+ The return value is a :class:`desub.Subd` object.
Example::
- >>> import subd
- >>> proc = subd.join(['python', 'tests/cmd/loop.py'])
+ >>> import desub
+ >>> proc = desub.join(['python', 'tests/cmd/loop.py'])
>>> proc.pid
1987
>>> proc.stdout.read()
@@ -56,7 +56,7 @@ class Subd:
**root**
The root directory to store subprocess artifacts like a PID file
and stdout/stderr logs.
- By default this is ``~/.subd``.
+ By default this is ``~/.desub``.
Members
"""
@@ -67,7 +67,7 @@ def __init__(self, cmd_args, **kw):
self.kw = kw
root = kw.pop('root', None)
if not root:
- root = os.path.join(os.path.expanduser('~'), '.subd')
+ root = os.path.join(os.path.expanduser('~'), '.desub')
self.root = os.path.join(root, self.name)
if not os.path.exists(self.root):
os.makedirs(self.root)
View
8 docs/Makefile
@@ -77,17 +77,17 @@ qthelp:
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
- @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/subd.qhcp"
+ @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/desub.qhcp"
@echo "To view the help file:"
- @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/subd.qhc"
+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/desub.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
- @echo "# mkdir -p $$HOME/.local/share/devhelp/subd"
- @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/subd"
+ @echo "# mkdir -p $$HOME/.local/share/devhelp/desub"
+ @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/desub"
@echo "# devhelp"
epub:
View
14 docs/conf.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
-# subd documentation build configuration file, created by
+# desub documentation build configuration file, created by
# sphinx-quickstart on Sat Aug 11 18:39:45 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
@@ -40,7 +40,7 @@
master_doc = 'index'
# General information about the project.
-project = u'subd'
+project = u'desub'
copyright = u'2012, Kumar McMillan and contributors'
# The version info for the project you're documenting, acts as replacement for
@@ -164,7 +164,7 @@
#html_file_suffix = None
# Output file base name for HTML help builder.
-htmlhelp_basename = 'subddoc'
+htmlhelp_basename = 'desubdoc'
# -- Options for LaTeX output --------------------------------------------------
@@ -183,7 +183,7 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
- ('index', 'subd.tex', u'subd Documentation',
+ ('index', 'desub.tex', u'desub Documentation',
u'Kumar McMillan and contributors', 'manual'),
]
@@ -213,7 +213,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
- ('index', 'subd', u'subd Documentation',
+ ('index', 'desub', u'desub Documentation',
[u'Kumar McMillan and contributors'], 1)
]
@@ -227,8 +227,8 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
- ('index', 'subd', u'subd Documentation',
- u'Kumar McMillan and contributors', 'subd', 'One line description of project.',
+ ('index', 'desub', u'desub Documentation',
+ u'Kumar McMillan and contributors', 'desub', 'One line description of project.',
'Miscellaneous'),
]
View
12 docs/index.rst
@@ -1,11 +1,11 @@
====
-subd
+desub
====
.. highlight:: python
-subd is a Python module to work with a detached `subprocess`_.
+desub is a Python module to work with a detached `subprocess`_.
This is useful for making a web interface (or whatever) to monitor a
process running in the background. You can start a
@@ -22,7 +22,7 @@ Installation
::
- pip install subd
+ pip install desub
This pulls in `psutil`_ as a requirement.
@@ -31,9 +31,9 @@ This pulls in `psutil`_ as a requirement.
API
===
-.. autofunction:: subd.join
+.. autofunction:: desub.join
-.. autoclass:: subd.Subd
+.. autoclass:: desub.Subd
:members: pid, stdout, stderr, stop, is_running
Developers
@@ -54,7 +54,7 @@ To the build the docs run::
The issue tracker can be found on github.
-.. _`source from git`: https://github.com/kumar303/subd
+.. _`source from git`: https://github.com/kumar303/desub
.. _tox: http://tox.testrun.org/latest/
View
4 setup.py
@@ -7,14 +7,14 @@ def path(name):
return open(os.path.join(os.path.dirname(__file__), name))
-setup(name='subd',
+setup(name='desub',
version='1.0',
description='Work with a detached subprocess.',
long_description=path('README.rst').read(),
author='Kumar McMillan',
author_email='kumar.mcmillan@gmail.com',
license='MIT',
- url='https://github.com/kumar303/subd',
+ url='https://github.com/kumar303/desub',
include_package_data=True,
classifiers=[],
packages=find_packages(exclude=['tests']),
View
1  subd/__init__.py
@@ -1 +0,0 @@
-from subd import *
View
8 tests/test.py
@@ -8,7 +8,7 @@
from nose.tools import eq_, raises
import psutil
-import subd
+import desub
class Test(unittest.TestCase):
@@ -22,8 +22,8 @@ def tearDown(self):
shutil.rmtree(self.tmp)
def join(self):
- return subd.join([sys.executable,
- self.cmd('loop.py')], root=self.tmp)
+ return desub.join([sys.executable,
+ self.cmd('loop.py')], root=self.tmp)
def cmd(self, name):
return os.path.join(os.path.dirname(__file__), 'cmd', name)
@@ -52,7 +52,7 @@ def test_join(self):
eq_(self.proc.pid, proc2.pid)
def test_default_root(self):
- pr = subd.join([sys.executable, self.cmd('loop.py')])
+ pr = desub.join([sys.executable, self.cmd('loop.py')])
self.addCleanup(lambda: shutil.rmtree(pr.root))
assert pr.pid != self.proc.pid, (
'new root should make separate procs')
Please sign in to comment.
Something went wrong with that request. Please try again.