Hi yo,
I have a long python script, over 1000 lines now and growing. I was thinking
would it be wise to start splitting this big program up into smaller python
files. I have two questions:
1) would this increase the time it takes to run the script. Say it had to load
10 separate python script
On Thu, Mar 19, 2015 at 11:11 AM wrote:
> Hi yo,
>
> I have a long python script, over 1000 lines now and growing. I was
> thinking would it be wise to start splitting this big program up into
> smaller python files. I have two questions:
>
> 1) would this increase the time it takes to run the sc
Hi Sam,
It doesn't honestly sound like your file is too big yet, from a Python
perspective. I've seen MUCH longer single scripts, and it's tough to
really say without an idea of the purpose or structure of your script what
the best way to split it up is. In my experience (I come from a C++/C#
ba
Sam,
As Justin pointed out; don't worry about the load time increase. Focus on
organization.
If you have never made a module or package read this answer:
http://stackoverflow.com/a/15747198
Now, he is my opinion: There is no maximum line count. I can't be sure that
your project needs to be split
Yeah, definitely the right answer. There's a lot of ups and downs in Python,
but you can't learn it without trying. That whole brain dump I had came from a
long time fighting with it, and I wouldn't trade it for anything. You just
have to be aware of what's going on.
That's a really good lin
This is a very interesting topic!
I'm trying to picture myself splitting up a generic and quite large python
script. It almost requires you to rewrite it from scratch, I would say,
although with a lot of copy-pasting from the old script of course.
I wouldn't say I'm an expert in how to layout you
wow!,
thanks eveyone for taking the time to reply to this. Just had a chance to
glance at the responses. But will dive into this soon. seems very interesting
thanks,
Sam
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group