PDA

View Full Version : mel differences between win and osx?


goin
05-01-2006, 11:09 AM
Hi,

again I have a win/osx related question though asking the second question within a couple of days really makes me feel stupid ;-)

I am trying to write some information into a new file on disk. It's working fine with windows but the command gives me an error message when trying it on a mac. Even the mel example from the help documentation doesn't work....

$exampleFileName = ( `internalVar -userWorkspaceDir` + "example.tmp" );
$fileId=`fopen $exampleFileName`;
fwrite $fileId "Hello there\n";
fclose $fileId;

Then Maya stares at me with:

// Warning: line 3: fopen: unable to open file "example.tmp" for mode "a". //

Sure, the file doesn't exist yet, but on windows it creates a new file if there is not the given one. So how can I make that happen on OSX?

Thanks for listening,
cheers, Ingo

Sanctuary
05-01-2006, 11:32 AM
the OSX it`s a UNIX based system as far as I know, so there may be some privileges issues.

hoping that there are no privileges issues try to create the file with w switch

CGTalk Moderation
05-01-2006, 11:32 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.