July 12th, 2003, 07:54 PM
I was wondering wether or not you can save a socket class instance to a file. Pickle and marshal don't work, so i was hoping there is an alternative to these to that can save all classes possible. I need to know this because unless my threading gui for the chat program i'm working on works, I need two seperate programs to work on the same socket at once. Thanks in advance.
July 13th, 2003, 12:52 PM
I'm a little unclear about what you mean, not having done much with socket. If you want to store a class why not just write a module and then import it? I know Pickle/Cpickle allow you to do it but i never really understood why you would want to?
Any expliation would be good, thanks.
July 13th, 2003, 03:32 PM
Well, i wanted to save an open socket to a file so that two programs can use the same socket. It's sopposed to be an easier alternative to threading, just having two seperate programs. But i would need to save the open socket. Anyway, i figured out how to fix my threading problem, so i just have to work out a few bugs and i'll have a simple chat client/server.
July 14th, 2003, 05:50 PM
How did you solve the problem agrif? would be interesting to see what you ment and how you overcame the problem.
July 16th, 2003, 02:25 PM
well, i don't really know. I just switched what the threads did. I had the main thread do the receiving and the new thread handle Tkinter and sending. I guess that new threads can't handle infinite loops.