Grasshopper

algorithmic modeling for Rhino

for example this is a help of a command in python i need to understand well how to read this and implement it in a real Case

for example when said  StreamReader(stream: Stream)  or StreamReader(path: str) 

what exactly i need to write between the Parenthesis?

or when something appears with tow __new__  

Help on StreamReader in module __builtin__

| StreamReader(stream: Stream)
| StreamReader(stream: Stream, detectEncodingFromByteOrderMarks: bool)
| StreamReader(stream: Stream, encoding: Encoding)
| StreamReader(stream: Stream, encoding: Encoding, detectEncodingFromByteOrderMarks: bool, bufferSize: int)
| StreamReader(path: str, encoding: Encoding)
| StreamReader(path: str, encoding: Encoding, detectEncodingFromByteOrderMarks: bool)
| StreamReader(path: str, encoding: Encoding, detectEncodingFromByteOrderMarks: bool, bufferSize: int)
| StreamReader(stream: Stream, encoding: Encoding, detectEncodingFromByteOrderMarks: bool)
| StreamReader(path: str)
| StreamReader(path: str, detectEncodingFromByteOrderMarks: bool)
|
|
| Data and other attributes defined here:
|
| Close(...)
| Close(self: StreamReader)
| DiscardBufferedData(...)
| DiscardBufferedData(self: StreamReader)
| Dispose(...)
| Dispose(self: StreamReader, disposing: bool)
| MemberwiseClone(...)
| MemberwiseClone(self: MarshalByRefObject, cloneIdentity: bool) -> MarshalByRefObject
| MemberwiseClone(self: object) -> object
|
| Peek(...)
| Peek(self: StreamReader) -> int
|
| Read(...)
| Read(self: StreamReader) -> int
| Read(self: StreamReader, index: int, count: int) -> (int, Array[Char])
|
| ReadLine(...)
| ReadLine(self: StreamReader) -> str
|
| ReadToEnd(...)
| ReadToEnd(self: StreamReader) -> str
|
| __enter__(...)
| __enter__(self: IDisposable) -> object
|
| __exit__(...)
| __exit__(self: IDisposable, exc_type: object, exc_value: object, exc_back: object)
| __new__(...)
| __new__(cls: type, stream: Stream)
| __new__(cls: type, stream: Stream, detectEncodingFromByteOrderMarks: bool)
| __new__(cls: type, stream: Stream, encoding: Encoding)
| __new__(cls: type, stream: Stream, encoding: Encoding, detectEncodingFromByteOrderMarks: bool)
| __new__(cls: type, stream: Stream, encoding: Encoding, detectEncodingFromByteOrderMarks: bool, bufferSize: int)
| __new__(cls: type, path: str)
| __new__(cls: type, path: str, detectEncodingFromByteOrderMarks: bool)
| __new__(cls: type, path: str, encoding: Encoding)
| __new__(cls: type, path: str, encoding: Encoding, detectEncodingFromByteOrderMarks: bool)
| __new__(cls: type, path: str, encoding: Encoding, detectEncodingFromByteOrderMarks: bool, bufferSize: int)
|
| __reduce_ex__(...)
| helper for pickle

Views: 226

Replies to This Discussion

I'm not clear what is your question here but back to __new__ all the methods which start and end by __ are special methods in Classes.

You can read more here: http://docs.python.org/2/reference/datamodel.html#special-method-names\

I hope it helps.

Mostapha

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service