Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Standalone application
#6
Quote:In this code ""G:\\div_code\\open_hardware\\*;."" what this mean ? It is path to some file ? I dont get it from where you have open_hardware file.
File structure.
G:\div_code\
  |-- open_hardware\
    |-- open_temp.py
    |-- OpenHardwareMonitor.exe
    |-- OpenHardwareMonitor.config
    |-- rest of files from OpenHardwareMonitor
So all is done from command line,here some navigate i use cmder use dir instead ls in cmd.
G:\div_code
λ cd open_hardware\

# list files in open_harware folder
G:\div_code\open_hardware
λ ls
Aga.Controls.dll*           OpenHardwareMonitor.exe*     OxyPlot.dll*  dist/           temp_show.py
License.html                OpenHardwareMonitorLib.dll*  __pycache__/  open_temp.py
OpenHardwareMonitor.config  OxyPlot.WindowsForms.dll*    build/        open_temp.spec

# Test that pyinstaller is installed
G:\div_code\open_hardware
λ pyinstaller --version
3.6

# Test python
G:\div_code\open_hardware
λ python -V
Python 3.8.3

# Cd to dist
G:\div_code\open_hardware
λ cd dist

G:\div_code\open_hardware\dist
λ ls
open_temp/

G:\div_code\open_hardware\dist
λ cd open_temp\

# Test that open_temp.exe work
G:\div_code\open_hardware\dist\open_temp
λ open_temp.exe
CPU Core #3
39.0
CPU Core #4
37.0
CPU Core #5
43.0
CPU Core #6
43.0
Temperature
29.0
GPU Core
32.0
Temperature
29.0
Auxiliary
37.5
System
34.0
CPU Core #1
49.0
CPU Core #2
40.0
Press Enter to exit
SUCCESS: Sent termination signal to the process "OpenHardwareMonitor.exe" with PID 39700.

G:\div_code\open_hardware\dist\open_temp
λ
So in code over this command under here is already run.
This command means take all files \\* in folder open_hardware folder and place it in root folder . of pyinstaller dist\open_temp folder.
G:\div_code\open_temp folder.
λ pyinstaller --onedir --add-data "G:\\div_code\\open_hardware\\*;." open_temp.py
Reply


Messages In This Thread
Standalone application - by samuelbachorik - Jul-31-2020, 06:39 PM
RE: Standalone application - by Gribouillis - Jul-31-2020, 06:46 PM
RE: Standalone application - by samuelbachorik - Jul-31-2020, 06:59 PM
RE: Standalone application - by snippsat - Aug-01-2020, 12:14 AM
RE: Standalone application - by samuelbachorik - Aug-01-2020, 12:25 PM
RE: Standalone application - by snippsat - Aug-01-2020, 01:10 PM
RE: Standalone application - by samuelbachorik - Aug-02-2020, 11:37 AM
RE: Standalone application - by snippsat - Aug-02-2020, 01:02 PM
RE: Standalone application - by samuelbachorik - Aug-02-2020, 01:57 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question [SOLVED] Tiny web server as standalone executable? Winfried 0 1,286 Feb-09-2024, 11:48 AM
Last Post: Winfried
  How to send data from a python application to an external application aditya_rajiv 1 3,121 Jul-26-2021, 06:00 AM
Last Post: ndc85430
  Run an app in a standalone terminal and wait until it's closed glestwid 2 3,589 Aug-30-2020, 08:14 AM
Last Post: glestwid
  Python 3.4: the only release to create .EXE standalone without .dll samsonite 7 7,602 Feb-28-2019, 09:20 AM
Last Post: samsonite
  Standalone interpreter? stf92 2 3,727 Mar-11-2018, 12:33 AM
Last Post: stf92
  Correct way to import from a standalone module in a different location chowder 3 19,983 Dec-16-2017, 07:44 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020