[Tutor] How do I use the os.open module?

Alexandre Passos Alexandre Passos" <atp@bahianet.com.br
Tue, 12 Oct 1999 13:29:26 -0300


This is a multi-part message in MIME format.

------=_NextPart_000_0101_01BF14B5.CDF22DA0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I've tried to use the os.open module theese ways:
#Command prompt
command =3D raw_input("[shell]")
import os
os.open(command)


and the error message was:
0 arguments needed 1 given



#Command Prompt
command =3D raw_input("[shell]")
import os
os.open() command

error:
Call of non function

and finally
#Command prompt
command =3D raw_input("[shell]")
import os
os.open command

and I obtained the following message:
<builtin function open>

what shall I do??

------=_NextPart_000_0101_01BF14B5.CDF22DA0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>I've tried to use the os.open module =
theese=20
ways:</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>#Command prompt</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>command =3D=20
raw_input(&quot;[shell]&quot;)</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>import os</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>os.open(command)</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>and the error message =
was:</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT><FONT size=3D2>0 arguments =
needed 1=20
given</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>#Command Prompt</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>command =3D=20
raw_input(&quot;[shell]&quot;)</FONT></DIV>
<DIV><FONT size=3D2>import os</FONT></DIV>
<DIV><FONT size=3D2>os.open() command</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2></FONT><FONT color=3D#000000 =
size=3D2>error:</FONT></DIV>
<DIV><FONT size=3D2>Call of non function</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>and finally</FONT></DIV>
<DIV><FONT size=3D2>#Command prompt</FONT></DIV>
<DIV><FONT size=3D2>command =3D =
raw_input(&quot;[shell]&quot;)</FONT></DIV>
<DIV><FONT size=3D2>import os</FONT></DIV>
<DIV><FONT size=3D2>os.open command</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>and I obtained the following message:</FONT></DIV>
<DIV><FONT size=3D2>&lt;builtin function open&gt;</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>what shall I do??</FONT></DIV></BODY></HTML>

------=_NextPart_000_0101_01BF14B5.CDF22DA0--