Scripting input into command line (python)

I was wondering if there is a way to use a rhino command and use input from the script to fill in the command line input.

For instance I have to use the “section” command and draw a section line at one inch intervals for the height of any object that I make. Rather than draw say 20 lines for 20 sections I would rather automate the drawing of these sections. I know python well enough to be dangerous and I can draw 20 lines or 20 start and stop points and I can select objects with just a few user inputs but then using the section command would make me redraw all of those lines anyway.

In short can I skip or interrupt the command line prompt from a rhino command and fill it with information from a python script?

You will have better luck scripting the entire thing including the section part.

I was afraid of that. I was hoping I was missing something and somebody had the fix for me. Thank you for your response.

I didn’t have time to make an example yesterday, hang on a bit…

First of all, you do know about the Contour command I hope? If you are making sections at regular intervals, that command will do exactly what you want, no script needed.

If you are needing something different that, let us know, perhaps with an example?

In terms of rhino experience I have about 3 months of experience and only know what I’ve been shown and what I’ve sussed out. I did not know about this command and it does everything I was trying to do. Thank you for the help, google was not understanding what I wanted.