User Profile

Collapse

Profile Sidebar

Collapse
bkunjitam
bkunjitam
Last Activity: Nov 2 '07, 08:19 AM
Joined: Nov 8 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • bkunjitam
    started a topic Problems with \t and \b characters

    Problems with \t and \b characters

    hi!

    I have a string as "C:\local\test\ new"
    Let us say str="C:\local\t est\new"

    I want to extract the part \test\new and print it on the console as such.
    i.e is my desired output is:
    \test\local (which is to be printed)

    I am facing the following problem:
    when i am using the function
    print str.split("C:\l ocal")[1]
    ...
    See more | Go to post

  • bkunjitam
    replied to What is your OS and Python Version
    WINDOWS - XP
    Python 2.5

    Editor : IDLE

    thanks,
    BK
    See more | Go to post

    Leave a comment:


  • bkunjitam
    started a topic Can a Python script be invoked like a exe?

    Can a Python script be invoked like a exe?

    Hi,

    I have a file say GUI.py which on executing (F5 in IDLE) would display the GUI with some check buttons, text field.

    Is there any way that the same script be invoked like a exe file.
    Something like double clicking an exe.

    If yes, then how do i do that?

    Kindly help me in this regard.

    thanks,
    BK
    See more | Go to post

  • Thanks a lot.

    regards,
    BK
    See more | Go to post

    Leave a comment:


  • How to disable a entry field when a button is clicked.

    Hi,

    I am using Python 2.5.

    I have an entry field and a radio button.

    I need to disable the entry field when the radio button is selected. How do i change the state to DISABLED in run time.

    Kindly help me out.

    Thanks,
    Bkunjitam
    See more | Go to post

  • How to know when a folder is copied in Cygwin using Sendkeys

    Using python (Python 2.5) I am invoking a cygwin session by the following code.

    Code:
    from win32com.client import *
    
    a = Dispatch("Wscript.Shell")
    
    a.Run("C:/cygwin/cygwin.bat");
    The cygwin window is prompted open. Now in the cygwin shell, i issue the following command using "SendKeys"

    Code:
    a.SendKeys ("cp -r src_path dest_path"+
    ...
    See more | Go to post

  • The problem i am facing is it that during the course of the execution of the script, if knowingly or unknowingly any text editor is opened, the remaining command inside the "a.SendKeys " command is displayed there.

    I have no clue why is such a thing happening.

    Code:
    a.Run("C:/cygwin/cygwin.bat");   #invokes the cygwin session
    a.SendKeys ("cd D:/temp/code" + "{Enter}")
    ...
    See more | Go to post

    Leave a comment:


  • bkunjitam
    replied to How to add a drop down box in Python GUI
    Yes, I am using Tkinter....
    See more | Go to post

    Leave a comment:


  • bkunjitam
    started a topic How do i set a limit in an Entry widget

    How do i set a limit in an Entry widget

    Hi,

    I have an Entry widget where in i can enter string.

    Clarifications needed:

    1. The user should not be able to exceed 15 characters at the max in the Entry widget. How do i set the limit for the same.

    2. The user should not be able to enter "SPACE". Is there any such provisions for the same?

    Can the same be done in Text widget?
    See more | Go to post

  • bkunjitam
    replied to How to add a drop down box in Python GUI
    Hi,

    My intention is to have a drop down box (with edit facility) which would have several ip addresses. The user either can select an existing one or else type a new ip.

    I could find spinbox option but thats not editable.

    So how do i create such a drop down box?

    Thanks,
    Badri
    See more | Go to post

    Leave a comment:


  • bkunjitam
    replied to How to add a drop down box in Python GUI
    If that is so, could u please help me in this regard. Are there any pre requisites for the issue?

    Thanks,
    BK...
    See more | Go to post

    Leave a comment:


  • bkunjitam
    started a topic How to validate IP address in Python

    How to validate IP address in Python

    Hi,

    My programme has a text box where in user enters the ip address. I need to validate the IP (like no space allowed in the entry, the numerals should not exceed 255, not more than 3 dots allowed overall, no consecutive dots allowed etc.,.). How do i go about the same? Is there any built in function for the same?

    thanks,
    Badri
    See more | Go to post

  • bkunjitam
    started a topic How to add a drop down box in Python GUI

    How to add a drop down box in Python GUI

    Hi,

    How do i add a drop down box with few pre-populated strings in the same?
    I could find list box and drop down menu in the HELP document of Python, but not drop down box.

    Please help me in this.

    Thanks,
    BK
    See more | Go to post

  • message getting displayed in another window when invoked

    I am invoking a cygwin session by the following code

    Code:
    from win32com.client import *
    
    a = Dispatch("Wscript.Shell")
    
    a.Run("C:/cygwin/cygwin.bat");  
    
    a.SendKeys ("cd D:/temp/code" + "{Enter}")
    
    a.SendKeys ("ls -lrt?" + "{Enter}")
    Scenario: If another window namely NOTEPAD is invoked...
    See more | Go to post

  • bkunjitam
    replied to Regarding searching of strings
    Thanks a lot Fredrik. It was very helpful

    Thanks,
    BK...
    See more | Go to post

    Leave a comment:


  • bkunjitam
    replied to Regarding searching of strings
    Hi,

    As far as my understanding goes, its only when it starts with "Name:" i can use the code snippet provided. But what if i need to search for the string "Name:" and display the values corresponding to it.

    e.g if i have a format like mentioned below:

    ### Name: John
    Age: 23

    *** Name: Paul
    Age: 24

    Here how do i go about searching...
    See more | Go to post

    Leave a comment:


  • bkunjitam
    started a topic Regarding searching of strings

    Regarding searching of strings

    i am a beginner in Python. I have a query.

    I have a .txt file which has entries in the following manner:

    Name: John
    Age: 21

    Name: Paul
    Age:23

    I need to search for the string "Name" and display all the values corresponding to the string that i am searching for. In this case the result should be John and Paul.
    I am a bit confused with the re.search() function....
    See more | Go to post
No activity results to display
Show More
Working...