On 1/21/2008 9:02 AM, Bernard Desnoues wrote:
> Hi,
>
> I've got a problem with the use of Redmon (redirection port monitor). I
> intend to develop a virtual printer so that I can modify data sent to
> the printer.
FWIW: there is a nice update the RedMon (v1.7) called RedMon EE (v1.81)
availab
On 1/22/2008 8:54 AM, Konstantin Shaposhnikov wrote:
> Hi,
>
> This is Windows bug that is described here:
> http://support.microsoft.com/default.aspx?kbid=321788
>
> This article also contains solution: you need to add registry value:
>
> HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVe
Sorry, I meant:
Alternatively you can use following command
cat file | python script.py
instead of
cat file | script.py
On Jan 22, 1:54 pm, Konstantin Shaposhnikov <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> This is Windows bug that is described
> here:http://support.microsoft.com/default.asp
Hi,
This is Windows bug that is described here:
http://support.microsoft.com/default.aspx?kbid=321788
This article also contains solution: you need to add registry value:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies
\Explorer
InheritConsoleHandles = 1 (REG_DWORD type)
Well, that's at least weird. I did test my code with Python 2.5 on Win
XP, using the command prompt. But testing it with IDLE gives exactly the
same error Bernard has. So apparently STDIN can't be accessed with IDLE.
Rolf
John Machin wrote:
>
> Excuse me, gentlemen, may I be your referee *befor
On Jan 22, 8:42 pm, Bernard Desnoues <[EMAIL PROTECTED]>
wrote:
> Hello,
>
> I checked under linux and it works :
> text.txt :
> "first line of the text file
> second line of the text file"
>
> test.py :
> "import sys
> a = sys.stdin.readlines()
> x = ''.join(a)
> x = x.upper()
> sys.stdout.write(x
Bernard Desnoues wrote:
> Hello,
>
> I checked under linux and it works :
> text.txt :
> "first line of the text file
> second line of the text file"
>
> test.py :
> "import sys
> a = sys.stdin.readlines()
> x = ''.join(a)
> x = x.upper()
> sys.stdout.write(x)"
>
> >cat text.txt | python test.p
Hello,
I checked under linux and it works :
text.txt :
"first line of the text file
second line of the text file"
test.py :
"import sys
a = sys.stdin.readlines()
x = ''.join(a)
x = x.upper()
sys.stdout.write(x)"
>cat text.txt | python test.py
But I reinstalled Python 2.5 under Windows XP and i
I don't know what you did with your Python installation, but for me this
works perfectly.
test3.py contains:
import sys
print sys.stdin.readlines()
test.txt contains:
Testline1
Testline2
Output of 'python test3.py < test.txt' is:
['Testline1\n', 'Testline2']
Just plain simple and just w
Rolf van de Krol a écrit :
> According to various tutorials this should work.
>
>
> |import sys
> data = sys.stdin.readlines()
> print "Counted", len(data), "lines."|
>
>
> Please use google before asking such questions. This was found with only
> one search for the terms 'python read stdin'
>
According to various tutorials this should work.
|import sys
data = sys.stdin.readlines()
print "Counted", len(data), "lines."|
Please use google before asking such questions. This was found with only
one search for the terms 'python read stdin'
Rolf
Bernard Desnoues wrote:
> Hi,
>
> I've go
Hi,
I've got a problem with the use of Redmon (redirection port monitor). I
intend to develop a virtual printer so that I can modify data sent to
the printer.
Redmon send the data flow to the standard input and lauchs the Python
program which send modified data to the standard output (Windows X
12 matches
Mail list logo