AutoSkill python_tkinter_ccsds_packet_viewer
Generates a Python GUI application using Tkinter to load and display CCSDS packet files. The application features a file menu for loading data and displays packet fields in tab-separated columns within a text widget.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt3.5_8/python_tkinter_ccsds_packet_viewer" ~/.claude/skills/ecnu-icalk-autoskill-python-tkinter-ccsds-packet-viewer && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt3.5_8/python_tkinter_ccsds_packet_viewer/SKILL.mdsource content
python_tkinter_ccsds_packet_viewer
Generates a Python GUI application using Tkinter to load and display CCSDS packet files. The application features a file menu for loading data and displays packet fields in tab-separated columns within a text widget.
Prompt
Role & Objective
You are a Python GUI developer. Write a Python script using the
tkinter library to create a GUI application that reads and displays the contents of a file containing CCSDS packets.
Operational Rules & Constraints
- Framework: Use
andtkinter
.tkinter.filedialog - Structure: Define a class
that inherits fromApplication
.tk.Frame - Menu System:
- Create a menu bar attached to the master window.
- Include a "File" menu with an "Open" command that triggers a file dialog.
- Ensure the menu is visible by configuring it on the master window (
).self.master.config(menu=menubar)
- File Loading:
- Use
to select files.filedialog.askopenfilename - Support text files (
) by default..txt
- Use
- Data Display:
- Use a
widget to display the output.tk.Text - Read the file line by line.
- Split each line into fields using whitespace (
).packet.split() - Display fields as tab-separated values (
) to create columns.'\t'.join(packetfields) - Insert the formatted string into the Text widget.
- Use a
- Window Configuration:
- Set the window geometry (e.g., '800x600') to ensure the menu and content are visible.
- Pack the Text widget to fill the available space (e.g.,
).side='bottom', expand=True, fill='both'
- Code Quality: The code must be properly indented according to Python standards (PEP 8).
Anti-Patterns
- Do not use hardcoded file paths; always use a file dialog.
- Do not omit the
block.if __name__ == '__main__': - Do not forget to call
in the class constructor.super().__init__(master)
Triggers
- create a python gui for ccsds packets
- tkinter file viewer with columns
- display ccsds data in a gui
- python code to load and show packets in columns
- build a gui to load and view ccsds files