real numbers with infinity precission

2009-11-20 Thread Hans Larsen
I have a READ.me file for real.py, but where could I get that module? I use 
Python 3.+

I hope that sombody can help me

mailto: jo...@mail.dk


-- 
http://mail.python.org/mailman/listinfo/python-list


exec-function in Python 3.+

2009-11-02 Thread Hans Larsen
Help!
I'm begginer in Python 3.+!
If i wih to update a module after an import and chages,
How could I do:
By "from imp import reload" and then reload(mymodule)
or how to use "exec(?)", it is mentoined in docs.
In Python ver. <3 reload(module) writes something back to interpretter!, 
how about exec, which is a function?-:)
I,m thanking on the help!!


-- 
http://mail.python.org/mailman/listinfo/python-list


Set & Frozenset?

2009-03-08 Thread Hans Larsen
Could you help me ?
How could I "take" an elemment from a set or a frozenset .-) ?

From a string (unicode? Python<3), or from a tuple,or 
from a list: Element by index or slice.
From a dict: by key.
But what concerning a set or frozenset!

 hope somebody can help!

-- 
Hans Larsen
Galgebakken Sønder 4-11A
DK-2620 Albertslund
Danmark/Danio 


begin 666 Hans Larsen.vcf
M0D5'24XZ5D-!4D0-"E9%4E-)3TXZ,BXQ#0I..DQA--
http://mail.python.org/mailman/listinfo/python-list


Problem with subprocess and mkstemp

2008-05-28 Thread Hans Larsen

Hello,

I'm having this script here:

import sys, tempfile, subprocess
if len(sys.argv) > 1:
i = 0
while i < 1000:
print "Hello World" * 500
i = i + 1
exit( 1 )

h,fp = tempfile.mkstemp()
print "out: " + fp
out = open(fp, "r")
proc = subprocess.Popen( [sys.argv[0], "1"], stdout = h )
while proc.poll() is None:
o = out.read()
if o:
print o
print out.read()
print "The end"


This scripts work wonders on Windows (and I've heard Linux is doing  
well too tyvm - although if one of you could check, I don't have a  
linux ready), but on OSX it outputs nothing. If I change the stdout of  
the subprocess for a pipe, it works well.


I cannot confirm that the bug comes from Python, but I'm pretty sure  
this should work normally. Does anyone know of this problem? Is there  
a workaround? A fix, maybe?


We're using temporary files because a pipe hangs out with large  
output, such as this one.


Thanks a lot,
Hans Larsen
--
My definition of an expert in any field is a person who knows enough  
about what's really going on to be scared.

P. J. Plauger
Computer Language, March 1983

--
http://mail.python.org/mailman/listinfo/python-list