Ben Rousch had asked me about a couple things during the meeting and I'll update them here...
Caleb at my company embedded PHP's interpreter into Python... A testament to the organization and flexibility of CPython's code base.
Here's a link to that: (I do need to update github to the latest internal version which has better documentation)
Essentially once you get your php of choice compiled as a Shared Object it's just a matter of running a script:
import pyphp
pyphp.init() #This starts the php interpreter
result = pyphp.runScript('test.php')
Note from within "test.php" you could
return "Hello World" and the result would be the python string "Hello World"
If you have legacy PHP code / databases built around PHP and you need to extract Python data structures or convert PHP data structures (arrays) to list / dictionaries then our code will do that.
One of our primary uses cases was this:
We had hundreds of thousands of PHP session files... PHP is literally the only thing that can safely read it's file-session-format.
We wanted to get this data out and use it while our old-web-application was still in use.
By using this module we were able to dynamically and in real-time with a code-only solution read the PHP session files, extract the information as a Python Dictionary and read the information using regular Python code.
As a result of having this module we didn't have to write more legacy PHP code, or temporarily attempt to store all the PHP data in some other database to get it into Python.
The second thing I'll talk about is Ben asked me about our use of Twisted/Perspective Broker/PyGTK
I've included an image of our new order-management application early on in it's development. one of the great projects here at Riders Discount was consolidating orders across the entire corporation. At one time our customer service reps would potentially look in 4 different places for your order.
So we consolidated to a single program and single database.
Ben seemed somewhat surprised when he heard we were writing "Desktop Applications"... These are networked applications that can run across a WAN/LAN and be encrypted through SSH so it's not too much different.
The big difference is the development time. We reduced the average time taken to build screens like the one attached by 4 - 8 times vs their html/css/javascript counterparts.
The simplification of using Python to define the client, and server, and the interface between cannot be overstated, and it is a huge benefit to our organization.
Lastly
As I mentioned we use a lot of Lucene... As an introduction to everyone on how easy it is to get started here is a basic example.
This example creates a search index with 1 record, and then searches that index.
I also mentioned we would be releasing our faceting code... I'll update you more on that at some point in the future.
If anyone is interested in a demo of a real working search engine backed by PyLucene with all the gory features and details let me know.
On Tuesday, April 17, 2012 11:03:28 AM UTC-4, brousch wrote:
Thanks to everyone who came out to the GRPUG meeting last night. We
had another larger-than-usual crowd (9) despite some uncertainty in
the meeting's topics. I really enjoy meetings like yesterday's where
the discussion is just as informative and engaging as the
presentations. For those who didn't stick around, we ended up talking
at Old Chicago until about 10PM!Next month (May 21), Richard Nienhuis has volunteered to introduce us
to the PySerial module. He'll have a few serial devices on hand to
demo and play with. We don't talk about devices and peripherals much,
so it should be an interesting topic.
I'm pretty sure we'll have time for an additional talk at the next
meeting, so if anyone has an idea, just let me know. You're welcome to
talk about a module you've found interesting, a project you've been
working on, or just present some interesting news or opinions from the
Pythonisphere.
We also have no topics scheduled for the June 18 meeting, so if that
fits your schedule, feel free to pipe up.
For the July 16 meeting, Dave Brondsema has offered to introduce us to
contributing to Sourceforge's open source forge platform, Allura. This
will probably build on the Intro to Allura talk he gave last year, but
we'll get deeper into the project.
As usual, the most up-to-date information can be found on the GRPUG
website: http://grpug.org
--
Ben Rousch
bro...@gmail.com
http://clusterbleep.net/