Comments you submit will be routed for moderation. If you have an account, please log in first.
Modify

Ticket #488 (new support)

Opened 17 months ago

Last modified 17 months ago

Include javascript file within python executable file

Reported by: rsraman@… Owned by: matysek
Priority: normal Milestone:
Component: PyInstaller Version: 1.5.1
Severity: normal Keywords:
Cc:

Description

I use python to generate html pages to display a set of plots. The page includes javascript functions to dynamically update the contents of the page.

In a python source implementation, I open the javascript file and write it's contents to the webpage I am generating using python. The javascript file is in the same folder as the other python scripts. The execution is done via: python <Name of top level script> <optional parameters>

To access the javascript file within the python scripts, I do the following: file_path = sys.path[0]; (path to the python top level script) fopen( file_path + 'Name of .js file' )

This obviously does not work when I generate an executable using pyinstaller. sys.path[0] will be some OS determined location. Would it be possible for pyinstaller to include the javascript file as well within the exe file? I suppose I can then say, fopen( 'Name of .js file' )

Much appreciate your help!

Ram

Attachments

Change History

View

Add a comment

Modify Ticket

Action
as new
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.