I just want a console to run. When I use this function, I don't ever want the automatic tk window to appear. How would I use this function without any gui?

*Also on a side note, what is the python code tag? (python)is it this :P?(/python)

Recommended Answers

All 2 Replies

Here is an example to make the tk window disappear:

import Tkinter as tk
import tkFileDialog

root = tk.Tk()
# show file dialog without Tkinter window
root.withdraw()

filename = tkFileDialog.askopenfilename()

print filename

To see the code tags around this code, temporarily click on the "REPLY W/QUOTE" button.

Thanks, the other time I tried the python tag, I put quotes around "python" xD

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.