Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Is there a reason that every script I have written for GRASS in python runs twice? I start them using the GUI script launcher tool, and they all begin with:

#!/usr/bin/python
import grass.script as grass

So nothing fancy. Still, every script always runs through twice, first one run through and then another, with the first run through locking the GUI until it finishes, and the second unlocking the GUI & displaying status update bars, etc. I've confirmed that they're running twice both by using log files & with ps -e. This happens both in GRASS 7.0 and in GRASS 6.4.2 (Ubuntu 12.04). Am I missing something obvious? If not I'll go ahead & submit a bug ticket.

share|improve this question
    
Sounds like an issue with the GUI trying to fire up an out of process thread, executing the script, and then getting the external thread launched. Are you using any threading or multiprocessing in your script? Have you tested via the command line to see if the issue persists? –  Jay Laura Jan 22 '13 at 2:44
1  
Sounds strange, please submit a bug report. –  markusN Jan 22 '13 at 9:52
    
@JayLaura - no threading, no multiprocessing. I have not tried testing via command line; that does seem like a logical next step. markusN - Will do. –  Nat Jan 22 '13 at 14:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.