User Profile

Collapse

Profile Sidebar

Collapse
v13tn1g
v13tn1g
Last Activity: Apr 23 '09, 04:31 AM
Joined: Feb 7 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • v13tn1g
    replied to results from query to textbox in GUI
    as you can see from my query1 function i tried the insert it into a text field but it wont work
    See more | Go to post

    Leave a comment:


  • v13tn1g
    started a topic results from query to textbox in GUI

    results from query to textbox in GUI

    so basically..what i have done is created a database, populated it and call that database from the GUI. When a user searches something in the database through the GUI, the result of the query displays next to the entry field. However, I need to display the results in a text field, for such instances where the results is really long. How do i do that?

    Code:
    from Tkinter import *
    import analyse
    
    
        
    def
    ...
    See more | Go to post

  • v13tn1g
    replied to GUI text entry tkinter
    hahha thanks bvdet it works perfectly!! btw i had to add it before the names were mentioned.
    See more | Go to post

    Leave a comment:


  • v13tn1g
    replied to GUI text entry tkinter
    how would i do that?..i've never learnt about global before..:s...
    See more | Go to post

    Leave a comment:


  • v13tn1g
    replied to GUI text entry tkinter
    hmm acutally inputting that code didn't work :s, it still says q1_data is not defined
    See more | Go to post

    Leave a comment:


  • v13tn1g
    replied to GUI text entry tkinter
    ahh thanks boxfish!!...
    See more | Go to post

    Leave a comment:


  • v13tn1g
    replied to GUI text entry tkinter
    for some reason that isnt working for me...

    Code:
    def evClear():
        q1_data.delete(0,END)
        q2_data.delete(0,END)
        q3_data.delete(0,END)
        q3_data2.delete(0,END)
        
    
    def quit(window):
        window.destroy()
    
    def run_analyse(db):
        window = Tk()
        
       
        frame = Frame(window)
        frame.pack()
        
        q1_prompt
    ...
    See more | Go to post

    Leave a comment:


  • v13tn1g
    started a topic GUI text entry tkinter

    GUI text entry tkinter

    so basically my GUI window has 4 text entries where the user inputs stuff. i have created a clear button with in my window, the thing that i was wondering is how do i create a function to associate with the clear button to clear all text entries entered by the user?.

    thanks
    See more | Go to post

  • v13tn1g
    replied to very simple string to list function
    solved:) the problem
    See more | Go to post

    Leave a comment:


  • v13tn1g
    started a topic very simple string to list function

    very simple string to list function

    the question that im wondering is how do i split into one list of str, say "123456789" into for every third value

    so the output would be ['123' , '456' , '789']

    thanks
    See more | Go to post

  • v13tn1g
    replied to file to nested list
    ah ok now i see...thanks for your repliess!!
    See more | Go to post

    Leave a comment:


  • v13tn1g
    replied to file to nested list
    i think im close...can you debug my code

    Code:
    import urllib
    
    def qwerty(f):
        
        a = urllib.urlopen(f)
        s = ""
        l = a.readlines()
        y = s.join(l)
        #p = y.replace('\r', "")
        q = y.split('\r')
        
        output = [] 
      
        for item in q: 
            if item.startswith('>'): 
                output.append([item.strip(),
    ...
    See more | Go to post

    Leave a comment:


  • v13tn1g
    replied to file to nested list
    is your way by using a while loop?...=S(whic h i hate)..
    See more | Go to post

    Leave a comment:


  • v13tn1g
    replied to file to nested list
    yep that makes a lot of sense, and i understand fully what your trying to say except i forgot to say that the file could also be

    file =

    >123
    qwerty
    ioweio
    >567
    tyuiyuy
    >987
    poiuyt

    output = [[">123" , "qwertyiowe io"] , [">567" , "tyuiuy"] , ["987" , "poiuyt"]]

    the output for...
    See more | Go to post

    Leave a comment:


  • v13tn1g
    started a topic file to nested list

    file to nested list

    I'm having alot of troubles with this...so basically i am given a file for example:

    File =

    >123
    qwerty
    >567
    tyuiyuy
    >987
    poiuyt

    and basically the output is supposed to be [[">123" , "qwerty"] , [">567" , "tyuiuy"] , ["987" , "poiuyt"]]

    i have no idea how to do that can someone help...
    See more | Go to post

  • v13tn1g
    replied to file to dictionary
    I think i know why i got that error, its because i tested a file such as

    Code:
    s = '''
    dfs ghj hge
    abc def ghj
    jkl def jkk
    uio def asd
    '''
    the first line did not have the seperator hence the error.

    also another thing if the test file were to be

    Code:
    s = '''
    dfs ghj hge
    abc def ghj
    jkl def jkk
    uio def asd
    dfs def qwe
    '''
    since...
    See more | Go to post

    Leave a comment:


  • v13tn1g
    replied to file to dictionary
    Code:
    import urllib
    
    def file_to_dict(a, s):
        '''Return a dictionary that contains the contents of each line in a given 
        open file as a key-value pair. The file contains lines of the form key 
        separator value, where separator is the second parameter of the function. 
        There may be more than one occurrence of the separator in the line; 
        the key is before the first one - all others are part
    ...
    See more | Go to post

    Leave a comment:


  • v13tn1g
    replied to merging dictionaries
    in this case you imported copy, what is that?
    See more | Go to post

    Leave a comment:


  • v13tn1g
    started a topic merging dictionaries

    merging dictionaries

    so basically i've written most of the code the only problem that i'm having is that the output that it gives me will not return a key with a different type. It will either return me keys with only int, or only str..for example

    Code:
    def merge_dictionaries(d1, d2):
        '''Return a dictionary that is the result of merging the two given 
        dictionaries. In the new dictionary, the values should be lists. If a key
    ...
    See more | Go to post

  • v13tn1g
    replied to file to dictionary
    yep i've tried to code it myself but what i have so far is i've basically made the file into a string and then in split it using the seperator. it's just that now im stuck with the word before the seperator as the key and after the seperator as the value.
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...