On Wednesday, July 8, 2015 at 5:53:41 AM UTC-7, reddyreddy wrote:
>
> Iam not sure how to use it.
> I guess I was not clear in my earlier question.
> For the files that were uploaded, I want full path of the each. Because I 
> want to give that path to the gcc so that my files get executed.
>
> Can you please explain me little more.
>
>
>
> On Tue, Jul 7, 2015 at 9:11 PM, Anthony <[email protected] <javascript:>> 
> wrote:
>
>> os.path.join(request.folder, 'static', 'temp', filename)
>>
>>
os.path.join takes the components of a path (e.g., a "folder" and a 
"file"), and makes a string that can be passed to routines like open().
You can also pass that string as an argument to subprocess() invocations, 
or send it the user in a flash message (web2py sense).

It is interesting that os.path.join() is cited several times on
<URL:http://docs.python.org/2/library/os.html>
but isn't described there ... because the docs have a separate page for 
os.path:
<URL:http://docs.python.org/2/library/os.path.html#module-os.path>

/dps

Anthony's example takes request.folder, a couple of intermediate pieces 
(subdirectories) and a filename.
The result is a string (or string-like type) that can be passed 
 

> On Tuesday, July 7, 2015 at 5:40:39 PM UTC-4, reddyreddy wrote:
>>>
>>> Hello all,
>>>
>>> I want to get the full path of the files that were uploaded.
>>> Iam giving the uploaded folder as 'static/temp'  in db.py.
>>>
>>> Thankyou in advance.
>>>
>>>
>>>
>>>
>>>  -- 
>> Resources:
>> - http://web2py.com
>> - http://web2py.com/book (Documentation)
>> - http://github.com/web2py/web2py (Source code)
>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Chaitanya Pochampally
>  

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to