cwbe coordinatez:
101
63540
2076399
856608
6081945
6082020

ABSOLUT
KYBERIA
permissions
you: r,
system: public
net: yes

neurons

stats|by_visit|by_K
source
tiamat
K|my_K|given_K
last
commanders
polls

total descendants::5
total children::1
show[ 2 | 3] flat


neviem, na akom systeme si, ale linuxovy syscall dup2 by to mohol vediet.




00000101000635400207639900856608060819450608202006082087
mimmon
 mimmon      23.06.2011 - 11:27:06 , level: 1, UP   NEW
a to nefunguje len v C/C++?
lebo podla popisu pythonsky dup2() robi nieco ine.

robim to v linuxe a v podstate mi nic nebrani davat output cez pipe do txt suboru, ale bol by som rad, keby to riesil sam program.

0000010100063540020763990085660806081945060820200608208706082178
ziman
 ziman      23.06.2011 - 11:47:47 [1K] , level: 2, UP   NEW

ziman@idefix:~ $ python
Python 2.6.6 (r266:84292, Apr 20 2011, 11:58:30)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os, sys
>>> fd = os.open('log.txt', os.O_RDWR)
>>> os.dup2(fd, 1)
>>> print "hello world"
>>> exit()
ziman@idefix:~ $ cat log.txt
hello world
ziman@idefix:~ $

000001010006354002076399008566080608194506082020060820870608217806082272
mimmon
 mimmon      23.06.2011 - 12:18:44 , level: 3, UP   NEW
dakujem, usetril si mi kopec zbytocnej roboty

00000101000635400207639900856608060819450608202006082087060821780608227206083301
ziman
 ziman      23.06.2011 - 20:54:57 , level: 4, UP   NEW
tesim sa :)

0000010100063540020763990085660806081945060820200608208706082162
ziman
 ziman      23.06.2011 - 11:42:50 , level: 2, UP   NEW
nepoznam presny zapis, tak len schematicky:

logf = openfile("log.txt") # otvorit log
os.dup2(logf.fd(), 1) # presmerovat stdout -> logf
print "hello world"