Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Library folder to \documents\PyLib #13

Open
STAATSY opened this issue Feb 4, 2022 · 2 comments
Open

Change Library folder to \documents\PyLib #13

STAATSY opened this issue Feb 4, 2022 · 2 comments

Comments

@STAATSY
Copy link

STAATSY commented Feb 4, 2022

Is it possible to change the target MicroPython library folder to "\documents\PyLib"? I find that the "ndless" (\documents\ndless) folder that it currently looks to becomes a bit crowded if you load a few ndless Apps and tools in there so it would be good to separate out the Python libraries and makes sense to align it with where the CXII OS looks for Python libraries as then if you have a CXII you can test libraries across MicroPython and native execution with the single file copy.

The above doesn't take away from the awesome work you have done so far - great project, very appreciative of your efforts to get this ported and open up the programming options on the TI-Nspire way before TI came to the party :)

@Vogtinator
Copy link
Owner

Is it possible to change the target MicroPython library folder to "\documents\PyLib"?

PRs welcome! Best option is probably to search both.

align it with where the CXII OS looks for Python libraries as then if you have a CXII you can test libraries across MicroPython and native execution with the single file copy.

Are they compatible (enough) in format?

@STAATSY
Copy link
Author

STAATSY commented Feb 6, 2022

Agreed just adding it as a new target may be better. so then it doesn't have any legacy impacts to people already using "\documents\ndless". I did originally try nest my libraries in "\documents\ndless\PyLib" and then use an init.py file to make MicroPython look in the subfolder so my ndless folder didn't get too crowded but I couldnt get it to work hence my request for "\documents\Pylib" target support, I guess if you are appending new targets then you could add "\documents\ndless\PyLib" in case people with CXII want to specifically separate their native python libraries and micropython libraries.

I have not tested so I am not sure if they are compatible (enough). I imagine the TI-OS native side will only see Python libraries in correct .tns format... so I guess it depends what bloat TI adds to a file to make it a real .tns file... if its not too much and its repeatable then the best way would be to modify micropython to ignore the .tns file bloat and only read the Python code... that all assumes its just file bloat and not an encryption / archive type format... In any case that is way out of the scope of my request, but seems like something someone may take an interest in at some point. So it just made sense forr me for all the Python libraries to sit in a common folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants