Giter VIP home page Giter VIP logo

Comments (6)

DestyNova avatar DestyNova commented on September 15, 2024

Okay, a quick snoop in the source code revealed that when you get to the "real" pause menu, you're in the pause function around line 21 of modules/karoo_gp_pause.py, which looks like this:

	options = ['','?','help','i','m','g','s','db','ts','min','bal','l','pop','t','p','id','dir','load','w','cont','q']
	
	while True:
		try:
			menu = raw_input('\n\t\033[36m (pause) \033[0;0m')
			if menu not in options: raise ValueError()
			else: break
		except ValueError: print '\t\033[32m Select from the options given. Try again ...\033[0;0m'
		except KeyboardInterrupt: print '\n\t\033[32m Enter q to quit\033[0;0m'

However after you've entered a command it doesn't bring you back to this place; instead it brings you to an identical looking prompt (and error message) in the fx_karoo_pause function, around line 319 of modules/karoo_gp_base_class.py, which looks like this:

		if pause == 0: # ENTER enables next step in generational, interactive, and debug display
			while True:
				try:
					query = raw_input('\n\t\033[36m (pause) \033[0;0m')
					if query not in ['']: raise ValueError()
					else: break 
				except ValueError: print '\t\033[32m Select from the options given. Try again ...\033[0;0m'
				except KeyboardInterrupt: print '\n\t\033[32m Enter q to quit\033[0;0m'

The problem here is that the only valid input is the empty string. I guess what we want is that the "generic" pause mode is used (with all the introspection options)... will try to fix it here and do a PR, although I'm not sure if other parts of the code will have problems with the new behaviour of pause.

from karoo_gp.

ByteSumoLtd avatar ByteSumoLtd commented on September 15, 2024

@DestyNova -- fyi if you are playing with the code. I have fork too and have been been playing around with some minor changes. https://github.com/ByteSumoLtd/karoo_gp/commits/master

from karoo_gp.

kstaats avatar kstaats commented on September 15, 2024

from karoo_gp.

kstaats avatar kstaats commented on September 15, 2024

To DestyNova's original issue, I offer my sincere apology for a lack of follow-through. My research in an totally different arena has dominated my time for several months. Now, my work at LIGO is bringing me back to SIMOC again, with a need to not only look into an correct these known, outstanding issues, but also bring Karoo up to Python 3.x.

I appreciate your patience, and look forward to providing an improved product soon.

from karoo_gp.

kstaats avatar kstaats commented on September 15, 2024

The final Python 2.7 version of Karoo has been pushed to github. I am now returning to active development of Karoo. The next task is to improve the means by which I present and execute the functions of the Pause menu, so as to remove the potential for this loop. I will look at ByteSumo's mods and implement soon. Stay tuned!

from karoo_gp.

kstaats avatar kstaats commented on September 15, 2024

This is fully resolved with the new Karoo GP 2.3 for Python 3.6. The menu functions are fully rebuilt with no nested loops. Please sync with the latest version and we'll call this closed! :)

from karoo_gp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.