User Profile

Collapse

Profile Sidebar

Collapse
jinsue
jinsue
Last Activity: Aug 8 '10, 10:14 AM
Joined: Oct 3 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • jinsue
    started a topic Passing a socket to another process under Windows

    Passing a socket to another process under Windows

    Searching around the net there are cases where this has been a problem for people as socket.fromfd() and socket.dup() don't exist under Windows.

    Apparently there was a workaround but that kinda didn't work and people suggest patches to recreate the functionality those two functions give but I do not know how to:
    a)Implement a viable workaround or b)Patch my version of Python (2.6.5)

    Apparently workable patch (I've...
    See more | Go to post

  • jinsue
    replied to Tkinter Frame won't destroy() correctly
    It works perfectly now! Thanks so much bvdet for helping with this. I now understand the true significance of your clock example.
    I could die happily right now that I have that solved...

    To who may care, I ended up making a flag that gets checked like this:
    Code:
            def --the setup section--
                self.UListBox.after(5000, self.check_to_update_list)            
    
            def check_to_update_list(self):
    ...
    See more | Go to post

    Leave a comment:


  • jinsue
    replied to Tkinter Frame won't destroy() correctly
    Ahah! So close now. Ok I didn't mention in the OP but the secondary (and thus the call that hangs) call is run from a thread which from a quick google search shows that this is a huge no-no /facepalm. At least now I know.

    So I'm pretty certain that what I have will work as intended, provided I call it from the mainloop()'s thread.
    That makes the million dollar question: how do I get the main (GUI) thread to make the call? It seems...
    See more | Go to post

    Leave a comment:


  • jinsue
    replied to Tkinter Frame won't destroy() correctly
    Upon further testing I have encountered something interesting.
    If in the first run of generate_list() , you build the User objects and then destroy all of anyone of them straight after, it works perfectly. The other frames push together nicely and execution continues happily. When you run it the second time (refreshing the list) and it goes through self.contacts_m ade to destroy anything in it, it hangs.

    Code:
            def generate_list(self):
    ...
    See more | Go to post

    Leave a comment:


  • jinsue
    replied to Tkinter Frame won't destroy() correctly
    Ok, I modified the appropriate sections and everything came out like normal which is good, but upon calling each.destroy() the same problem occurs - the process hangs.

    At this point I think more information would be good about the specifics of what is making it choke up.

    Speculation on my part is now that Tkinter's grid manager might be unhappy with destroying a frame and then the other frames could be trying to all take...
    See more | Go to post

    Leave a comment:


  • jinsue
    replied to Tkinter Frame won't destroy() correctly
    I'm not big on how inheritance works (never needed it), but I understand what you mean.

    In adding in that line to have:
    Code:
    def __init__(self, parent, user_info):
                    Frame.__init__(parent)
                    self.root = parent
                    self.id = user_info[0]
                    self.nick = user_info[1]
                    self.status = user_info[2]
    ...
    See more | Go to post

    Leave a comment:


  • socket.connect | gaierror: [Errno 11004] getaddrinfo failed

    Hi all,
    I am having trouble getting a client/server relationship to connect; receiving the above error.
    Python 2.6.5, Win7

    On one end we have the socket being bound and that is all working with correct (IP) and as far as I know, correct socket settings.
    Code:
    def listen_for_peer_setup(server_connection):
        listening_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        listening_socket.setsockopt(socket.SOL_SOCKET,
    ...
    See more | Go to post

  • jinsue
    replied to Tkinter Frame won't destroy() correctly
    Ah, my bad. Would make sense to include the create function... :)

    I also added in the produce function in case that is making some odd settings.

    Thanks
    See more | Go to post

    Leave a comment:


  • jinsue
    started a topic Tkinter Frame won't destroy() correctly

    Tkinter Frame won't destroy() correctly

    Hi all,
    For the life of me I cannot work out why this is occuring but whenever I try to .destroy() this widget (or its parent) my program hangs - it doesn't crash, it just stops responding so I have to force kill it.
    Python 2.6.5, Windows 7

    Code:
            def generate_list(self):
                """
                Clears off current list and runs through the entire contact list again,
    ...
    See more | Go to post
    Last edited by jinsue; Jul 14 '10, 01:57 AM. Reason: Added more code, namely the create function
No activity results to display
Show More
Working...