<commit_before>#
# MansOS web server - mote handler class
#

import serial, subprocess, sys, time, os
#from serial.tools import list_ports
from settings import *

def runSubprocess1(args, serve):
    retcode = -1
    try:
        proc = subprocess.Popen(args, stderr = subprocess.STDOUT, stdout = subprocess.PIPE,
                                shell = False)
        while proc.poll() is None:
            line = proc.stdout.readline()
            if line:
                if not server.uploadCallback(line):
                    break
            time.sleep(0.01)
        proc.wait()
        retcode = proc.returncode<commit_msg>web: set env var<commit_after>#
# MansOS web server - mote handler class
#

import serial, subprocess, sys, time, os
#from serial.tools import list_ports
from settings import *

def runSubprocess1(args, server):
    retcode = -1
    try:
        proc = subprocess.Popen(args, stderr = subprocess.STDOUT, stdout = subprocess.PIPE,
                                shell = False)
        while proc.poll() is None:
            line = proc.stdout.readline()
            if line:
                if not server.uploadCallback(line):
                    break
            time.sleep(0.01)
        proc.wait()
        retcode = proc.returncode
{'fraction_non_alphanumeric': 0.08925750394944708, 'fraction_numerical': 0.007898894154818325, 'mean_word_length': 1.8536036036036037, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4466791', 'n_tokens_mistral': 365, 'n_tokens_neox': 354, 'n_words': 102}