First test of a windows .exe file.
First test of a windows .exe file.
This commit is contained in:
parent
97ef58701a
commit
26e19a8108
15
README.md
15
README.md
@ -13,7 +13,9 @@ The "Traffic_Creator.py" and "traffic_test.xml" files should be extracted to any
|
||||
|
||||
Traffic_Creator.py can be run either through an IDE or directly from the directory via the command line/terminal by typing "python3 Traffic_Creator.py" without the quotes.
|
||||
|
||||
In windows you can open the terminal from the directory the files are in by clicking in the address bar and typing cmd then enter.
|
||||
In windows you can open the terminal from the directory the files are in by clicking in the address bar and typing cmd then enter.
|
||||
|
||||
**See bottom of this text for a Windows Executable.**
|
||||
|
||||
The program should be self explanatory if you have delt with traffic files before but if not I suggest reading up about them on the Wiki first. -
|
||||
[Wiki.flightgear](http://wiki.flightgear.org/AI_Traffic) (link also in program).
|
||||
@ -28,7 +30,16 @@ When finished save the file with the name of your choice, all being well it can
|
||||
|
||||
This is not an xml editor, it can not edit traffic files, I created it to quickly write test or local files so it's not really a program for writing or editing airline schedules.
|
||||
|
||||
|
||||
|
||||
### Windows Executable
|
||||
|
||||
First test of a windows .exe file.
|
||||
|
||||
In the "windows_64" folder is a zip file (Traffic_Creator.zip) extract the contents of the zip into a folder that has *write access* and run the "Traffic_Creator.exe" file.
|
||||
|
||||
**This has been tested on several windows 10 computers with no problems but I believe it only runs on 64 bit machines.**
|
||||
### Disclaimer
|
||||
This is my first Python program so any errors and bugs are entirely down to me. ;)
|
||||
|
||||
Written on windows 10 in PyCharm and tested with Linux Mint in Virtualbox with no problems.
|
||||
Written on windows 10 in PyCharm and tested with Linux Mint in Virtualbox with no problems.
|
@ -2,9 +2,7 @@ import tkinter as tk
|
||||
from tkinter import ttk
|
||||
from tkinter import filedialog
|
||||
from tkinter import messagebox
|
||||
# from tkinter.filedialog import askopenfile
|
||||
import webbrowser
|
||||
# import os
|
||||
import sys
|
||||
|
||||
tg = ['<?xml version="1.0"?>', '<trafficlist>', '</trafficlist>', ' <aircraft>', ' </aircraft>',
|
||||
@ -26,7 +24,7 @@ open("traffic_test.xml", "w").close()
|
||||
|
||||
root = tk.Tk()
|
||||
root.geometry('1000x768')
|
||||
root.title('AI Traffic File Creator For FlightGear')
|
||||
root.title('AI Traffic File Creator For FlightGear - Author Brett Harrison (gooneybird)')
|
||||
|
||||
# Redirect Print To File
|
||||
|
||||
@ -52,13 +50,6 @@ root.protocol("WM_DELETE_WINDOW", on_closing)
|
||||
def close_output():
|
||||
sys.stdout.close()
|
||||
|
||||
# ("traffic_test.xml").close
|
||||
|
||||
# if sys.platform == 'linux2':
|
||||
# subprocess.call(["xdg-open", 'traffic_test.xml'])
|
||||
# else:
|
||||
# os.startfile('traffic_test.xml')
|
||||
|
||||
with open("traffic_test.xml", 'r+') as finp:
|
||||
outp = finp.read()
|
||||
out_all = '<?xml version="1.0"?>\n' + '<trafficlist>\n' + outp + '</trafficlist>'
|
||||
|
BIN
__pycache__/Traffic_Creator.cpython-38.pyc
Normal file
BIN
__pycache__/Traffic_Creator.cpython-38.pyc
Normal file
Binary file not shown.
@ -1,45 +0,0 @@
|
||||
<!-- -->
|
||||
<aircraft>
|
||||
<model>Aircraft/</model>
|
||||
<livery></livery>
|
||||
<airline></airline>
|
||||
<home-port></home-port>
|
||||
<required-aircraft></required-aircraft>
|
||||
<actype></actype>
|
||||
<offset>0</offset>
|
||||
<radius></radius>
|
||||
<flighttype>ga</flighttype>
|
||||
<performance-class>light_aircraft</performance-class>
|
||||
<registration></registration>
|
||||
<heavy>false</heavy>
|
||||
</aircraft>
|
||||
<flight>
|
||||
<callsign></callsign>
|
||||
<required-aircraft></required-aircraft>
|
||||
<fltrules>IFR</fltrules>
|
||||
<departure>
|
||||
<port></port>
|
||||
<time></time>
|
||||
</departure>
|
||||
<cruise-alt></cruise-alt>
|
||||
<arrival>
|
||||
<port></port>
|
||||
<time></time>
|
||||
</arrival>
|
||||
<repeat></repeat>
|
||||
</flight>
|
||||
<flight>
|
||||
<callsign></callsign>
|
||||
<required-aircraft></required-aircraft>
|
||||
<fltrules>IFR</fltrules>
|
||||
<departure>
|
||||
<port></port>
|
||||
<time></time>
|
||||
</departure>
|
||||
<cruise-alt></cruise-alt>
|
||||
<arrival>
|
||||
<port></port>
|
||||
<time></time>
|
||||
</arrival>
|
||||
<repeat></repeat>
|
||||
</flight>
|
BIN
windows_64/Traffic_Creator.zip
Normal file
BIN
windows_64/Traffic_Creator.zip
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user