[Twisted-Python]need clarification on "save an received file"
Hi all, My application receiving a file
How can i save
Should i create an object of
How to check whether i received complete file or not? and what about
I need one clarification on this, my appplication is of server-client application, so when server receives a file through socket, will that file will be saved in /temp/workfile ? or should i use a socket handler with file object to receive that file ? ----- Original Message ---- From: Jean-Paul Calderone <exarkun@divmod.com> To: Twisted general discussion <twisted-python@twistedmatrix.com> Sent: Tuesday, 19 February, 2008 7:26:43 PM Subject: Re: [Twisted-Python] save an received file On Tue, 19 Feb 2008 19:14:26 +0530 (IST), Raj kumar <k_r_a_j_kumar@yahoo.co.in> wrote: through a socket. that file to my own folder or path. that? the original copy of the file which i received?
should i destroy it? Thanks in advance.
The Python tutorial covers files i/o: http://www.python.org/doc/tut/node9.html#SECTION009200000000000000000 If that's not what you're asking about, you need to be more specific. Jean-Paul _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python Get your domain and website for less than Rs.100/month*. Go to http://in.business.yahoo.com/
On Feb 19, 2008 11:41 PM, Raj kumar <k_r_a_j_kumar@yahoo.co.in> wrote:
I need one clarification on this, my appplication is of server-client application, so when server receives a file through socket, will that file will be saved in /temp/workfile ? or should i use a socket handler with file object to receive that file ?
I would try to help you my friend, but I have no earthly idea what you're talking about. /temp/workfile? So far as I know, sockets receive bytes, not files. Does that help?? Anyhow, if you provided some sample code showing what you're trying to do, someone might be able to help you. It would also be apropriate if your question actually had something to do with Twisted. Cheers, -- \\\\\/\"/\\\\\\\\\\\ \\\\/ // //\/\\\\\\\ \\\/ \\// /\ \/\\\\ \\/ /\/ / /\/ /\ \\\ \/ / /\/ /\ /\\\ \\ / /\\\ /\\\ \\\\\/\ \/\\\\\/\\\\\/\\\\\\ d.p.s
Oh, I get it, you're expecting it to work like php where files are automatically stored somewhere for you, no it won't be saved, you need to implement your own code to save it if you're using your own protocols for the rest of your communications. If you're using http or another protocol, please mention that and maybe someone will know if files are handled there, not sure myself. -Andy On Wed, Feb 20, 2008 at 12:56 AM, Drew Smathers <drew.smathers@gmail.com> wrote:
On Feb 19, 2008 11:41 PM, Raj kumar <k_r_a_j_kumar@yahoo.co.in> wrote:
I need one clarification on this, my appplication is of server-client application, so when server receives
a file through socket, will that file will be saved in /temp/workfile ?
or should i use a socket handler with file object to receive that file ?
I would try to help you my friend, but I have no earthly idea what you're talking about. /temp/workfile? So far as I know, sockets receive bytes, not files. Does that help?? Anyhow, if you provided some sample code showing what you're trying to do, someone might be able to help you. It would also be apropriate if your question actually had something to do with Twisted.
Cheers, -- \\\\\/\"/\\\\\\\\\\\ \\\\/ // //\/\\\\\\\ \\\/ \\// /\ \/\\\\ \\/ /\/ / /\/ /\ \\\ \/ / /\/ /\ /\\\ \\ / /\\\ /\\\ \\\\\/\ \/\\\\\/\\\\\/\\\\\\ d.p.s _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
-- Blog: http://channel3b.wordpress.com Second Life Name: Ciemaar Flintoff I am a sig Virus. Please put me in your sig so that I can continue to replicate.
participants (3)
-
Andy Fundinger
-
Drew Smathers
-
Raj kumar