Re: cgi-script shell script wrapping question
Hi, I would go to the javascript wrapper solution : I would wrap cgi-script to send javascript code to browser and then redirect original script output to the html file In a javascript I would loop (and sleep) until load of html file will succeed. On 12/27/2010 08:26 PM, Dov Grobgeld wrote: Thanks for the help! Based on it I tried running the command with python as follows: import subprocess pipe = subprocess.Popen(do_slow_command 21, bufsize=1, stdout=subprocess.PIPE, stdin=subprocess.PIPE, shell=True) for p in pipe.stdout.readlines(): print p,br\n According to the subprocess documentation, this is supposed to set up line by line mode. But I still get things buffered up. But perhaps that is because I did not tell do_slow_command to flush after print command, and it senses that it is not being run under a terminal? I'll try that. Dov On Mon, Dec 27, 2010 at 20:08, ik ido...@gmail.com mailto:ido...@gmail.com wrote: 2010/12/27 shimi linux...@shimi.net mailto:linux...@shimi.net 2010/12/27 Dov Grobgeld dov.grobg...@gmail.com mailto:dov.grobg...@gmail.com I'm trying to write a cgi wrapper for a long running command. The command takes about 10minutes to execute and when running it from the command line it continously outputs text to stdout. A simplistic cgi-bin wrapper that tries to execute the script and then writes that it is done fails with the following message: Timeout waiting for output from CGI script ... What I wonder if there is any easy way to have continously update the web page with stdout of the script. One way, I guess would be to run the script in a separate thread and just do HTML reload on a static page which I would regenaret with the stdout generated so far. Is there any other simple solution? You could increase the timeout to be running time of the script ... Do not forget that you also have timeout of the web browser that you can not control (you can not control the users themselves). -- Shimi Ido ___ Linux-il mailing list Linux-il@cs.huji.ac.il mailto:Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il LINESIP - Opening the source for communication http://www.linesip.com http://www.linesip.com/ http://www.linesip.co.il http://www.linesip.co.il/ ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: New Document: How to Start Contributing to or Using Open Source Software
On Mon, Dec 27, 2010 at 8:37 PM, Shlomi Fish shlo...@iglu.org.il wrote: Hi all, I recently finished working on a new document titled How to Start Contributing to or Using Open Source Software intended to get more people involved in the world of free and open source software (FOSS). You can find it here: http://teachingopensource.org/index.php/How_to_start_contributing_to_or_using_Open_Source_Software Short link: http://bit.ly/gkeXn5 Any comments, corrections or suggestions would be welcome. Nice. I just wanted to embark on another mission to get more people to contribute to open source in general and Perl is specific. I think you article might help in that though after I reached the Some Mental Preparation part I am a bit worried. See my comments: In the What is shrinkwrap software? section it sounds as if open source software was not commercial. IMHO there is an overlap and between the two. The in What is open source software? you are saying that open source does not stand against commercialism which is of course right but now sounds a bit contradicting the previous section. Why open source software? Starts by the free beer approach. I am not sure it is good to put that as the first item and thereby emphasize it but if you do it you might want to add something like legally to make that part clear. Some Mental Preparation Wow, you start by turning people off? I understand you want to be as honest as possible but you just lost everyone at that point. Everyone except the fighters maybe. Is the situation really that bad? I don't think so. I'd write the opposite way, something like this: While most open source projects are very welcoming to the newcomers there too might be bad apples who might sound offending. In most of the cases this is just due to lack of communication. So if you ever feel offended, either talk (privately!) to the project leader or look for another project. And even this might be a bit too much on the negative side. OTOH the Lessing quote was very good and moving. regards Gabor http://szabgab.com/ ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: New Document: How to Start Contributing to or Using Open Source Software
On Tue, Dec 28, 2010 at 19:15, Shlomi Fish shlo...@iglu.org.il wrote: Yes, I did. I thought it was fair to mention Ubuntu because it appears to be the most popular distribution right now, especially for beginners and one of the most polished ones. I've also decided to forget about their treatment of me in the past (seeing that it wasn't important for the prosperity of the community as a whole.). That is very pragmatic and mature of you. Seriously, I'm impressed! OK, I'll consider removing the sainthood part. I may prove of some help with KDE, given my time constraints, but I'm not an expert in either C++ or KDE. Thanks, if I get horribly stuck I'll post to linux-il. I assume that C++ for KDE coding is ontopic there. Today I was reminded of this quote from http://www.perl.com/pub/1999/09/topaz.html : {{{ Now I'd like to ask how many of you do not know anything about C++? Okay, a fair number, so I'm going to have to explain—everyone else is lying. Two kinds of people: people who say that they know C++ and the truthful. }}} I used to feel that Salzenberg was joking in saying that, but now, many years later, I realise how he was correct in saying that. Einstein had a similar quote about understanding relativity. I generalise both statements to be humble, and continue to learn. That's why I don't claim to be an expert in anything. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Web interface for embedded Linux system administration
Hi, I am looking web interface for embedded Linux system administration. It should provide base system administration and be configurable for additional applications configuration. I found two candidates: - Webmin http://www.webmin.com/ http://en.wikipedia.org/wiki/Webmin - Webif² http://x-wrt.org/ http://en.wikipedia.org/wiki/X-Wrt Webmin looks too heavy for embedded because it uses perl. Webif² look more suable for embedded. What can you say about this candidates? Can you recommend another solutions? Thanks. Happy New year! -- Constantine Shulyupin Embedded Linux Expert TI DaVinci Expert Tel-Aviv Israel http://www.LinuxDriver.co.il/ ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il