| 1040 | } |
| 1041 | |
| 1042 | bool PythonShell::LoadScriptFromFilename(rdcstr filename) |
| 1043 | { |
| 1044 | if(!filename.isEmpty()) |
| 1045 | { |
| 1046 | QFile f(filename); |
| 1047 | if(f.open(QIODevice::ReadOnly | QIODevice::Text)) |
| 1048 | { |
| 1049 | scriptEditor->setText(f.readAll().data()); |
| 1050 | return true; |
| 1051 | } |
| 1052 | } |
| 1053 | |
| 1054 | return false; |
| 1055 | } |
| 1056 | |
| 1057 | rdcstr PythonShell::GetScriptText() |
| 1058 | { |