Although that may cause an import loop...you may just want to declare Stop in the original file as a global
Stop?Although that may cause an import loop...you may just want to declare Stop in the original file as a global
SkipStop?
OOP is great. Separating concerns is a good thingI'm full OOP on this. C# as my favorite, with all the built-in language features and the fact there are almost no special cases (like int being a struct like any other type). I also like C++ and Java, but the lack of a root type in C++ and no operator overloading in Java, as well as C#'s extension methods keep me running back to .NET.
JS and Python aren't functional languages...Functional languages kinda scare me. I'm so used to imperative languages that I've never been willing to try Python, F# or JavaScript.
Just dive right it. Do LISP, that will get your feet wet.I'm full OOP on this. C# as my favorite, with all the built-in language features and the fact there are almost no special cases (like int being a struct like any other type). I also like C++ and Java, but the lack of a root type in C++ and no operator overloading in Java, as well as C#'s extension methods keep me running back to .NET.
Functional languages kinda scare me. I'm so used to imperative languages that I've never been willing to try Python, F# or JavaScript.
def listMenu_Main22():
ScenarioNumber = 0
for file in glob.glob("Scenarios/*.scn"):
Scenarios.append(file)
ScenarioNumber += 1
menuInput = ""
print ""
print ""
ScenariosListed = ScenarioNumber
while ScenariosListed > 0:
print Scenarios[ScenariosListed - 1]
ScenariosListed -= 1
print "Back"
print ""
selectMenu_Main22()
#Process Play Scenario Menu
def selectMenu_Main22():
menuInput = raw_input("")
ScenariosListed = ScenarioNumber
if str(menuInput.lower()) == "back":
MainMenu.listMenu_Main20()
else:
print "Please select one of the above"
selectMenu_Main22()
import os.path
if os.path.exists(file_path):
# Not sure if isfile causes an error if the file doesn't exist but playing it safe
if os.path.isfile(file_path):
file_type = "file"
else:
file_type = "dir"
else:
file_type = "nonexistent"
What exactly will that do? I ask as I see nothing that will help designate an inputted string as a commandAccording to StackOverflow,
Code:import os.path if os.path.exists(file_path): # Not sure if isfile causes an error if the file doesn't exist but playing it safe if os.path.isfile(file_path): file_type = "file" else: file_type = "dir" else: file_type = "nonexistent"
Just dive right it. Do LISP, that will get your feet wet.
*hugs*I might recommend Clojure over the other LISP dialects, mainly because it compiles to Java bytecode for platform independence and all that jazz.
Also, there's an excellent guide to Haskell here, if you'd rather learn that.
Yep. I think that is how it is in most high-level languages if I'm not mistakenTIL that in Ruby, everything is a reference to an object and the objects are nearly completely hidden.
...I've been using pointers all this time without even knowing it.
I said:Coding languages are like snowflakes - no two are quite alike. And if you find an exact duplicate of a snowflake, it's probably a pointer.
Java does that, too. All the things, save primitive data types (int, float, char, boolean, etc.), are pointers.TIL that in Ruby, everything is a reference to an object and the objects are nearly completely hidden.
...I've been using pointers all this time without even knowing it.
Yep. I think Clojure and Haskell do to IIRCJava does that, too. All the things, save primitive data types (int, float, char, boolean, etc.), are pointers.
Yep. I think Clojure and Haskell do to IIRC