WebApp with Apache and mod_wsgi?

General Discussion

WebApp with Apache and mod_wsgi?

Postby abc » Mon Apr 20, 2015 9:47 am

Can the WebApp be configured to work with apache and mod_wsgi? If so how? I am currently not familiar with WSGI.

Thanks.
Also has anyone written a simple virtual text keypad for ad2usb? Just a single file script that opens the serial port parses the LCD messages into two lines using standard ANSI cursor moment so it will work in a putty ssh session? If not I will write one myself.
abc
newt
newt
 
Posts: 2
Joined: Mon Apr 20, 2015 9:27 am

Re: WebApp with Apache and mod_wsgi?

Postby kevin » Mon Apr 20, 2015 10:00 am

mod_wsgi isn't particularly the best fit for running Python WSGI applications but it is possible - that said, we use nginx.

First off, I'd reason that it takes a lot of effort to understand Apache's request processing model and to configure it correctly, especially with respect to mod_wsgi.


As far as the application you are describing, I am not aware!
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am

Re: WebApp with Apache and mod_wsgi?

Postby abc » Tue Apr 21, 2015 10:33 am

I really am just looking for a simple integration with a standard Linux distro like CentOS. But it sounds like the simplest thing then would be to install Gunicorn and Ngnix on the system?

As for the virtual text terminal. I have one up an running - still needs a few tweaks - but works (just a Perl script). One of the things I still need to do is translate the extended characters into the correct printable characters. I am talking about the block character like ff
when you are in the zone programming mode and it flashes a block vs the number - ff vs 0 (as the cursor location).

Is there a list of all these characters and what they are? (I search around and did not find it).
Like ff = block. This does not seem to map the the standard ASCII extended set.
Also is there a way to distinguish between these extended characters and regular text?

Thanks.
abc
newt
newt
 
Posts: 2
Joined: Mon Apr 20, 2015 9:27 am

Re: WebApp with Apache and mod_wsgi?

Postby kevin » Tue Apr 21, 2015 11:13 am

nginx and gunicorn should be available from repositories in CentOS no problem - yes, this is the easiest way to do it in my opinion.


If you look at the alarmdecoder library you can see how the position of the cursor is calculated from the panel data

if int(self.panel_data[19:21], 16) & 0x01 > 0:
# Current cursor location on the alpha display.
self.cursor_location = int(self.panel_data[21:23], 16)

http://www.alarmdecoder.com/wiki/index.php/Protocol describes the protocol so you can write your own - but I highly suggest using the python library we have provided to save yourself some trouble.
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am


Return to General

Who is online

Users browsing this forum: No registered users and 23 guests

cron