more on flushing; Aap: Copied; /usr/bin/scp -C -p
Scott Harrison <harris41-mhe/[email protected]> 18 Jan 2004 08:01:21 -0500
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Organization | Michigan State University |
| Message-ID | <[email protected]> |
Also, output like what is listed below is being output in chunks
(as opposed to being flushed line by line).
And, with scp://, it appears to take 4 minutes to transfer
100 files (certainly not due to bandwidth). Maybe the slow
scp is something I need to investigate, but maybe you have an idea?
When I say chunks, I mean 10+ lines at a time.
(scp involves aap version 1.053; redhat9 to freebsd4.9)
Aap: Copied "../system_dependencies/tests/mysql_requirements.pl" to
"/tmp/@15169.4"
Aap: /usr/bin/scp -C -p blah blah
Aap: Copied "../system_dependencies/tests/somefile.pl" to
"/tmp/@15169.7"
Aap: /usr/bin/scp -C -p blah blah
Aap: Copied "../system_dependencies/tests/somefile2.pl" to
"/tmp/@15169.11"
Aap: /usr/bin/scp -C -p blah blah
Aap: Copied "../system_dependencies/tests/somefile3.pl" to
"/tmp/@15169.20"
Aap: /usr/bin/scp -C -p blah blah
Aap: Copied "../system_dependencies/tests/somefile4.pl" to
"/tmp/@15169.24"
Aap: /usr/bin/scp -C -p blah blah
Aap: Copied "../system_dependencies/tests/somefile5.pl" to
"/tmp/@15169.28"
On Sun, 2004-01-18 at 07:12, Scott Harrison wrote:
> > > Would it make sense to make an implicit
> > > sys.stdout.flush() with :print commands?
> > Output to a terminal should be automatically flushed at each newline.
> > In which situation do you see a problem with viewing the output?
>
> In the example below, at the end of it where I have a commented
> out sys.stdout.flush().
>
> check { comment = Check for system dependencies necessary to run
> $APPNAME }: \
> posix_check operating_system_dependencies
>
> posix_check { comment = See if it is a posix system } :
> :print Checking for posix operating system...
> ostypevar = $OSTYPE
> expected = $EXPECTED_OSTYPE
> @if ostypevar == expected :
> :print Posix system [OK]
> @else:
> :print ERROR: $APPNAME can only be installed on posix systems
> :print $( ) such as linux, BSD, or Mac OS/X; note that
> :print $( ) $RECOMMENDED_OS are recommended (tested)
> :print Quitting on error.
> :exit
>
> operating_system_dependencies \
> { comment = Analyze the operating system and dependencies} :
> :print Checking for recommended operating systems $(RECOMMENDED_OS)...
> recommended_os_semaphore = 0
> # Gather info regarding FreeBSD 4.9
> @ok, uname_s = redir_system("uname -s",0)
> @ok, uname_r = redir_system("uname -r",0)
> @uname_s = uname_s[:-1]
> # Gather info regarding Mandrake 9.2
> @mdkfile = file2string("/etc/mandrake-release", {"MESSAGE" : ""})
> @macXfile =
> file2string("/System/Library/CoreServices/SystemVersion.plist", \
> {"MESSAGE" : ""})
> # Test for FreeBSD 4.9
> @if uname_s == "FreeBSD" and uname_r.find(" 4.9") :
> :print Recommended operating system FreeBSD 4.9 found [OK]
> recommended_os_semaphore = 1
> # Test for Mandrake 9.2
> @elif mdkfile.find("Mandrake") >= 0 and mdkfile.find(" 9.2 ") :
> :print Recommended operating system Mandrake 9.2 found [OK]
> recommended_os_semaphore = 1
> # Test for Mac 10.3
> @elif 1==0 and macXfile and macXfile.find("1sdfsdfsdf03") :
> :print Recommended operating system Mac 10.3 found [OK]
> :print $macXfile
> recommended_os_semaphore = 1
> @else :
> :print WARNING You are installing $APPNAME on something other than
> :print $(RECOMMENDED_OS)
> :print *********************************************************
> :print Please be advised that $APPNAME requires a significant
> :print level of dependencies and that recommended installation
> :print procedures for alternative operating systems and versions
> :print may be more difficult to follow. You have a posix
> :print style operating system, so it is doable, but not currently
> :print recommended (or directly supported by the developers right
> :print now).
> :print *********************************************************
> :print (Press the enter key to continue)
> # Need to uncomment the line below, otherwise the user sees nothing
> # and blindly has to hit the enter key.
> # @sys.stdout.flush()
> @r = raw_input()
--
Scott Harrison <harris41-mhe/[email protected]>
Michigan State University
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn