User Profile

Collapse

Profile Sidebar

Collapse
Varunkrishna
Varunkrishna
Last Activity: Nov 2 '13, 06:05 PM
Joined: May 6 '13
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Varunkrishna
    started a topic what is _show in python / TkMessageBox?

    what is _show in python / TkMessageBox?

    I was learning python(v2.7) and Tkinter. Suddenly I came across the module TkMessageBox in that I came across a strange thing _show
    Code:
    def askyesnocancel(title=None, message=None, **options):
        "Ask a question; return true if the answer is yes, None if cancelled."
        [B]s = _show(title, message, QUESTION, YESNOCANCEL, **options)[/B]
        # s might be a Tcl index object, so convert it to a string
        s = str(s)
    ...
    See more | Go to post

  • @bdvet
    I had tried the following to display the filenames within a label
    The first method is to display full path and the filename
    Code:
    self.Label1.config(text=filename, fg="blue")
    The second way is to display only the filename
    Code:
    self.Label1.config(text=os.path.basename(filename), fg="blue")
    both seems to be working.
    See more | Go to post

    Leave a comment:


  • @bdvet
    Please refer line no 26.
    Code:
    self.Label1.config(text=filename, fg="blue")
    I tried it. Is it the correct way to do ?
    See more | Go to post

    Leave a comment:


  • @bvdet
    Thank you for your help. It is working,but I want only the filename not the full path. And initially it should display 'No files uploaded' in red colour. If the file is updated it must display a file name in some colour(Green). How can I do it any ideas ?
    See more | Go to post

    Leave a comment:


  • Varunkrishna
    started a topic Displaying filenames in python tkinter

    Displaying filenames in python tkinter

    I am currently working on a translator project, in which the input will be a text file, that is created in English and I want the same to be translated to German. So I have used askopenfilename to look for files to be selected after selecting the file the name of the file should be displayed in the label button.How do I display the file name within the label button is that possible?
    Code:
    import Tkinter as tk
    from tkFileDialog import
    ...
    See more | Go to post
No activity results to display
Show More
Working...