Re: Zipping Files to user defined Directory

2006-09-02 Thread Danny Milosavljevic
Hi,

On Fri, 28 Jul 2006 05:25:38 -0700, OriginalBrownster wrote:

 Marc 'BlackJack' Rintsch wrote:
 In [EMAIL PROTECTED],
 OriginalBrownster wrote:

[...]
 After the user selected the files you have to zip them on the server,
 for instance in a temporary in the `/tmp/` directory and then deliver
 that archive to the user.

 Ciao,
  Marc 'BlackJack' Rintsch
 
 
 THanks Marc,
 
 That makes sense. I can zip the files to a temp directory. However, How
 do I deliver the archive to them?...

Like you deliver any other content in a cgi (assuming you are using a cgi):
By printing in on standard output.

I don't know TurboGears though.

cheers,
  Danny
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Zipping Files to user defined Directory

2006-07-28 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED],
OriginalBrownster wrote:

 I'm very new to python, and I have been using the TurboGears Framework
 to use python to power my application.
 
 […]
 
 my problems is that when I want to download that file from the server I
 want to zip the files selected. but how does a user specify where they
 want to save that file?.

Usually the browser asks the user for a target directory.  So that's not
your business.

After the user selected the files you have to zip them on the server, for
instance in a temporary in the `/tmp/` directory and then deliver that
archive to the user.

Ciao,
Marc 'BlackJack' Rintsch


-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Zipping Files to user defined Directory

2006-07-28 Thread OriginalBrownster

Marc 'BlackJack' Rintsch wrote:
 In [EMAIL PROTECTED],
 OriginalBrownster wrote:

  I'm very new to python, and I have been using the TurboGears Framework
  to use python to power my application.
 
  [...]
 
  my problems is that when I want to download that file from the server I
  want to zip the files selected. but how does a user specify where they
  want to save that file?.

 Usually the browser asks the user for a target directory.  So that's not
 your business.

 After the user selected the files you have to zip them on the server, for
 instance in a temporary in the `/tmp/` directory and then deliver that
 archive to the user.

 Ciao,
   Marc 'BlackJack' Rintsch


THanks Marc,

That makes sense. I can zip the files to a temp directory. However,
How do I deliver the archive to them?...

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Zipping Files to user defined Directory

2006-07-28 Thread OriginalBrownster

Marc 'BlackJack' Rintsch wrote:
 In [EMAIL PROTECTED],
 OriginalBrownster wrote:

  I'm very new to python, and I have been using the TurboGears Framework
  to use python to power my application.
 
  [...]
 
  my problems is that when I want to download that file from the server I
  want to zip the files selected. but how does a user specify where they
  want to save that file?.

 Usually the browser asks the user for a target directory.  So that's not
 your business.

 After the user selected the files you have to zip them on the server, for
 instance in a temporary in the `/tmp/` directory and then deliver that
 archive to the user.

 Ciao,
   Marc 'BlackJack' Rintsch


THanks Marc,

That makes sense. I can zip the files to a temp directory. However,
How do I deliver the archive to them?...

-- 
http://mail.python.org/mailman/listinfo/python-list


Zipping Files to user defined Directory

2006-07-27 Thread OriginalBrownster
Hi There.

I'm very new to python, and I have been using the TurboGears Framework
to use python to power my application.

I have a class which handles the upload of a file to a directory called
uploads, which is hosted on a server.

my problems is that when I want to download that file from the server I
want to zip the files selected. but how does a user specify where they
want to save that file?.

I the user will be selecting the files they want to download and I want
to zip those files and let the user save it.

I want to know how to let the user specify where to save the zipped
files.

Any ideas?..any python to help me do this?? i know i can use the
zipfile module but I can't figure out the part about letting the user
decide.

Thank you

Stephen Sandhu

-- 
http://mail.python.org/mailman/listinfo/python-list