#12299: Upgrade Jmol to 12.3.27, Advance Jmol Interactive Features in Flask
Notebook
--------------------------------------------------------------+-------------
       Reporter:  gutow                                       |         Owner:  
jason, mpatel, was                                                       
           Type:  enhancement                                 |        Status:  
needs_review                                                             
       Priority:  major                                       |     Milestone:  
sage-pending                                                             
      Component:  notebook                                    |    Resolution:  
                                                                         
       Keywords:  Jmol, 3D, notebook                          |   Work issues:  
                                                                         
Report Upstream:  Fixed upstream, in a later stable release.  |     Reviewers:  
Karl-Dieter Crisman, Steven Trogdon, Punarbasu Purkayastha, John Palmieri
        Authors:  Jonathan Gutow                              |     Merged in:  
                                                                         
   Dependencies:  #11080,#11078,#11503,#13121                 |      Stopgaps:  
                                                                         
--------------------------------------------------------------+-------------

Comment (by ppurka):

 Replying to [comment:172 ddrake]:
 > Replying to [comment:170 ppurka]:
 > > The `#!/usr/bin/env bash` syntax is
 [http://en.wikipedia.org/wiki/Shebang_(Unix)#Portability recommended for
 portability].
 > >
 > > As for the bash script, are you looking at the output of the bash
 script or only at the return status.
 >
 > There's a doctest in sage/interfaces/jmoldata.py (line 90) that looks
 like this:
 > {{{
 > result = subprocess.call([testjavapath],stdout=jout)
 > }}}

 Then my version will ''always'' have a return code of 0. This is why I
 asked the question. So we have the following choices:

 1. For python based solution: the python method in comment:173 looks good.

 2. For bash based solution: the simple bash version in the case you use
 `subprocess.call` is below. This will have the proper '''return code''' of
 0 or 1, depending on whether java is present and is version `1.[5-7]` or
 otherwise.
 {{{
 #!/usr/bin/env bash
 type -atp java  && java -version 2>&1 | grep version.*[1]\.[567]
 exit $?
 }}}

 3. A slightly more verbose bash version (again assuming you are using
 `subprocess.call`)
 {{{
 #!/usr/bin/env bash
 type -atp java || exit 1  # exit if java is not found
 java -version 2>&1 | grep version.*[1]\.[567]
 exit $?
 }}}

 4. Even more verbose bash script (assuming usage of `subprocess.call`) -
 the one in comment:166

 The bash script currently shipped in the spkg does not return the correct
 exit codes.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12299#comment:178>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to