#pip install pythonnet pyinstaller
Note: in the code where ever you are using a file directly , use the below function to call that file.
base_path = sys._MEIPASS
base_path = os.path.abspath(".")
return os.path.join(base_path, relative_path)
# resultObj = parseXML(resource_path(xmlName))
# instead of #resultObj = parseXML(xmlName)
pyinstaller — onefile hello.py
Or to add files in the same .exe
pyinstaller — onefile — add-data “*.xml;.” hello.py
Note: The buttons size will shrunk a little and gives the feel of a button click.
I believe that whoever wants to run their server on Heroku is having their server.js file ready and running on their local machine.
# Goto the package.json file and node version you are using like shown below.
I came from GCP where using cloud function is as easy as ordering a pizza from restaurant with required amount of cheese and toppings.
But in AWS it was bit trickier so when we have to use python preinstalled dependencies it is fine but for external dependencies it takes a bridge to be constructed (how’s this one in regard with the pizza analogy…just kidding).
=>python3 -m venv myVirtualEnv
=> pip freeze > requirements. txt
I have been using GCP from past year and worked on cloud functions extensively ( mostly on python ).
In a project came a requirement to use aws lambda function to be used. I thought the task to run a program with some external dependencies ( the one which we install using pip i.e pip install requests) would be easy but guess what, no it wasn’t that straight froward.
Just create the fuction in python
In requirements file give what dependencies are to be used
Thats it when you run the function it downloads the package at the backend and…