I am using the python-smbc library on Ubuntu to access a samba share. I can access the directory structure fine, I am however not sure how to access actual files and their c
If you've managed to get the directory structure then you have a working context. The key to actually accessing files is the undocumented flags argument of Context.open. (I haven't figured out what mode is for either but it doesn't seem necessary.)
flags is how you tell pysmbc what type of access to the file you want. You do that by passing it an integer made by bitwise ORing (|) flags from the os module together. Specifically the flags you want or suffixed with os.O_ (see a list in the Python documentation here).
For example, to write to a file you would set flags to os.O_WRONLY (equiavlent to using "w" as the mode parameter of the built in open function) and to append to a file that might already exist use os.O_WRONLY | os.O_APPEND | os.O_CREAT (equivalent to "a+").
That call will then return a file object which you can use like any normal, local file.