Gimptalk - Premier Gimp Community: Python and Gimp - Gimptalk - Premier Gimp Community

Jump to content

  • 6 Pages +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Python and Gimp

#21 User is offline   PhotoComix 

  • GT Senior Moderator
  • Group: Senior Moderators
  • Posts: 11,288
  • Joined: 13-June 05

Posted 14 November 2007 - 10:46 PM

:l:

You my hero!...now i can try again... :h: :h:
0

#22 User is offline   PhotoComix 

  • GT Senior Moderator
  • Group: Senior Moderators
  • Posts: 11,288
  • Joined: 13-June 05

Posted 22 November 2007 - 09:55 PM

DAMN...

now i got python option...

but gimp install(2.4.2) is screwed up...no filter, no script fu in Xtns menu, ...it can not even open a jpg (unknow file type...)
As usual should be a problem of wrong paths...i hoped was fixed but again happened

PS
i had to correct all paths in preference....now i get all menu back...more python
0

#23 User is offline   XyllyX 

  • Newbie
  • Pip
  • Group: Retired Staff
  • Posts: 3
  • Joined: 14-June 05

Posted 22 November 2007 - 10:58 PM

I followed the instructions in the thread (basically the last bit posted by megadyptes) and everything worked just fine. Interestingly enough, when I went to save the test script from Sean-Michael's initial post...I discovered that there are some python scripts apparently already installed in the 2.4.1 base install. Now I just have to figure out where they are buried in the menus.
0

#24 User is offline   PhotoComix 

  • GT Senior Moderator
  • Group: Senior Moderators
  • Posts: 11,288
  • Joined: 13-June 05

Posted 25 November 2007 - 02:24 PM

@Clayogre
i just discover a handy py script that you may like

is to create and edit brush...I always wonder why was no possible in gimp edit brush on the fly as is possible with any other image (brush are images) well the script help doing it

Author is Tanda and the script "edit brush" is listed in the Plugin repository, there is a english and a spanish version...only little disturbance it create a new menu (...i already get too much extra menu: pandora, video,python -fu, script-fu, FX_foundry...and more ....)...anyway that could be changed by simply opening the script with a text editor and changing the script path(s) as for script fu...only the paths to correct are much more then one and must be corrected all (or none) for the script to work
0

#25 User is offline   PhotoComix 

  • GT Senior Moderator
  • Group: Senior Moderators
  • Posts: 11,288
  • Joined: 13-June 05

Posted 17 January 2008 - 10:46 PM

I edited the first message to provide a link i hope useful:
all you need to add Python to Gimp in a single pack (installers+ how to)

Pack is updated at 18/1/2008, but all the links to check if newer version are available are included, anyway if you notice the need to update something, please, let me know
0

#26 User is offline   mohamedzv2 

  • Member
  • PipPip
  • Group: Members
  • Posts: 48
  • Joined: 01-January 08

Posted 19 January 2008 - 12:09 AM

Just a quick question. What is python?
0

#27 User is offline   PhotoComix 

  • GT Senior Moderator
  • Group: Senior Moderators
  • Posts: 11,288
  • Joined: 13-June 05

Posted 19 January 2008 - 12:51 AM

http://en.wikipedia....ing_language%29
0

#28 User is offline   codename47 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: 31-January 08

Posted 31 January 2008 - 03:31 PM

Thank you so much. With this pack, gimp-python is peace of cake (sounds like an advertisements :h: )
0

#29 User is offline   wired_house 

  • Member
  • PipPip
  • Group: Members
  • Posts: 11
  • Joined: 16-March 08

Posted 16 March 2008 - 04:46 AM

Just interested. Python I have only used for bruteforce purposes. (no worries, not hacking.) I have only known how to make server side scripts with Python. What is the usefulnesses with Python and GIMP?
0

#30 User is offline   Sean-Michael 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 1,587
  • Joined: 02-May 05

Posted 16 March 2008 - 05:23 PM

Seems to be used mostly to write plug-ins for gimp, or as an alternative to writing script-fu. I would think that you would have a easy time writing such plug-ins if you already have a background with python...?

Here's one link that might be helpful, maybe not.
http://www.gimp.org/...thon/index.html
0

#31 User is offline   PhotoComix 

  • GT Senior Moderator
  • Group: Senior Moderators
  • Posts: 11,288
  • Joined: 13-June 05

Posted 16 March 2008 - 06:54 PM

Quote

What is the usefulnesses with Python and GIMP?


well the usefulness should be that if you have gimp and you know Phyton you may write your script in a language you know instead that learn a new one
then even if less complex then C it may be more powerful then script fu ,and anyway is more widely know and used...hem...Not sure if "more powerful "is a right term

But as example with script fu you CAN NOT add a preview display in the GUI of your script while that with Python is possible
Possible even ,if i well understand not without effort and fiddling with maybe not too documented Py-GTK thingies

Anyway scripting is not in my field of knowledge, if you want better info i will suggest to ask also on the gimp-developers mailing list where you may expect more competent answers
0

#32 User is offline   stradivuckos 

  • Member
  • PipPip
  • Group: Members
  • Posts: 122
  • Joined: 05-March 08

Posted 17 March 2008 - 01:45 PM

Hmm can't get edit brush py script to work this is what i get in error dialog:
Traceback (most recent call last):
  File "C:\Program Files\GIMP-2.0\lib\gimp\2.0\python\gimpfu.py", line 662, in response
    dialog.res = run_script(params)
  File "C:\Program Files\GIMP-2.0\lib\gimp\2.0\python\gimpfu.py", line 347, in run_script
    return apply(function, params)
  File "C:\Program Files\GIMP-2.0\lib\gimp\2.0\plug-ins\Edit-Brushes-Tanda-v2.1.py", line 179, in actual
    pdb.gimp_context_set_brush(nombre_pincel)
