[Maya/Python] - Crossing over from PC to MAC

Morning everybody.

I’m getting ready my hands on a MAC to do some testing on a Python script for Maya that I developed on a PC. The script itself uses the following modules-

import maya.cmds as cmds
import math
import pickle
from os import listdir
import os
import ConfigParser
from os.path import isfile, join

and urllib2

I’m going to be doing the ground work to see if it breaks on a MAC, but I wanted to ask if anyone had any pointers on the topic of Mac vs PC when it comes to Python scripts for Maya? What are going to be common issues when I’m doing the cross over? I assume I’m going to need to make a MAC compatible version separate from the PC version of the script.

I figure right out of the gate I’m going to have issues with directory handling. Anything else you guys can think of so I can be prepped going into this (almost 2k lines of solid code so there is some decent complexity with this scirpt)?

Also… I don’t suppose there would be a clever way to ensure the script works on a MAC from a PC? Although do-able, it sounds like a pain to have to install Maya/Vray on a MAC just to test MAC compatibility (probably a necessary part of testing, but I just wanted to check).

As always, many thanks for your time and reading through my post.

Best,
9k

Python’s os and os.path libraries are already cross platform. So unless you’re hard coding all of your paths you should be safe in that regard. Keep in mind python is primarily developed by *nix folks on *nix based operating systems, it’s windows developers that are kind of the odd group.

That’s good to know! I really didn’t want to completely re-work this script for use on a Mac. Also I had no clue python was developed by the *nix community. Thank you for the input.