mattions / neuronvisio

A Graphical User Interface with 3D Visualization features for NEURON simulation enviroment
https://neuronvisio.readthedocs.io
Other
30 stars 15 forks source link

xdg-Open does not work on MAC #56

Closed mattions closed 11 years ago

mattions commented 11 years ago

And we need to find a cross-platform way to do it.

This is the error from @tclose

WARNING neuronvisio.controls 457 Could not locate a predefined 
mosinit.hoc. Can't automatically load the model. Check the 
README for hints on which hoc to use and copy it to 
Models/144054/mosinit.hoc 
INFO neuronvisio.modeldb.ModelDB 99 Opening 'Models/144054'. 
--------------------------------------------------------------------------- 
OSError Traceback (most recent call last) 
/usr/local/lib/python2.7/site-packages/neuronvisio/controls.pyc in 
load_selected_model(self) 
457 logger.warning(path_info) 
458 self.ui.statusbar.showMessage(path_info, 10000) 
--> 459 mod.browse() 
460 
461 def make_animation_screenshots(self, time_start, time_stop=None, 

/usr/local/lib/python2.7/site-packages/neuronvisio/modeldb/ModelDB.pyc in 
browse(self) 
98 modelName = self.get_name() 
99 logger.info("Opening '" + self.get_dir()+"'.") 
--> 100 self._start_file(self.get_dir()) 
101 else: 
102 logger.info("Model does not exists locally") 

/usr/local/lib/python2.7/site-packages/neuronvisio/modeldb/ModelDB.pyc in 
_start_file(self, filename) 
250 except: 
251 # Implementation for Linux 
--> 252 subprocess.Popen(['xdg-open', filename]) 
253 
254 
mattions commented 11 years ago

It seems there is an open command for MAC that we may can use

mattions commented 11 years ago

Ops, wrong number in the commit.