| 4031 | |
| 4032 | |
| 4033 | static int tkinter2Present(void) |
| 4034 | { |
| 4035 | static int lTkinter2Present = -1 ; |
| 4036 | char lPythonCommand[256]; |
| 4037 | char lPythonParams[256] = |
| 4038 | "-S -c \"try:\n\timport Tkinter;\nexcept:\n\tprint 0;\""; |
| 4039 | |
| 4040 | |
| 4041 | if ( lTkinter2Present < 0 ) |
| 4042 | { |
| 4043 | lTkinter2Present = 0 ; |
| 4044 | if ( python2Present() ) |
| 4045 | { |
| 4046 | sprintf( lPythonCommand , "%s %s" , gPython2Name , lPythonParams ) ; |
| 4047 | lTkinter2Present = tryCommand(lPythonCommand) ; |
| 4048 | } |
| 4049 | if (tinyfd_verbose) printf("lTkinter2Present %d\n", lTkinter2Present) ; |
| 4050 | } |
| 4051 | return lTkinter2Present && graphicMode() && !(isDarwin() && getenv("SSH_TTY") ); |
| 4052 | } |
| 4053 | |
| 4054 | |
| 4055 | static int tkinter3Present(void) |
no test coverage detected