RuntimeError: execution error

Yep runtime error (i got the latest python (2.5.2) and pyobject pycairo and other. I have no clue why this isn't working.
Posted Image
You also have an image filled with the color black. (It makes me think of Amy Winehouse, but I digress)<--ccbarr :D
Add me on xfire: stradivuckos
0

#33 User is offline   m_hasper 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 16-April 08

Posted 16 April 2008 - 08:10 AM

thanks alot for this post, it got me started and with some tweaks I finally achieved succes with gimp 2.4.5 on vista. My procedure:

Basic procedure:
Install Python 2.5.2
Restart (not sure if this is needed)
Install Gimp 2.4.5 (python support greyed out)
Install pycairo 1.4.12-1 (run as administrator)
Install pygobject 2.14.1-1 (run as administrator)
install pygtk 2.12.1-2 (run as administrator)
Restart (not sure if this is needed)
ReInstall Gimp (python support enabled)

Now for the problems / tweaks
- import gtk from python console fails, python cannot find libglib, I think this is a path problem, gtk is installed in gimp folder and python can't find it, just ignore this problem because when gimp is started libglib IS in the path
- When GIMP is started it gives an error on pyconsole.py with a message that g_assertion_message is not defined in libglib. To fix this you need the last version of this dll, I used 2.16.2 at http://ftp.acc.umu.s...in32/glib/2.16/. Place all the files in the bin folder of the zip in the gimp bin folder (replace the old files).

I tested the install with this useful script http://fforw.megamet.../code/SaveLayer
0

#34 User is offline   GekiViolet 

  • Member
  • PipPip
  • Group: Members
  • Posts: 17
  • Joined: 05-May 08
  • LocationPhilippines

Posted 05 May 2008 - 03:08 AM

I have a problem on import gtk on the Python command line.
An error message occurs.
The procedure entry point g_timeout_add_seconds_full could not be located in the dynamic link library libglib-2.0-0.dll.

Pls help me.
0

#35 User is offline   ccbarr 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 1,705
  • Joined: 23-February 06

Posted 05 May 2008 - 10:35 PM

GekiViolet,

Using my favorite search engine, I entered the search terms:

Quote

procedure entry point g_timeout_add_seconds_full could not be located in the dynamic link library libglib-2.0-0.dll


Just as it read from your error. I was lead to this link:

http://www.asahi-net...pantograph.html

While it addresses Python and Blender, it addresses the specific error towards the bottom of that page along with a recommended solution. I don't use Windows, so I cannot be of any further help with this. Just mentioning this in case it can help you.

:h:
0

#36 User is offline   GekiViolet 

  • Member
  • PipPip
  • Group: Members
  • Posts: 17
  • Joined: 05-May 08
  • LocationPhilippines

Posted 06 May 2008 - 05:47 AM

I've tried what the link said. Adding a path to the System Variables.
But on the other hand, the troubleshooting said that maybe other programs are using it so I may have to remove other paths.

These are the paths on the System Variabl>Paths
%GTK_BASEPATH%\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\GIMP-2.0\bin

Help plz.
0

#37 User is offline   PhotoComix 

  • GT Senior Moderator
  • Group: Senior Moderators
  • Posts: 11,288
  • Joined: 13-June 05

Posted 06 May 2008 - 10:31 AM

@Geki Violet
Just above your first message there is one that report a similar problem and possible solution

Anyway i believe the path problem happen if you instead that install the GTK you try to use that bundled with gimp,even if that is the advice on http://www.asahi-net.or.jp/~rd6t-kjym/t ... graph.html
i'm not sure is the best solution
your second path seems connected with the graphic card at least with the program that control it, i would no touch it, the third is to gimp, about the first i have no idea, howver adding a path should not create problem to other sw that already have a path for the gtk

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
anyway should be some other problem with Gimp-python on windows:
after a upgrade to gimp 2.4.5 (i suppose may be that the reason but i can't be sure may be some new sw that i installed ) python do no work anymore for me and even reistalling everything didn't solve, i have the python console but no any python script show up in the menu.
0

#38 User is offline   GekiViolet 

  • Member
  • PipPip
  • Group: Members
  • Posts: 17
  • Joined: 05-May 08
  • LocationPhilippines

Posted 06 May 2008 - 11:18 AM

Ok ty PhotoComix. I'll uninstall python instead so I don't have a problem.
0

#39 User is offline   PhotoComix 

  • GT Senior Moderator
  • Group: Senior Moderators
  • Posts: 11,288
  • Joined: 13-June 05

Posted 06 May 2008 - 11:39 AM

Quote

Ok ty PhotoComix. I'll uninstall python instead so I don't have a problem.


well a radical way to solve the problem.
i wish i could offer a better one but as i said my own install do not work anymore so i don't feel to give advice
0

#40 User is offline   gasto 

  • Member
  • PipPip
  • Group: Members
  • Posts: 232
  • Joined: 17-December 07

Posted 09 May 2008 - 10:24 PM

Hello guys, is there a friendly tutorial on running gimpfu scripts? I 've seen http://www.gimp.org/...thon/index.html but it is pretty rude, for example I haven't read how to run one of this sample scripts!

Any help really apreciated, thanks.

By the way, installing this python extension was a pain, for me using Windows XP SP2, it took python 2.5.2 and gimp 2.4.5.

Cheers.
0

Share this topic:


  • 6 Pages +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic