You can use this module https://pypi.python.org/pypi/pyserial
but as I understand it reading the post if a blocking operation and it may 
not be threadsafe. You should not call it from the web app itself.
You should created a separate service that reads the serial post and writes 
the results in a file. Then the web app reads the data from the file.
Of you can use some other communication protocol between the serial code 
and the web app.

On Monday, 8 February 2016 18:57:43 UTC-6, Marcelo Theodoro wrote:
>
> An web application will not have access to your serial port. Unless 
> there's some kind of module/dll for that. 
> I think the easiest way to do that is writing a script that you will run 
> local in your machine and send the data to web2py through a post/get 
> request.
> To send the data to an web application, you can use the requests lib.
>
> About your second question, you can just download a newer version from the 
> site, there's no need to use apt-get
>
> Em seg, 8 de fev de 2016 às 07:23, Oliver Holmes <oliver.hol...@gmail.com> 
> escreveu:
>
>> Hi,
>>
>> I'm new to web2py and quite frankly to python as well, so please bear 
>> with me ;)
>> I would like to use web2py to serve data, that it has gathered and 
>> processed from the serial port. There is new data available once a second. 
>> Obviously I'll have to use the scheduler, to accomplish reading and 
>> processing the serial port repeatedly. My question is this: How would I go 
>> about setting up that worker task in the scheduler? And by the way, since 
>> I'll be doing this on a RaspberryPi, how can I get a newer version than 
>> "Version 1.99.7 (2012-03-04 22:12:08)" apt-get will not deliver anything 
>> newer for my Raspian...
>>
>> Regards,
>> Oliver
>>
>> -- 
>> 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 web2py+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to