| 86 | } |
| 87 | |
| 88 | bool EmbeddedPython::isPythonScript( const std::filesystem::path& path ) |
| 89 | { |
| 90 | std::error_code ec; |
| 91 | if ( !std::filesystem::exists( path, ec ) ) |
| 92 | return false; |
| 93 | if ( !std::filesystem::is_regular_file( path, ec ) ) |
| 94 | return false; |
| 95 | |
| 96 | auto ext = utf8string( path.extension() ); |
| 97 | for ( auto& c : ext ) |
| 98 | c = (char)std::tolower( (unsigned char)c ); |
| 99 | |
| 100 | if ( ext != ".py" ) |
| 101 | return false; |
| 102 | |
| 103 | return true; |
| 104 | } |
| 105 | |
| 106 | EmbeddedPython::EmbeddedPython() |
| 107 | { |
nothing calls this directly
no test coverage detected