|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
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.
|
|
#2
|
||||
|
||||
|
Why?
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. have fun, Mark. |
|
#3
|
|||
|
|||
|
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.
|
|
#4
|
||||
|
||||
|
How did you solve the problem agrif? would be interesting to see what you ment and how you overcame the problem.
Thanks, Mark. |
|
#5
|
|||
|
|||
|
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.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > Saving Sockets |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|