Skip to content

Can I import a self-generated python script on runtime? #6655

Answered by bwoodsend
ToasterUwU asked this question in Help
Discussion options

You must be logged in to vote

In this very specific case, I cant. Explaining why would take some time that would be wasted since I know dynamically making the code is my only option.

I seen so many people come to this conclusion at some point and every time they've been wrong so I'm afraid that I don't believe you.

When is this code generated? Before you run PyInstaller or at runtime? PyInstaller won't stop you doing either but if it's at runtime then you'll have to be careful where you write that generated file to because there's a good chance that the rest of your code will be installed into a directory requiring privileged access to write to.

The rules for importing files are pretty straight forward and are ident…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@ToasterUwU
Comment options

Answer selected by ToasterUwU
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants