Changeset b7a600 in git for Singular/LIB/surf.lib


Ignore:
Timestamp:
Feb 13, 2017, 9:36:57 AM (7 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
c881d2b553a7c6f261ea2ee679a13bee8509daa9
Parents:
7d44dd5555e888e65ba7e20c25fc77d0d98f0db197f6de6a93916b73681b340f749daec35ab96a72
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2017-02-13 09:36:57+01:00
git-committer:
GitHub <noreply@github.com>2017-02-13 09:36:57+01:00
Message:
Merge pull request #815 from YueRen/plotInteractiveShell

fix: plot in InteractiveShell
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/surf.lib

    r7d44dd rb7a600  
    141141
    142142  string surf_call; i = 0;
     143  if (isInteractiveShell())
     144  {
     145    surf_call = "surf-alggeo ";
     146    surf_call = surf_call + l + " >/dev/null 2>&1";
     147    "plotting with surf, image will appear in pop-up.";
     148
     149    i = system("sh", surf_call);
     150    ">>SPECIAL_EVENT_START>>/tmp/surf.jpg<<SPECIAL_EVENT_END<<";
     151    return();
     152  }
    143153  if (isWindows())
    144154  {
     
    432442}
    433443
     444static proc isInteractiveShell()
     445"returns 1 if this SINGULAR instance runs in some container inside interactive shell;
     4460 otherwise"
     447{
     448  string s = getShellOutput("whoami");
     449  return (s=="singularUser");
     450}
     451
    434452static proc getShellOutput(string shellCommand)
    435453"returns the console output when executing the given shellCommand"
Note: See TracChangeset for help on using the changeset viewer.