EntityScript

Draft 1.2:
Index


core_count




"""
Copyright (C) 2020 New Entity Operations Inc.

ALL RIGHTS RESERVED

core_count counts entries in your core.es quick context-file and
checks to see if the system is currently counting time.

"""
## Imports: Custom
from core_middlelayer import (
 COREES, DIRDATA
)
## Establish stateful interface types
UPINTERFACE = 0
STATEINTERFACE = 0

## Establish basic counter objects
class COUNTER:
    """
    'COUNTER' provides methods to inspect COREES summary files
    """
    def tally_core():
        core_lines = 0

        with open (DIRDATA+COREES, 'rt') as c:
            for line in c:
                core_lines += 1
                # return(core_lines-1)
        print("\n")
        print(core_lines-1, " Figments")
        print("\n")

        c.close()

## Establish basic state objects
class UP:
    """
    Is the interface up?
    """
    if UPINTERFACE == 0:
        print("NO")
    else:
        print(1)

class STATE:
    """
    Is the machine state established?
    """
    if STATEINTERFACE == 0:
        print("NO")
    else:
        print(1)




Return HOME