other:python:misc_by_jyp
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
other:python:misc_by_jyp [2021/08/25 10:12] – [Using ordered dictionaries] Added more details jypeter | other:python:misc_by_jyp [2021/08/25 14:40] – [Working with paths and filenames] Improved example jypeter | ||
---|---|---|---|
Line 50: | Line 50: | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
+ | |||
+ | |||
+ | === Example: getting the full path of the Python used === | ||
+ | |||
+ | Note: the actual python may be different from the default python! | ||
+ | |||
+ | < | ||
+ | / | ||
+ | |||
+ | $ / | ||
+ | >>> | ||
+ | >>> | ||
+ | '/ | ||
+ | >>> | ||
+ | '/ | ||
+ | |||
+ | |||
+ | === Example: getting the full path of a script === | ||
+ | |||
+ | < | ||
+ | >>> | ||
+ | '/ | ||
+ | >>> | ||
+ | True | ||
+ | >>> | ||
+ | '/ | ||
+ | >>> | ||
+ | True | ||
+ | </ | ||
+ | |||
=== Example: getting the size(s) of all the files in a directory === | === Example: getting the size(s) of all the files in a directory === |
other/python/misc_by_jyp.txt · Last modified: 2024/11/04 15:01 by jypeter