Keep Python 2 code path

This commit is contained in:
Richard Berger
2021-06-02 11:18:00 -04:00
parent 3d991cda6f
commit 41d289e2b0
2 changed files with 9 additions and 2 deletions

View File

@ -86,4 +86,7 @@ lmp.command("run 0 pre no post yes")
#print("Proc %d out of %d procs has" % (me,nprocs), lmp)
if me == 0:
input("Press Enter to exit...")
if sys.version_info[0] == 3:
input("Press Enter to exit...")
else:
raw_input("Press Enter to exit...")

View File

@ -88,6 +88,7 @@ g.curve(N,'r') set color of curve N
# Imports and external programs
import os
import sys
try: from DEFAULTS import PIZZA_GNUPLOT
except ImportError: PIZZA_GNUPLOT = "gnuplot -p"
@ -122,7 +123,10 @@ class gnu:
def enter(self):
while 1:
command = input("gnuplot> ")
if sys.version_info[0] == 3:
command = input("gnuplot> ")
else:
command = raw_input("gnuplot> ")
if command == "quit" or command == "exit": return
self.__call__(command)