Kara-Moon Forum
August 24, 2019, 08:44:07 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: You can go back to the main site here: Kara-Moon site
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Windows bug  (Read 75 times)
bvdp
Hero Member
*****
Posts: 998


WWW
« on: July 12, 2019, 04:30:47 PM »

If you are running MMA on a windows OS you will have a minor problem in that the module fcntl doesn't exist on it. To fix, just do the following:

   1. In the file common.py delete line 34: import fcntl

   2. Replace line 63 in common.py with:

        try:   # Windows doesn't know about fcntl and doesn't need it.
            import fcntl
            fcntl.flock(opath, fcntl.LOCK_EX)   # make sure we print in one batch
        except:
            pass

For the curious: the fcntl.flock() sets up a lock so that only one process can write to the output file. This is the file used for reporting warnings, etc. if the environment variable MMA_LOGFILE is set. By wrapping it all in a try/except it all works ... just no file lock on windows.

The next developer release will include this patch.

Logged

My online life: http://www.mellowood.ca
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.028 seconds with 19 queries.