Am Donnerstag, den 25.08.2005, 20:28 +0100 schrieb Nick Lunt:
> Hello folks,
>
> I have the following code taken from the Twisted examples -
>
> [code]
> # filewatcher.py
> from twisted.application import internet
>
> def watch(fp):
> fp.seek(fp.tell())
> for line in fp.readlines
Hey Tutors
I saw a lot of responses...After analyze them I have resumed two approaches
1.- Generate a random number from 0 to and fill this number with
zeros (Almost everyone's approach)
2.- Generate 8 random numbers and join them (Pietro and someone else)
Which one of this is more ran
Nick Lunt wrote:
> Hello folks,
>
> I have the following code taken from the Twisted examples -
>
> [code]
> # filewatcher.py
> from twisted.application import internet
>
> def watch(fp):
> fp.seek(fp.tell())
> for line in fp.readlines():
> sys.stdout.write(line)
[Alan Gauld]
> Thanks Danny, interesting link in that it shows a solution I
> didn't know about in the one-liner at the bottom of the discussion.
>
> But really I was hoping someone could explain *why* there is a
> difference. If PATHEXT can detect that intest.py needs to be run
> through Python w
Hi Kent,
> >
> > [code]
> > # filewatcher.py
> > from twisted.application import internet
> >
> > def watch(fp):
> > fp.seek(fp.tell())
> > for line in fp.readlines():
> > sys.stdout.write(line)
> >
> > import sys
> > from twisted.internet import reactor
> > s = in
>> But really I was hoping someone could explain *why* there is a
>> difference. If PATHEXT can detect that intest.py needs to be run
>> through Python why doesn't redirection work as expected? What
>> is happening to stdin/stdout in this case?
>
> Alas, only Microsoft could explain this, and AFAIK
> have. It's not unique to Python, of course. Here's a confused MS
> article about it:
>
> http://support.microsoft.com/default.aspx?scid=kb;en-us;321788
>
> _Some_ of the PATHEXT-related redirection bugs did get fixed in XP,
> but not all of them. I haven't tried adding the registry entry they
I have a module called "enterData" which generates a list, "close" from
a data file. "close" is a list of floats. When I put a print statement
in that module it will print out an individual member of the list. For
example,
print close[0]
prints the first member of the list.
In my "main"
Tom Strickland wrote:
> I have a module called "enterData" which generates a list, "close" from
> a data file. "close" is a list of floats. When I put a print statement
> in that module it will print out an individual member of the list. For
> example,
>
> print close[0]
>
>
> prints the
Tom Strickland wrote:
> In my "main" module I import "enterData" and try to read the first
> element of "close" as follows:
>
> import enterData
> xy=enterData.close
> print xy[0]
>
>
> When I do this it prints out the entire "close" list, not just the first
> term.
Hi Tom,
I
10 matches
Mail list logo