Skip to content

Commit

Permalink
Put version info in its own file.
Browse files Browse the repository at this point in the history
- Added variables VN and VD
  • Loading branch information
dloscutoff committed Sep 15, 2021
1 parent 902949f commit a7e03de
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import random
import re

import version
import tokens
import operators as ops
import parsing
Expand Down Expand Up @@ -561,6 +562,8 @@ def WIPEGLOBALS(self):
"CZ": Scalar("bcdfghjklmnpqrstvwxyz"),
"PA": Scalar("".join(chr(i) for i in range(32, 127))),
"PI": Scalar(math.pi),
"VD": Scalar(version.COMMIT_DATE),
"VN": Scalar(version.VERSION),
"VW": Scalar("aeiou"),
"VY": Scalar("aeiouy"),
"XA": Pattern("[A-Za-z]"),
Expand Down
6 changes: 3 additions & 3 deletions pip.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
import argparse
import pprint

import version
from scanning import scan, addSpaces
from parsing import parse
from ptypes import Scalar
from execution import ProgramState
from errors import FatalError

VERSION = "0.21.09.14"

def pip(code=None, argv=None, interactive=True):
if code is not None or argv is not None:
interactive = False
if interactive:
print(f"=== Welcome to Pip, version {VERSION} ===")
print(f"=== Welcome to Pip, version {version.VERSION} ===")
print("Enter command-line args, terminated by newline (-h for help):")
argv = input()
if argv is not None:
Expand Down Expand Up @@ -131,7 +131,7 @@ def pip(code=None, argv=None, interactive=True):
#!print(options)

if options.version:
print(f"Pip {VERSION}")
print(f"Pip {version.VERSION} (updated {version.COMMIT_DATE})")
return
if options.debug:
options.warnings = options.verbose = options.repr = True
Expand Down
3 changes: 3 additions & 0 deletions version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

VERSION = "1.0.0"
COMMIT_DATE = "2021-09-14"

0 comments on commit a7e03de

Please sign in to comment.