Send Close Add comments: (status displays here)
Got it!  This site "www.robinsnyder.com" uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.  Note: This appears on each machine/browser from which this site is accessed.
Code relocatability
by RS  admin@robinsnyder.com : 1024 x 640


1. Code relocatability
In order to avoid copy-update issues whereby code is unnecessarily copied, code can be made relocatable.

What is relocatable code? Relocatable code is code that can determine where it is running and make appropriate decisions.

Examples: Here is the Python code [#1]

Here is the output of the Python code.


2. Python version
For more information, see Python version .

3. Windows or Linux
In general, some way is needed to handle file paths between Windows and Linux. I generally use a pfix routine (for path fix) throughout the code as needed.

Other operating system commands may need to be abstracted as necessary.


4. Other discriminators

5. End of page

by RS  admin@robinsnyder.com : 1024 x 640