Is the barcode reader connected on the same machine running web2py?

If yes you just need to create a function in the controller that you
can call and reads the value and puts it in the session or
where you need.
something like this (it will be more complex depending on hw):

def barcoderead:
     barfile = file('<barcode device>', 'r')
     code = barfile.read() # blocks  here until data arrives
     barfile.close()
     return dict(barcode=code)

You can callit as a normal url:
http://your.host.name/barcodeapplication/barcodecontroller/barcoderead
so you
can use anything you like for instance ajax

hope that helps!
mic


2010/8/25 Neveen Adel <nevo.a...@gmail.com>:
> Hello,
>
> Is there a way to connect my  web2py application to barcode reader and
> then get the data  after passing
> barcode card into the barcode?
>
> Thanks in Advance
>
> Neveen

Reply via email to