unix port does not support PYTHONPATH?

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
yjchun
Posts: 10
Joined: Fri Aug 27, 2021 8:04 pm

unix port does not support PYTHONPATH?

Post by yjchun » Thu Jan 06, 2022 5:39 am

It seems PYTHONPATH is not recognized by unix port of micropython. How do you set import path for unix micropython, without modifying source code?
And if I have to modify sys.path for unix micropython, where is good place put the code? Is there a bootstrap script for unix port?

I want to use unix micropython to run test scripts quickly without installing firmware.

stijn
Posts: 735
Joined: Thu Apr 24, 2014 9:13 am

Re: unix port does not support PYTHONPATH?

Post by stijn » Thu Jan 06, 2022 7:22 am

MICROPYPATH is the equivalent. Would make no sense to use PYTHONPATH because that would make it very awkward to use both Python and MicroPython.

I don't think any 'bootstrap script' or similar is implemented for PC ports.

yjchun
Posts: 10
Joined: Fri Aug 27, 2021 8:04 pm

Re: unix port does not support PYTHONPATH?

Post by yjchun » Thu Jan 06, 2022 9:34 am

Thank you. Problem solved.

Post Reply