It is currently Sat Nov 22, 2014 8:56 pm


Latest GIMP Scripts & Plug-ins

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 12 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Gimp Scripts .com
PostPosted: Mon Jan 16, 2012 2:14 am  (#11) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 788
Location: Here and there
GnuTux wrote:
Was that the "Test For Duplicates" script, paynek? I certainly try to reflect the information provided by the uploader but there could have been an error made. Your script, being a .scm, wouldn't it run across all platforms?


Yes that was the "Test For Duplicates" script, and no, it initially didn't work on Linux/MAC. Any script that accesses the file system has the potential to be written to be not cross-platform thanks to the directory-separator differences ( "/" vs. "\" ). Obviously this can be fixed by use of the DIR-SEPARATOR constant. My problem was with the searchpath separator differences (";" vs. ":") for which the equivalent fix:- SEACRCHPATH-SEPARATOR, only exists 2.7.4 onwards.

The thing that's going to become important soon(ish) is the GIMP version.

Kevin

P.S. Being able to update the details on my script would be useful as the built-in fix for SEARCHPATH-SEPARATOR breaks my script so it can't claim to work on 2.7.x any more, and I don't think I'd want to claim compatibility with an ill-defined moving target anyway.


Top
 Profile  
 
 Post subject: Re: Gimp Scripts .com
PostPosted: Tue Jan 17, 2012 2:42 am  (#12) 
Offline
GC Founder/Coder
User avatar

Joined: May 22, 2008
Posts: 4774
Location: Gimpville
paynekj wrote:
Yes that was the "Test For Duplicates" script, and no, it initially didn't work on Linux/MAC. Any script that accesses the file system has the potential to be written to be not cross-platform thanks to the directory-separator differences ( "/" vs. "\" ). Obviously this can be fixed by use of the DIR-SEPARATOR constant. My problem was with the searchpath separator differences (";" vs. ":") for which the equivalent fix:- SEACRCHPATH-SEPARATOR, only exists 2.7.4 onwards..

Ah, I should have considered that your script manipulates the folder index of the file system, duh!

Is there no reliable way to detect OS in PyGimp, so you could make the "separator" type a variable, or are you just stuck with limited internal procedures to manipulate the file system?

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

* Login  

* Subscribe to Gimp Chat's RSS Feed    * Subscribe to Gimp Chat's Tutorial Feed    * Subscribe to Gimp Chat's G'MIC Feed


Powered by phpBB3 © phpBB Group