>
> Hi, 
> in fact I have 3 questions: 
> 1. Is there a simple dialogue which lets you chose a download 
> directory (and then eventually to download the file(s))?
>

If you have a link to download a file, the browser handles the dialog that 
allows you to choose the download folder and download the file. Some file 
types that the browser recognizes (e.g., PDF, images, audio, video) may be 
displayed/played by default rather than downloaded by the browser. In that 
case, you can force the browser to prompt for download by setting the 
'Content-Disposition' header to 'attachment; filename="myfile"'. If you're 
using the web2py response.download() method, it takes an "attachment" 
argument, which you can simply set to True. For static files, you can 
append "?attachment" to the end of the URL.
 

> 2. I set up web2py so that it's run from PythonAnywhere. Now, if I 
> read out the directories or download files the path is located on the 
> servers of PythonAnywhere. But how can I achieve that they are 
> downloaded to my local computer?
>

That doesn't sound right. Can you show some code? If the web page in your 
browser includes a link to download a file from the server, your browser 
would prompt you to save it on your local machine. It sounds like you're 
doing something else.
 

> 3. I'm using bioPython to analyze a biological dataset. If I run this 
> from PythonAnywhere+web2py and save these data locally before 
> analyzing them, ... can this be done? Can web2py access to the users 
> local drive to access the files and analyze them? or do the files have 
> to be located at the server from where I run web2py? 
>

If the files are on the local drive, the user would have to upload them to 
the server for web2py to be able to process them (unless, of course, web2py 
is running on the local machine, which doesn't seem to be the case here).

Anthony

Reply via email to