Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old July 12th, 2003, 06:54 PM
agrif agrif is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: A:\
Posts: 17 agrif User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 13 sec
Reputation Power: 0
Question Saving Sockets

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.

Reply With Quote
  #2  
Old July 13th, 2003, 11:52 AM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,529 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 17 h 19 m 5 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
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.

Reply With Quote
  #3  
Old July 13th, 2003, 02:32 PM
agrif agrif is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: A:\
Posts: 17 agrif User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 13 sec
Reputation Power: 0
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.

Reply With Quote
  #4  
Old July 14th, 2003, 04:50 PM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,529 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 17 h 19 m 5 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
How did you solve the problem agrif? would be interesting to see what you ment and how you overcame the problem.

Thanks,
Mark.

Reply With Quote
  #5  
Old July 16th, 2003, 01:25 PM
agrif agrif is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: A:\
Posts: 17 agrif User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 13 sec
Reputation Power: 0
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > Saving Sockets


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway