Python and server

Post new topic   Reply to topic Feature Requests View previous topic :: View next topic  
Author Message
Lisa



Joined: 04 Aug 2004
Posts: 118
Location: Amsterdam

PostPosted: Tue Mar 15, 2005 3:59 am    Post subject: Python and server Reply with quote

We were fiddling with php a bit in WM's disclaimer and we made a cute lil counter....works fine.
Only drawback is the room has to have the php extension now and we can't edit it in the RE anymore.
My question is this: wouldn't it be nice if Python was able to read plain text files on the server? (I know it would or I wouldn't ask for it...grin).
Please think about it Carl.
Kisses, hugs and whatever it takes to make you do this,

Lisa
_________________
-Lisa-


Last edited by Lisa on Tue Mar 15, 2005 2:49 pm; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
Uriah
Guest





PostPosted: Tue Mar 15, 2005 1:41 pm    Post subject: seconded! Reply with quote

I definitely second that emotion. A feature like that would multiply manors usefullness 1000-fold!
Back to top
Scotsman
Site Admin


Joined: 03 Aug 2004
Posts: 705
Location: MadWolf Software

PostPosted: Tue Mar 15, 2005 1:56 pm    Post subject: Reply with quote

Funny you should mention this Lisa, as I have been thinking about improved backend communication.

The thoughts I've been kicking around are:

a) MySQL support in Python, requests routed through the Manor server

b) a CGI like interface in the Manor server so a room script could send a message to the server to be delivered to a "CGI" written in whatever language
Back to top
View user's profile Send private message Visit poster's website
Bri



Joined: 06 Aug 2004
Posts: 237
Location: Palm Springs, CA

PostPosted: Tue Mar 15, 2005 2:48 pm    Post subject: 2 cents worth Reply with quote

MySql is attractive as the common ground. That way Manor and the Web can tie with either PHP or Python doing handoffs. It would be nice to have a post but a web based post will work in most situations. PHP is so great because it includes all the graphical power of the GD libs and has the forgiveness for casual scripters.
The only issue I have experienced is the built in problem of Palace support the commercial hosters stick us with.., Manor servers have to live with 2002 revisions of PHP/GD and MySql. Perhaps one forward looking Manor host will be brave enough to shake off the burden of Palace we have to live with.
_________________
RL..now with 100% less lag!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Uriah
Guest





PostPosted: Wed Mar 16, 2005 1:29 am    Post subject: 2 more cents Reply with quote

Bri is right, IMO. MySQL is not a procedural language so limitations for server side processing would be extreme and who wants to run advanced code on the client? CGI is an ok idea but that's sorta overkill, no? PHP has the same procedural power but can be accessed with a simple post. All we (ok well "I") want is simple text transmission back and forth. The rest I think the coders can handle Very Happy
Back to top
Uriah
Guest





PostPosted: Wed Mar 16, 2005 1:32 am    Post subject: PS shameless plug Reply with quote

Just a note:

None of the above stops us right now from extending the manor client onto the server by transmitting command sequences via fetchSound and having PHP generate and return the appropriate visual components without ever referring back to the client. More info see my latest post in community.
Back to top
Rhonk



Joined: 03 Aug 2004
Posts: 36
Location: St. Peters, MO

PostPosted: Wed Mar 16, 2005 8:00 am    Post subject: Reply with quote

CGI is much easier to use than PHP actually. Easy to use and very flexible. I actually prefer a CGI script. I'll throw an example on Multiphase.org that lets you grep Manor logs some day. Or tracks logins. Guess how many lines of code it takes to do. That's right, less than 3 *LINES*.
_________________
-Erik "Rhonk" Arnson
Back to top
View user's profile Send private message Visit poster's website AIM Address
Scotsman
Site Admin


Joined: 03 Aug 2004
Posts: 705
Location: MadWolf Software

PostPosted: Wed Mar 16, 2005 12:54 pm    Post subject: Reply with quote

Just a side note, PHP can be used for a CGI script. In fact you can write standalone PHP programs.

CGI overkill? Not necessarily for what some are wanting to do.

One drawback to Uriah's fetchSound workaround is that the interaction is via the HTTP unsecured channel. This isn't a good thing for confidential information such as medical or ecommerce information as an example.
Back to top
View user's profile Send private message Visit poster's website
Uriah
Guest





PostPosted: Wed Mar 16, 2005 3:20 pm    Post subject: Can I third an emotion as well as 2nd it?? Reply with quote

It is true that CGI does have extended functions that PHP does not, although most of these are available via PHP through scripting. The permissions necessary to implement CGI scripts on the server, while enhancing security, inhibit rapid development. And (with all respect to those involved) PHP is hard enough to learn for most people. The majority of manor owners are not programmers by trade, and the simpler solution might fit them best. Personally tho, if the Catdude can make this work, he can do it in FORTRAN for all I really really care Wink

A brief on Scots' point: security schmecurity! No doubt the Scots'll come up with a secure way to solve all this. Until then there are a range of functions that are available on the server (counters, guestbooks, lookups, feeds, etc, ad nauseum) that aren't really security issues and can be extended to the client gui by just adding a spot to a room. Now I repeat how cool is that!

~Problem with the rat race is if you win, just means you're the fastest rat.~
Back to top
Lisa



Joined: 04 Aug 2004
Posts: 118
Location: Amsterdam

PostPosted: Wed Mar 16, 2005 4:35 pm    Post subject: Reply with quote

Medical or e-commerce information? Jeez what is that all about?
_________________
-Lisa-
Back to top
View user's profile Send private message MSN Messenger
Bri



Joined: 06 Aug 2004
Posts: 237
Location: Palm Springs, CA

PostPosted: Wed Mar 16, 2005 5:51 pm    Post subject: Opinion Reply with quote

We kinda do know a CGI script can be written in any language that can read STDIN, write to STDOUT, and handle environment variables assuming you want some of the 20 or so available. Will these be NPH scripts or some other protocol?

I just wonder if all that is needed to stack on top of what seems confusing to the average Manor owner. We spend time helping people learn Python for Manor and I just think this may add a ton of confusion to the learner’s problems. Just imagine explaining sets of name-value pairs as a long string, which they will need to parse. My other concern is how we can access them. Our hosts are configured differently. Some let you put your CGI scripts in the same directory or some in a specific directory or not allowed at all, due to security.

We already have people with super fast boxes crashing on PHP/Python transitions without a new major issue.
Yes, your gate is also an error popper... so it's not our sloppy coding.

I second Lisa’s request for a simple file.
_________________
RL..now with 100% less lag!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Scotsman
Site Admin


Joined: 03 Aug 2004
Posts: 705
Location: MadWolf Software

PostPosted: Wed Mar 16, 2005 7:02 pm    Post subject: Reply with quote

Didn't say I wouldn't do the simple file, just that I had already been thinking about this sort of thing.

The whole thing with the CGI like stuff (not really CGI's in the sense of webpages, but same kind of idea triggered from the Manor server) is the starting out site builder doesn't need to worry about it. Anymore than most people worry about it on their personal webpage. However for the professional site developers (i.e. the kids albright college is cranking out) and those wanting an interactive, e-commerce capable, sales tool (yes, there are some of those looking seriously at Manor too), the abilities need to be there.

The only error I know of popping at the gate at main is due to Norton firewall replacing the Python scripts with JavaScript. If that's what your hitting, my suggestion is turn off Norton firewall and use MS firewall. Thank you Norton for being to stupid to read the standard language tags and not mess with stuff!
Back to top
View user's profile Send private message Visit poster's website
Rhonk



Joined: 03 Aug 2004
Posts: 36
Location: St. Peters, MO

PostPosted: Wed Mar 16, 2005 9:16 pm    Post subject: Reply with quote

Believe it or not, you can write CGIs in ANY language that has a parser available. Heck, I've even done a Java-based CGI script. And yes, if you find a Fortran parser, that can be used in CGI as well. The only difference in a CGI file is the *FIRST* line. The line is the path to the parser. For example:

#!/bin/sh
or
#!/usr/bin/python
or
#!/usr/java/bin/java
or anything really.

This would leave options open for anyone to write nifty things in a language they are brilliant with. I'm not a fan of PHP myself. I'm the one and only Java nut on Manor. JSPs can do the same job as PHP and then some (imho). With the prebuilt methods of Java and Manor combined, anything is possible. As well as with PHP, Python, Bourne, etc.
_________________
-Erik "Rhonk" Arnson
Back to top
View user's profile Send private message Visit poster's website AIM Address
Uriah
Guest





PostPosted: Wed Mar 16, 2005 9:50 pm    Post subject: what a tattered web Reply with quote

Bless both your hearts but you're off topic IMO. All Lisa wants is a way to get text off the server into python. The server-side language selected is ancillary.

And ON that: pardon me for saying so but the whole idea that site owners will either be newbies that dont care at all about web stuff or rhodes scholar rocket scientists is the source of the problem. Please let me point out that the current majority of owners falls well and truly in the middle: people that want more functionality but do not want to have to devote 1/2 their lives to learning 15 languages to get it done (what the heck is a STDOUT??).

The fact that CGI may be as easy or easier to write is alongside the point. It is harder to work with than PHP because of the excellent reasons Bri points out.

Lastly, albright college and coca-cola may very well be looking seriously into Manor. I, on the other hand, am seriously into manor right now, witness those oh-so-affordable plat payments. Love the ones that love you Catdude.
Back to top
Scotsman
Site Admin


Joined: 03 Aug 2004
Posts: 705
Location: MadWolf Software

PostPosted: Thu Mar 17, 2005 12:15 am    Post subject: Reply with quote

Don't need to get into the details of programatic vs automated solutions here. Not everyone wants to get into what can be the really complicated side of internet programming, nor should they have too.

The point I am trying to make is simply that there are at least two levels of capability being asked for. Both can be done. Neither precludes the other.

The simpler solution I think can be addressed with a call to create and write data to a file on the server. The questions remaining on this solution are the call should probably be restricted to spot scripts so somebody can't have a borg that puts who knows what on a server. And should the file be fetched through the usuall HTTP stream, or should it be via the Manor's secured stream? Option to go either route?

The more complex/flexible solution I think is settling down to a CGI like interface where the Manor server would launch an executable of some form passing arguments and returning the result via the Manor data stream.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum