[docs] flags is not a parameter in open

Gert gert at fenlogic.com
Mon Aug 18 14:47:18 CEST 2014

says this:
The following constants are options for the /flags/ parameter to the 
open() <https://docs.python.org/3.0/library/functions.html#open> function.

When I follow the link to the open function it does NOT have a flags 
open(/file/[, /mode='r'/[, /buffering=None/[, /encoding=None/[, 
/errors=None/[, /newline=None/[, /closefd=True/]]]]]])¶ 

I am trying to solve this:
My C-code uses: fd = open("/dev/ttyAMA0",O_RDW|O_NDELAY)

the equivalent code in python3 (Raspberry-Pi)  gives an error:
fd = open("/dev/ttyAMA0",os.O_RDW|os.O_NDELAY)
open() second argument must be str, not int

-- Gert

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20140818/108b8355/attachment.html>

More information about the docs mailing list