Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Anime Information Script
#1
this is a python(2.6) script that gets anime infromation from anime-planet.com

i have the .py script setup to take system arguments, but the .exe will automatically start on black lagoon and you can search anime from there(so will the .py if you dont give it any system arguments). there is some serious problems on my linux partition when running the program(well not serious, but after viewing a handful of anime it would eventually close), if people want to attempt to use it on linux please give me results on if it worked or not or if there was any way for you to troubleshoot an error.

So far the .exe seems to work flawlessly on windows, the .py script requires 2 modules that arent packaged by default with python so its setup might be a little harder, but if your on linux they can both easily be downloaded through your package manager.(SEE BELOW--v)
( python-lxml & python-wxgtk2.6 )
[Image: 33yi9t0.png]

Heres a download link for VERSION 1.0(sorry about the size, py2exe had an error where i had to include all of lxml and gzip)
http://rapidshare.com/files/356379789/aInfo.exe

Python Source Code (Click to View)
**you need wxpython and lxml modules to run the .py
[Image: sig.php]
Reply
#2
Great, you finished it! It looks nice, how did you work out your thread problem?(I see you didn't use threading)
[Image: izsyo6.jpg]


Reply
#3
(02-26-2010, 09:46 PM)uber1337 Wrote: Great, you finished it! It looks nice, how did you work out your thread problem?(I see you didn't use threading)

ohhh its difficult but i had to create a custom wxpython event that got the information from my threaded getInfo() and it would use that to update the GUI On the same thread.

I still have the same problem I posted about in the linux section on here, but that error doesn't happen at all in windows, and i've only tested it on my linux box, so i dont know if its a global bug or something, but on windows it works, and thats what everyone uses soooo its chill ^^


heres the extracted code that just does the custom python event, i was able to get a really good example not in C++(it was in spanish, but that was only variable names since it was only a source code)
Code:
def EVT_RELOAD(win,func):
    win.Connect(-1,-1,111,func)

class RELOAD(wx.PyEvent):
    def __init__(self, data):
        wx.PyEvent.__init__(self)
        self.SetEventType(111)
        self.data = data

class MyApp(wx.Frame):
    def __init__(self, parent, id, title):
         ...
         EVT_RELOAD(self, self.reload)
         ...
    def getInfo(self, n, link):#THIS GETS THREADED
        ...
        i = (self.TITLE,self.ALTNAME,self.GENRES,self.DESCRIPTION,self.RECOMMENDATIONS,self.IMAGELINK,self.EPISODES,self.STUDIO,self.YEAR)
        wx.PostEvent(n, RELOAD(i))
        ...
[Image: sig.php]
Reply
#4
(02-26-2010, 09:54 PM)Nyx- Wrote: ohhh its difficult but i had to create a custom wxpython event that got the information from my threaded getInfo() and it would use that to update the GUI On the same thread.
Hmm that's a good idea.
The only thing I don't quite understand is this:
Code:
def EVT_RELOAD(win,func):
    win.Connect(-1,-1,111,func)
Oh and btw, the way you "refreshed" your GUI, is that wxPython only or can Tkinter do the same thing:
Code:
class RELOAD(wx.PyEvent):
    def __init__(self, data):
        wx.PyEvent.__init__(self)
        self.SetEventType(111)
        self.data = data
[Image: izsyo6.jpg]


Reply
#5
(02-26-2010, 10:15 PM)uber1337 Wrote: Hmm that's a good idea.
The only thing I don't quite understand is this:
Code:
def EVT_RELOAD(win,func):
    win.Connect(-1,-1,111,func)
Oh and btw, the way you "refreshed" your GUI, is that wxPython only or can Tkinter do the same thing:
Code:
class RELOAD(wx.PyEvent):
    def __init__(self, data):
        wx.PyEvent.__init__(self)
        self.SetEventType(111)
        self.data = data

yea thats how the custom wxpython event is handled, its pretty confusing but i found a tutorial on it and thats what fixxed (some) of my problems. and im not 100% sure on tkinter, i've only made a few GUIs in the past with it for practice
[Image: sig.php]
Reply
#6
That is very clever man. Keep it up.
Reply
#7
Could you link us to the tutorial for the custom widgets @ Nyx-?
[Image: nv70ad.png]
Terrorcore, unleash, extermination
Hyper real, cold blood, determination
fudge them, I like this sensation
Incredible, I from the annihilation
Reply
#8
(04-05-2010, 05:56 PM)Fallen Wrote: Could you link us to the tutorial for the custom widgets @ Nyx-?

it wasn't really a tutorial, it was just a spanish script with all the functions seperated out and basic enough for me to take out the parts i needed lol

this i found googling for wxpython custom events tho, and it has exactly what mine has(probably got it from same place)
http://stackoverflow.com/questions/23456...nt-handler
[Image: sig.php]
Reply
#9
(04-05-2010, 06:15 PM)Nyx- Wrote: it wasn't really a tutorial, it was just a spanish script with all the functions seperated out and basic enough for me to take out the parts i needed lol

this i found googling for wxpython custom events tho, and it has exactly what mine has(probably got it from same place)
http://stackoverflow.com/questions/23456...nt-handler

Awesome thank you
[Image: nv70ad.png]
Terrorcore, unleash, extermination
Hyper real, cold blood, determination
fudge them, I like this sensation
Incredible, I from the annihilation
Reply
#10
Is anime worth getting into? Like where is a good place to start.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)