Keep Python 2 code path
This commit is contained in:
@ -86,4 +86,7 @@ lmp.command("run 0 pre no post yes")
|
|||||||
#print("Proc %d out of %d procs has" % (me,nprocs), lmp)
|
#print("Proc %d out of %d procs has" % (me,nprocs), lmp)
|
||||||
|
|
||||||
if me == 0:
|
if me == 0:
|
||||||
|
if sys.version_info[0] == 3:
|
||||||
input("Press Enter to exit...")
|
input("Press Enter to exit...")
|
||||||
|
else:
|
||||||
|
raw_input("Press Enter to exit...")
|
||||||
|
|||||||
@ -88,6 +88,7 @@ g.curve(N,'r') set color of curve N
|
|||||||
# Imports and external programs
|
# Imports and external programs
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
try: from DEFAULTS import PIZZA_GNUPLOT
|
try: from DEFAULTS import PIZZA_GNUPLOT
|
||||||
except ImportError: PIZZA_GNUPLOT = "gnuplot -p"
|
except ImportError: PIZZA_GNUPLOT = "gnuplot -p"
|
||||||
@ -122,7 +123,10 @@ class gnu:
|
|||||||
|
|
||||||
def enter(self):
|
def enter(self):
|
||||||
while 1:
|
while 1:
|
||||||
|
if sys.version_info[0] == 3:
|
||||||
command = input("gnuplot> ")
|
command = input("gnuplot> ")
|
||||||
|
else:
|
||||||
|
command = raw_input("gnuplot> ")
|
||||||
if command == "quit" or command == "exit": return
|
if command == "quit" or command == "exit": return
|
||||||
self.__call__(command)
|
self.__call__(command)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user