YAWS can run an old CGI application written using python perfectly. However, I still want to know whether or not inets supports CGI ?
Best Regards!
If you search for CGI in this PDF, you'll find information on it. I haven't tried it, but yes, CGI scripts should work.
http://www.erlang.org/doc/apps/inets/inets.pdf
Related
I come from C-family "mainstream" langages and i'm currently giving a try in Lua .
I made a simple code that check for a user entry and try to open an URL (built with user entry) in the default browser.
Saw the command os.execute("start "URL") that failed, saying that "os is undefined".
Well, seemed to be logical. I then researched the reason and discovered the "require" key word (which seems to act as a LoadLibrary or kind).
This is where I'm lost !
All forums says "yeah yeah just add require os and it will do". But it actually fail !
I obviously suspect that i am missing a "file" or path pointing at that "os" description. And that it's so obvious nobody found useful enough to explain or ask for it.
Can someone explain me what does require, in details ? Which file am i supposed to add (if i really need to ?).
If someone also have an online lesson to advise me, i'll accept it with pleasure. I feel like i'm missing a lot of basics and that's really not a "try to step-up" friendly langage
The standard Lua environment has os available without using require, so you must be using a non-standard Lua environment.
When Lua is embedded into different software, access to libraries like os is usually removed, as it is a security risk. (For example, if you allowed full access to the os library to anyone using Lua on a webserver, it would mean that anyone could run random shell commands on that server.)
If your Lua environment has been altered in this way, then there is a good chance that you will never be able to use the os library whatever you do.
I already installed embassy-phylipnew in my system. And I'm figuring out how to use it in python. Bad thing that there's no documentation I can find.
Does anyone know how to use it? I'm trying to use this to perform Phylip's dnadist and neighbor in commandline.
There is documentation:
http://emboss.sourceforge.net/apps/cvs/embassy/phylipnew/
If you want to use it from python you'll have to use a command line interface like the subprocess module. Biopython makes it easy to read the fneighbor output format (Newick) with the code at Bio.Phylo.
I am working in Tcl 8.1 and now I am trying to hit an URL using the following command from Tcl Script (which will be called from my application)
eval exec [auto_execok start] [list "" $url]
But the problem is, it is opening the URL in a web browser. But I don't want the web browser to open as per my requirement. I just want to hit the URL in background.
Is there any solution available to this problem?
Any help would be greatly appreciated.
It isn't exactly obvious what "hit[ting an] URL in background" means, but I'm guessing that you want to retrieve the contents at an URL and make them available as data in your program.
The http module contains the commands you need for this. Basic use:
package require http
set token [::http::geturl $url]
puts [::http::data $token]
::http::cleanup $token
Documentation: http
P.S. you really need to upgrade, if possible. Even Tcl 8.4 is obsolete nowadays. You will risk having subtle, hard-to-diagnose problems with your programs unless you use a recent version, and a lot of the suggested code for instance here or on the wiki will be unusable to you with a version that old. And Tcl just keeps getting better.
You want to send literal quotes as the first argument for start, not an empty string.
eval exec [auto_execok start] {""} [list $url]
ref: http://wiki.tcl.tk/auto_execok
I use Dreamweaver heavily for modifying Liferay templates (Velocity files), and then have to run Apache Ant from Command Prompt to deploy the WAR to Tomcat . Is there anyway I can streamline this process so I can save/deploy straight from Dreamweaver?
I tried to setup a site and specify Tomcat as the local server, but obviously Dreamweaver just tries to push the raw file and does deploy the WAR.. Is there some sort of extension or way I can call Apache Ant from Dreamweaver?
Thanks!
I've not seen such an extension, you can search for one at the Adobe Exchange: http://www.adobe.com/go/exchange , however if there isn't one already available, which I suspect there isn't, it would be possible to write one of your own. The following links are for the extending Dreamweaver, and Dreamweaver extensibility APIs:
http://help.adobe.com/en_US/dreamweaver/cs/extend/index.html
http://help.adobe.com/en_US/dreamweaver/cs/apiref/index.html
In this particular case, I believe that you'd need to use an undocumented API call to communicate with an external process (in your case Ant), such as DWfile.runCommandLine() or MM.runCommandLine(). Paul Boon found these and blogged about them and a couple of others here:
http://communitymx.com/blog/index.cfm?newsid=179&blogger=35
I'd like to utilize an etherpad interface on my website. Two questions:
1) is there any site with an etherpad api that I could just call remotely?
2) if not, how much trouble is it to install scala and have the two run concurrently?
Thanks
Check out http://piratepad.net and http://ietherpad.com
And you can embed those etherpad instances using a simple iframe as suggested here: http://etherpad.com/ep/blog/posts/embedding-etherpad
There doesn't seem to be a proper API yet for more robust interactions.
The original etherpad.com has now gone away but at that link there is a list of clones.
The instructions for embedding etherpads seems to have gone away with the rest of etherpad.com but I believe it's as simple as this:
<div id="ep">
<iframe src="http://etherpad.com/foo?fullScreen=1"></iframe>
</div>
Replace "etherpad.com" with whatever clone you're using, "foo" with the name of your pad, and you may or may not want to change that fullScreen=1 to fullScreen=0 (or leave it off altogether).
Installing scala might mean a few things:
Installing the SDK (i.e. scalac)
Installing the runtime
Assuming you mean the runtime, scala runs entirely on the Java Virtual Machine (JVM) so assuming you have 1.5+ JVM installed, you can run scala programs on it easily (Scala just compiles down to bytecode, after all). All a scala program requires is a few JARs on the classpath (scala-library and scala-compiler)
Now there is a better solution Etherpad Lite it is easily installable and embedable. See http://etherpad.org