User Profile

Collapse

Profile Sidebar

Collapse
somialis
somialis
Last Activity: Sep 10 '07, 07:41 AM
Joined: Mar 21 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • somialis
    replied to Problem using wxPython
    hey hi...
    the code snippet u had posted as an example worked. I created a GUI of my own...rather than using the already available one.It's working the way i wanted it to....:)
    thanks!! :)...
    See more | Go to post

    Leave a comment:


  • somialis
    replied to Problem using wxPython
    Hi,
    This does not serve my purpose. I want to set some value in a box thru my script which wud have ,otherwise,been set by clicking on a browse tab and then selecting a file by a mouse click....
    See more | Go to post

    Leave a comment:


  • somialis
    replied to Problem using wxPython
    Hi,
    Please help me out with the problem. Did u find some way out of it??...
    See more | Go to post

    Leave a comment:


  • somialis
    replied to Problem using wxPython
    Hi,
    Did u see it?? it's still not working!!...
    See more | Go to post

    Leave a comment:


  • somialis
    replied to Problem using wxPython
    Did according to what u suggested. No change in the output. It is the same as before: :(
    Code:
    c:\pst\pst_modified\DeviceCommsLayer_984_v6_00.py
    in update
    and nothing was reflected in the GUI!! :(...
    See more | Go to post

    Leave a comment:


  • somialis
    replied to Problem using wxPython
    Hi,
    My script looks something like this
    Code:
    import traceback
    import thread
    import pst
    import petShopTest
    
    class newclass:
    
        def __init__(self):
            newApp = petShopTest.MyApp(0)
            newFrame = petShopTest.MyFrame(None, -1, "PetShopTest")
            self.testsetup = pst.TestSetup()
            self.Log = logging.getLogger('GUI')
    ...
    See more | Go to post

    Leave a comment:


  • somialis
    replied to Problem using wxPython
    i called UpdateInterface with a known filename sa input...this time the dialog did not open ...however the GUI remained empty i.e the column where the file name(after it is selected thru the GUI) is reflected, remained vacent....
    See more | Go to post

    Leave a comment:


  • somialis
    replied to Problem using wxPython
    Hi,
    I did what u had asked, when i call the function "OnBrowseForDev iceWrapperFile" , it opens a dialog but i have to manually select the file and click on open. It is not doing it on it's own....
    See more | Go to post

    Leave a comment:


  • somialis
    replied to Problem using wxPython
    Cudn't get u...let me explain it a bit....
    thr's one function which looks like this
    Code:
        def OnBrowseForDeviceWrapperFile(self, event):
            '''Allows the user to select a 'device wrapper' file via a dialog.'''
            
            dlg = wx.FileDialog(
                self, message="Choose a Device Wrapper file",
                wildcard=deviceWrapperFileFilter, style=wx.OPEN|wx.CHANGE_DIR)
    ...
    See more | Go to post

    Leave a comment:


  • somialis
    started a topic Problem using wxPython

    Problem using wxPython

    Hi,
    i have a GUI and my GUI Toolkit is wxPython. Now when the GUI opens...whateve r tabs and buttons i click...an action is performed. Each mouse click is an event and it is processed in the script accordingly.

    Now i want to operate that GUI without using the mouse..i'e thru my script....

    for example...in the original python script...there is a function "OnBrowseForRep ort Directory". When i click...
    See more | Go to post

  • ok...now i understood!!
    Thanks a lot!!...
    See more | Go to post

    Leave a comment:


  • dint get ur question.
    I just included this line

    Code:
    line = line.strip().split(",")
    in place of this
    Code:
    line = line.strip().split()
    ...
    See more | Go to post

    Leave a comment:


  • hey it worked this time.
    thanks a ton!! :)...
    See more | Go to post

    Leave a comment:


  • i haven't changed the format. My csv file is the same as it was before.It's like this only:

    List Of Individual Patches
    1 00;01;
    2 00;
    3 01;
    4 02;
    5 00;01;02;
    6 01;02;
    7 01;02;03;04;05;
    8 01;02;03;04;05; 06;
    9 00;01;02;03;05;
    10 01;02;03;05;
    11 02;03;05;06;
    12 04;
    13 01;02;03;05;08; 09;
    14 00;01;02;03;05; 09;
    15 00;01;02;03;05; 09;10;...
    See more | Go to post

    Leave a comment:


  • The output of your code is as follows:

    Code:
    [',List', 'Of', 'Individual', 'Patches'] <type 'list'> ,List Of
    Press to continue:
    ['1,00;01;'] <type 'list'> 1,00;01;
    Traceback (most recent call last):
      File "<stdin>", line 1, in ?
      File "my.py", line 12, in main
        print line, type(line), line[0], line[1]
    IndexError: list index out of range
    ...
    See more | Go to post

    Leave a comment:


  • Hi,
    it's still not working....thr' s something tht i wud like to tell.
    If u put a " print line" statement after
    line = line.strip().sp lit()
    u'll c that it prints the entire csv file and reaches the end. After tht when u compare choice with line[0] ...the condition does not satisfy becauseline[0] contains the last line of the csv file....
    See more | Go to post

    Leave a comment:


  • it dint work even now. Let me tell u wht i did:

    1) created a file new.py
    2) Wrote the following code:
    Code:
    import os
    import sys
    import csv
    
    def main(argv):
    
        choice = sys.argv[1]
        fp = open("c:\pst\pst_modified\log_4_0.csv",'r')
        for line in fp:
         line = line.strip().split()
         if choice == line[0]:
              print
    ...
    See more | Go to post

    Leave a comment:


  • plz ignore the above mentioned error. i had done some mistake in naming the variable. The error is actually the same as before as soon as i type the following line:

    dd = file_data(open( 'my_file').read lines())

    Code:
    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    File "<stdin>", line 4, in file_data
    ValueError: invalid literal for int(): Of
    ...
    See more | Go to post

    Leave a comment:


  • now as soon as i typed the line :

    dd = file_data(open( 'my_file').read lines())

    it showed the following error:

    Code:
    Traceback (most recent call last):
      File "<stdin>", line 1, in ?
      File "<stdin>", line 4, in file_data
    ValueError: invalid literal for int(): Of
    [/QUOTE]...
    See more | Go to post

    Leave a comment:


  • now as soon as i typed the line :

    dd = file_data(open( 'my_file').read lines())

    it showed the following error:

    Code:
    Traceback (most recent call last):
      File "<stdin>", line 1, in ?
      File "<stdin>", line 4, in file_dat
    IndexError: list index out of range
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...