"How to read a binary file using Python?"
"Use open(filename, 'rb') to read a binary file." - Quick came my reply.
"Any other question ?" - I announced.
"Why should I use Python instead of C/C++/Java as it is quite slow?"
"Because life is short and you need Python !" - I smiled.
"It maybe slow, but you save a lot of time when you are coding. Something which can take you a year to write in C++ might take you just a month in Python, which makes it an excellent prototyping tool." - I added.
"Time is running out so now I will take one last question. Anyone ?"
There was silence for a couple of seconds then a lean guy sitting in the back slowly raised his arm. He shuddered then spoke -
"I was quite happy to see in your last slide that you are a mechanical engineer. We have a software in our department called Abaqus. I needed some help regarding scripting. It is based on Python. I have searched the net, but could not find any tutorial or example on how to go ahead with it."
"Well if it is based on Python then it is not possible to not even come across a single tutorial. Moreover what I taught you in the past four days, might be sufficient to give you a head-start."
"No, it is not like you are thinking." - His voice softened as he completed the sentence.
I smiled and ended the lecture. A guy sitting in the front row applauded, others followed.
My first lecture series in IIT K came to an end.
I was happy.
I was feeling proud.
But somewhere deep down I had some remorse. His helpless look passing my mind time and again, and his last question, which remained unanswered.
14 months later ... in a slightly better lecture hall.
"So with this we come to an end. In this lecture we explored the tremendous potential of this software. How Abaqus can be used in Computer Aided Engineering to design better products."
"Any Questions ?"
Someone darted a question.
"How can we vary the seed density for meshing? Suppose I want more density of seeds on one side."
I quickly gave him the solution demonstration.
"How can I add a fixed boundary condition at a node?"
"Well you can use the selection toolbar and activate 'nodes'."
"So now I will take one last question. Anyone?"
No hands were raised, but this question triggered a memory. It was as if I was still searching for that person a midst the folks sitting in front of me.
I addressed them softly - "If someone needs any help with Python scripting in this software feel free to contact me."
It took me such a long time to figure out the answer to that last question !