-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdtc.py
More file actions
31 lines (28 loc) · 687 Bytes
/
dtc.py
File metadata and controls
31 lines (28 loc) · 687 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!python3
"""
Telnet listener written in python to run commands on a linux system based on M118 gcodes issued on Duet3D motion control boards
# Copyright (C) 2021 Frank Gore all rights reserved.
# Released under The GPL V3 License https://www.gnu.org/licenses/gpl-3.0.en.html
#
#
# Developed on Raspberry pi
"""
global dtcVersion
dtcVersion = '0.0.1'
import argparse
import os
import sys
import threading
import subprocess
import shlex
import psutil
import socket
import time
import platform
import pexpect
duet = sys.argv[1]
print('Duet IP address is: ' +
duet)
telnet_child = pexpect.spawn('telnet ' + duet)
telnet_child.expect('start-timelapse ')
telnet_child.sendline('send brk')