what does it have properties ?
what does it have method ?
how to use they ? or where can find any information
please help me 3 1395
On Thu, 4 Nov 2004 15:24:31 +0800, Leon <sq**********@yahoo.com.tw> wrote: what does it have properties ? what does it have method ? how to use they ? or where can find any information
sys.stdout is a writable file object. See
<http://docs.python.org/lib/bltin-file-objects.html> for a file
object's methods.
--
Cheers,
Simon B, si************@gmail.com, http://www.brunningonline.net/simon/blog/
"Leon" <sq**********@yahoo.com.tw> wrote in message news:<cm**********@netnews.hinet.net>... what does it have properties ? what does it have method ? how to use they ? or where can find any information
please help me
An example:
s:/home/rkam>python
Python 2.3.3 (#1, May 3 2004, 20:19:41)
[GCC 3.3.1] on sunos5
Type "help", "copyright", "credits" or "license" for more information. import sys dir( sys.stdout)
['__class__', '__delattr__', '__doc__', '__getattribute__',
'__hash__', '__init_ _', '__iter__', '__new__',
'__reduce__', '__reduce_ex__', '__repr__', '__setattr
__', '__str__', 'close', 'closed', 'encoding', 'fileno', 'flush',
'isatty', 'mod e', 'name', 'newlines', 'next',
'read', 'readinto', 'readline', 'readlines', 'se ek',
'softspace', 'tell', 'truncate', 'write', 'writelines', 'xreadlines'] sys.stdout.write( 'hello world\n')
hello world
http://www.python.org/doc/current/lib/module-sys.html
Good luck,
Roman Kaminski
"Leon" <sq**********@yahoo.com.tw> wrote in message news:<cm**********@netnews.hinet.net>... what does it have properties ? what does it have method ?
Have you read the Python Tutorial? If no, stop reading this message
now and read the Tutorial. If yes, what did you not understand about
sections 6.3 and 7.1? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Tsai Li Ming |
last post by:
Dear all,
I have a problem with a redirecting stdout and stderr. I am a top level
module and has no control over the imported modules that are making
system calls such as os.system or popen2.* ....
|
by: Wes S. |
last post by:
How can I redirect and tag sys.stdout values. I tried creating a class
module that saved the old stdout and replaced it, but I can't seem to figure
out how to do such.
Here is what I got...
...
|
by: Leon |
last post by:
"stdout" is file object, it open mode is "w"
and it have a close() fuction.....
while it run close(), how to reopen it
because I want to do rewrite it
stdout content update
|
by: Mike |
last post by:
I would like my 'print' statements to send its output to the user's
screen and a log file.
This is my initial attempt:
class StdoutLog(file):
def __init__(self, stdout,...
|
by: Michael Gaab |
last post by:
If I redirect stdout by using freopen("afile", "w", stdout);
and then I closed stdout using, fclose(stdout), essentially I am just
closing "afile".
I have to reestablish what stdout originally...
|
by: Santtu Nyrhinen |
last post by:
Hi,
Let say that I have a function like
void writeHello() {
printf("Hello");
}
Now I need to make an automated test fot that function.
The test function returns 1 for successful and 0 for...
|
by: Greg Ercolano |
last post by:
When I use os.popen(cmd,'w'), I find that under windows, the stdout
of the child process disappears, instead of appearing in the DOS window
the script is invoked from. eg:
C:\type foo.py
import...
|
by: =?gb2312?B?yMvR1MLkyNXKx8zs0cSjrM37vKvM7NHEsru8+7z |
last post by:
I wanna print the log to both the screen and file, so I simulatered a
'tee'
class Tee(file):
def __init__(self, name, mode):
file.__init__(self, name, mode)
self.stdout = sys.stdout...
|
by: hg |
last post by:
Hi,
I have the following
********************* C extention - redir.c
#include "Python.h"
PyObject * test_redir_test(PyObject *self) {
|
by: Joakim Hove |
last post by:
Hello,
I have written a program in C; this programs uses an external
proprietary library. When calling a certain function in the external
library, the particular function writes a message to...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |