|
288 | 288 | "text": [ |
289 | 289 | "var1 __000001\n", |
290 | 290 | "var1\n", |
291 | | - "Elapsed time: 0.0007 seconds\n" |
| 291 | + "Elapsed time: 0.0005 seconds\n" |
292 | 292 | ] |
293 | 293 | } |
294 | 294 | ], |
|
802 | 802 | "name": "stdout", |
803 | 803 | "output_type": "stream", |
804 | 804 | "text": [ |
805 | | - "Elapsed time: 0.1930 seconds\n", |
806 | | - "Elapsed time: 0.0948 seconds\n" |
| 805 | + "Elapsed time: 0.1942 seconds\n", |
| 806 | + "Elapsed time: 0.1100 seconds\n" |
807 | 807 | ] |
808 | 808 | } |
809 | 809 | ], |
|
826 | 826 | "name": "stdout", |
827 | 827 | "output_type": "stream", |
828 | 828 | "text": [ |
829 | | - "Elapsed time: 0.3255 seconds\n" |
| 829 | + "Elapsed time: 0.3189 seconds\n" |
830 | 830 | ] |
831 | 831 | } |
832 | 832 | ], |
|
1124 | 1124 | "name": "stdout", |
1125 | 1125 | "output_type": "stream", |
1126 | 1126 | "text": [ |
1127 | | - "Elapsed time: 0.0024 seconds\n", |
1128 | | - "Elapsed time: 0.2368 seconds\n" |
| 1127 | + "Elapsed time: 0.0023 seconds\n", |
| 1128 | + "Elapsed time: 0.2386 seconds\n" |
1129 | 1129 | ] |
1130 | 1130 | } |
1131 | 1131 | ], |
|
1261 | 1261 | "#| export\n", |
1262 | 1262 | "def get_inspect(code=\"\", cursor_pos=0, detail_level=0, omit_sections=()):\n", |
1263 | 1263 | " runner = functools.partial(run_as_program, prog_def_option_code=\"rclass\")\n", |
1264 | | - " inspect_code = \"\"\"\\\n", |
| 1264 | + " inspect_code = \"\"\"\n", |
| 1265 | + " disp _newline \"*** Stored results:\"\n", |
1265 | 1266 | " return list\n", |
1266 | 1267 | " ereturn list\n", |
1267 | 1268 | " return add\n", |
|
1270 | 1271 | " \"\"\"\n", |
1271 | 1272 | " raw_output = diverted_stata_output(inspect_code, runner=runner)\n", |
1272 | 1273 | " desc_start = raw_output.find('*** Last updated ')\n", |
1273 | | - " return raw_output[desc_start:] + raw_output[:desc_start]" |
| 1274 | + " out = raw_output[desc_start:]\n", |
| 1275 | + " if desc_start > 21:\n", |
| 1276 | + " out += raw_output[:desc_start]\n", |
| 1277 | + " return out" |
1274 | 1278 | ] |
1275 | 1279 | }, |
1276 | 1280 | { |
|
1342 | 1346 | "name": "stdout", |
1343 | 1347 | "output_type": "stream", |
1344 | 1348 | "text": [ |
1345 | | - "*** Last updated 12:28:02 18 Jan 2023 ***\n", |
| 1349 | + "*** Last updated 15:35:53 23 Jan 2023 ***\n", |
1346 | 1350 | "\n", |
1347 | 1351 | "Contains data\n", |
1348 | 1352 | " Observations: 5 \n", |
|
1356 | 1360 | "Sorted by: \n", |
1357 | 1361 | " Note: Dataset has changed since last saved.\n", |
1358 | 1362 | "\n", |
| 1363 | + "*** Stored results:\n", |
| 1364 | + "\n", |
1359 | 1365 | "scalars:\n", |
1360 | 1366 | " r(sum) = 2\n", |
1361 | 1367 | " r(max) = 1\n", |
|
1387 | 1393 | "run_sfi('return list')" |
1388 | 1394 | ] |
1389 | 1395 | }, |
| 1396 | + { |
| 1397 | + "cell_type": "code", |
| 1398 | + "execution_count": null, |
| 1399 | + "id": "5f5dc4cb", |
| 1400 | + "metadata": {}, |
| 1401 | + "outputs": [], |
| 1402 | + "source": [ |
| 1403 | + "#| eval: false\n", |
| 1404 | + "run_sfi('clear all')\n", |
| 1405 | + "test_eq(get_inspect()[43:],\"\"\"\\\n", |
| 1406 | + "Contains data\n", |
| 1407 | + " Observations: 0 \n", |
| 1408 | + " Variables: 0 \n", |
| 1409 | + "Sorted by: \n", |
| 1410 | + "\"\"\")" |
| 1411 | + ] |
| 1412 | + }, |
1390 | 1413 | { |
1391 | 1414 | "cell_type": "code", |
1392 | 1415 | "execution_count": null, |
|
0 commit comments