File: recursive.py

package info (click to toggle)
cmd2 2.5.11%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 10,164 kB
  • sloc: python: 19,640; makefile: 73; sh: 67; javascript: 30
file content (13 lines) | stat: -rw-r--r-- 330 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env python
# coding=utf-8
# flake8: noqa F821
"""
Example demonstrating that calling run_pyscript recursively inside another Python script isn't allowed
"""

import os
import sys

app.cmd_echo = True
my_dir = os.path.dirname(os.path.realpath(sys.argv[0]))
app('run_pyscript {}'.format(os.path.join(my_dir, 'stop.py')))