diff --git a/README.md b/README.md index 7e36815..86e7f13 100644 --- a/README.md +++ b/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. \ No newline at end of file diff --git a/Traffic_Creator.py b/Traffic_Creator.py index 6f46151..9e63c3d 100644 --- a/Traffic_Creator.py +++ b/Traffic_Creator.py @@ -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 = ['', '', '', ' ', ' ', @@ -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 = '\n' + '\n' + outp + '' diff --git a/__pycache__/Traffic_Creator.cpython-38.pyc b/__pycache__/Traffic_Creator.cpython-38.pyc new file mode 100644 index 0000000..acb60c8 Binary files /dev/null and b/__pycache__/Traffic_Creator.cpython-38.pyc differ diff --git a/traffic_test.xml b/traffic_test.xml index 08036ca..e69de29 100644 --- a/traffic_test.xml +++ b/traffic_test.xml @@ -1,45 +0,0 @@ - - - Aircraft/ - - - - - - 0 - - ga - light_aircraft - - false - - - - - IFR - - - - - - - - - - - - - - - IFR - - - - - - - - - - - diff --git a/windows_64/Traffic_Creator.zip b/windows_64/Traffic_Creator.zip new file mode 100644 index 0000000..8f3019f Binary files /dev/null and b/windows_64/Traffic_Creator.zip differ