Quantcast

Edit imported modules

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Edit imported modules

Erica
My program reads from and edits an imported module.  This works fine until I create an executable, which reads from but does not edit the module.

I've tried listing the module as a hook, no success.  There are no error messages when the executable is created and ran.

New to python/pyinstaller, any help is appreciated.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Edit imported modules

davecortesi


My program reads from and edits an imported module.

I do not know what you mean by editing an imported module. However, it sounds as if your program is trying to make a permanent change in a file that is bundled with the program. You can do that to a data file (not a Python module used by "import") but only in the one-FOLDER bundle.

With the one-FILE bundle, the entire bundle, data files and all, is unpacked into a temporary folder which is erased when the program ends.

See http://pythonhosted.org/PyInstaller/operating-mode.html#how-the-one-file-program-works


--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Edit imported modules

Erica
Yes, I'm trying to use my program to make changes in an imported module.  Thanks for the clarification, I'll have to rethink my program.

On Tuesday, September 6, 2016 at 10:46:11 AM UTC-4, davecortesi wrote:


My program reads from and edits an imported module.

I do not know what you mean by editing an imported module. However, it sounds as if your program is trying to make a permanent change in a file that is bundled with the program. You can do that to a data file (not a Python module used by "import") but only in the one-FOLDER bundle.

With the one-FILE bundle, the entire bundle, data files and all, is unpacked into a temporary folder which is erased when the program ends.

See <a href="http://pythonhosted.org/PyInstaller/operating-mode.html#how-the-one-file-program-works" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fpythonhosted.org%2FPyInstaller%2Foperating-mode.html%23how-the-one-file-program-works\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFdTcVLUR2HuxNr5g4B_tSBJoW84g&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fpythonhosted.org%2FPyInstaller%2Foperating-mode.html%23how-the-one-file-program-works\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFdTcVLUR2HuxNr5g4B_tSBJoW84g&#39;;return true;">http://pythonhosted.org/PyInstaller/operating-mode.html#how-the-one-file-program-works


--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.
Loading...