In [4]:
from ipython import nbconv


---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-4-840b57d8ad88> in <module>()
----> 1 from ipython import nbconv

ImportError: No module named ipython

In [10]:
cd brobeur-web/


/home/wcmckee/brobeur-web

In [16]:
import os

In [28]:
dadir = '/home/wcmckee/artcontrol-api'

In [18]:
opnb = os.listdir('/home/wcmckee/artcontrol-api')

In [20]:
strliz = []

In [ ]:
if '.ipynb' in opz:
    strliz.append(opz)

In [21]:
for opz in opnb:
    print opz
    if '.ipynb' in opz:
        strliz.append(opz)


aklmcam.py
ipython_log.py.002~
githcli
passwd
pyblen.py
pywgitz.py
pynztacam.py
testing123
uploads.html
Untitled0.py
pynztacam.ipynb
Game Of Thrones.ipynb
savPrn
redTube.py
aklmcam.ipynb
tlchome.html
spellcheckin.ipynb
.gitignore
cpuclu.json
myfile.txt
pyssh.ipynb
hcpux
artcontrol.py
passap
oceanconnor.ipynb
README.md
scrapnot.ipynb
Untitled1.ipynb
home.html
Untitled3.py
tpb.ipynb
githsec
testz
wcmckee.rst
Peterwest.ipynb
atkey
config
output.file
tlc.py
~
.git
artcontrol.ipynb
dh.ipynb
ipython_log.py
.ipynb_checkpoints
Untitled2.py
dh.py
openimg.ipynb
prnsav
example.xls
tlc.ipynb
openimg.py
LICENSE
spellcheckin.py
salecus.py
Untitled1.py
salecus.ipynb
Untitled2.ipynb
pywgit.py
scrapnot.py
pyssh.py
122.jpg
gpaz
Peterwest.py
Game Of Thrones.py
linkz
Untitled0.ipynb
Untitled3.ipynb
pywgit.ipynb
artcontrolme.wordpress.2014-02-10.xml
dhcpd.leases
result

In [22]:
strliz


Out[22]:
['pynztacam.ipynb',
 'Game Of Thrones.ipynb',
 'aklmcam.ipynb',
 'spellcheckin.ipynb',
 'pyssh.ipynb',
 'oceanconnor.ipynb',
 'scrapnot.ipynb',
 'Untitled1.ipynb',
 'tpb.ipynb',
 'Peterwest.ipynb',
 'artcontrol.ipynb',
 'dh.ipynb',
 '.ipynb_checkpoints',
 'openimg.ipynb',
 'tlc.ipynb',
 'salecus.ipynb',
 'Untitled2.ipynb',
 'Untitled0.ipynb',
 'Untitled3.ipynb',
 'pywgit.ipynb']

In [23]:
nbfol = '/home/wcmckee/brobeur-web/notebook'

In [33]:
os.chdir(dadir)
strliz


Out[33]:
['pynztacam.ipynb',
 'Game Of Thrones.ipynb',
 'aklmcam.ipynb',
 'spellcheckin.ipynb',
 'pyssh.ipynb',
 'oceanconnor.ipynb',
 'scrapnot.ipynb',
 'Untitled1.ipynb',
 'tpb.ipynb',
 'Peterwest.ipynb',
 'artcontrol.ipynb',
 'dh.ipynb',
 '.ipynb_checkpoints',
 'openimg.ipynb',
 'tlc.ipynb',
 'salecus.ipynb',
 'Untitled2.ipynb',
 'Untitled0.ipynb',
 'Untitled3.ipynb',
 'pywgit.ipynb']

In [34]:
for bnz in strliz:
    print bnz


pynztacam.ipynb
Game Of Thrones.ipynb
aklmcam.ipynb
spellcheckin.ipynb
pyssh.ipynb
oceanconnor.ipynb
scrapnot.ipynb
Untitled1.ipynb
tpb.ipynb
Peterwest.ipynb
artcontrol.ipynb
dh.ipynb
.ipynb_checkpoints
openimg.ipynb
tlc.ipynb
salecus.ipynb
Untitled2.ipynb
Untitled0.ipynb
Untitled3.ipynb
pywgit.ipynb

In [ ]:
%%bash 
ipython nbconvert notebook.ipynb

In [63]:
import envoy
import subprocess

In [58]:
import IPython.nbconvert

In [62]:
from IPython.config import Config
from IPython.nbconvert import HTMLExporter,RSTExporter

In [ ]:
os.chdir('/home/wcmckee/brobeur-web/')

In [ ]:
exrst = RSTExporter.from_notebook_node

In [55]:
for itz in ipy:
    lsr = envoy.run('ipython nbconvert pywgit.ipynb')

In [56]:
lsr.std_out


Out[56]:
''

In [65]:
xc = subprocess.call('ipython nbconvert pywgit.ipynb')


---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-65-448ac2553d79> in <module>()
----> 1 xc = subprocess.call('ipython nbconvert pywgit.ipynb')

/usr/lib/python2.7/subprocess.pyc in call(*popenargs, **kwargs)
    491     retcode = call(["ls", "-l"])
    492     """
--> 493     return Popen(*popenargs, **kwargs).wait()
    494 
    495 

/usr/lib/python2.7/subprocess.pyc in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags)
    677                             p2cread, p2cwrite,
    678                             c2pread, c2pwrite,
--> 679                             errread, errwrite)
    680 
    681         if mswindows:

/usr/lib/python2.7/subprocess.pyc in _execute_child(self, args, executable, preexec_fn, close_fds, cwd, env, universal_newlines, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite)
   1257                     if fd is not None:
   1258                         os.close(fd)
-> 1259                 raise child_exception
   1260 
   1261 

OSError: [Errno 2] No such file or directory

In [ ]:


In [54]:
cb = run('ls')


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-54-0e69cacc7894> in <module>()
----> 1 cb = run('ls')

<ipython-input-36-5558080a7f16> in run(command, data, timeout, kill_timeout, env, cwd)
      5     """
      6 
----> 7     command = expand_args(command)
      8 
      9     history = []

NameError: global name 'expand_args' is not defined

In [ ]:
cb.