PyMS v1.2.1

Help - Resources - Discussion
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am

Postby poiuy_qwert » Sun Mar 30, 2008 5:19 am

Wow it really mangles it :(
Also if you have any suggestions on layout or anything just say.

Edit: Bedtime. I uploaded the fixed version. Goodnight!
Laser_Dude
Posts: 34
Joined: Thu May 03, 2007 1:33 am

Postby Laser_Dude » Sun Mar 30, 2008 11:09 pm

Still doesn't seem to work.

Code: Select all

laserdude@laserdude-desktop:~$ cd PyMS
laserdude@laserdude-desktop:~/PyMS$ python PyAI.pyw
Traceback (most recent call last):
  File "PyAI.pyw", line 2253, in <module>
   main()
  File "PyAI.pyw", line 2173, in main
   gui = PyAI()
  File "PyAI.pyw", line 1293, in __init__
   image = PhotoImage(file=os.path.join(BASE_DIR, 'Images','%s.gif' % btn[0]))
  File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 3273, in __init__
   Image.__init__(self, 'photo', name, cnf, master, **kw)
  File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 3229, in __init__
   self.tk.call(('image', 'create', imgtype, name,) + options)
_tkinter.TclError: couldn't open "/home/laserdude/PyMS/Images/opendefault.gif": no such file or directory


"opendefault.gif" isn't a real file, but "opendefault.GIF" is. The names are case sensitive. Renaming all "*.GIF" files in the images folder to "*.gif" fixes this issue, and the program starts normally. I've still yet to test the various features.

I would also assume that it's Python's fault for not following the default scrollbars and such for the system, right, because if possible, I'd prefer for it to look like a native app, with regular scrollbars, file selection menus, etc.
MamiyaOtaru
Posts: 32
Joined: Sat Mar 15, 2008 8:50 am

Postby MamiyaOtaru » Mon Mar 31, 2008 12:02 am

Case sensitivity: true. That is a problem in unices. Which is why I'm surprised to hear about a problem with it after I didn't run into any on Debian or OSX. Certainly it can't hurt to get rid of that possible source of problems. .gif everywhere would be better than some .gif and some .GIF. Robustness and all.

I'd prefer for it to look like a native app
As a Linux user, you should know there is no "native" widget set. What's expected for you (GTK I assume, as in Gnome) would look totally alien on my Qt based KDE desktop. Now, if you were using CDE, Tk (PyAI) would look pretty native :P There are bindings for other toolkits for python, but a Linux user should be pretty used to seeing the odd program or two that doesn't look like the other ones. One I use all the time is Ding. At any rate, Tk was started nine years before GTK and three years before Qt and is as native as it gets. Just not native to Gnome (but Gnome!=Linux) ;) But yeah, PyAI looks pretty fug on Linux. It's a tool though, so I don't mind.

If you want to rewrite the GUI bits to use PyGTK (or better for crossplatform: wxPython) I'm sure that would make an interesting project.
Laser_Dude
Posts: 34
Joined: Thu May 03, 2007 1:33 am

Postby Laser_Dude » Mon Mar 31, 2008 1:21 am

Case sensitivity: true. That is a problem in unices. Which is why I'm surprised to hear about a problem with it after I didn't run into any on Debian or OSX. Certainly it can't hurt to get rid of that possible source of problems. .gif everywhere would be better than some .gif and some .GIF. Robustness and all.
I wouldn't consider it a problem. It's more of something that's specific to the set of operating systems.

As a Linux user, you should know there is no "native" widget set...
I honestly did not know that. Although IMO there probably should be.

If you want to rewrite the GUI bits to use PyGTK (or better for crossplatform: wxPython) I'm sure that would make an interesting project.
I know next to nothing about how Python works or how to code in it.
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am

Postby poiuy_qwert » Mon Mar 31, 2008 3:10 am

lol stupid MSPaint likes too make the .gif into .GIF :S Fixed for next version. Also I cant really help how the GUI is displayed, its up to the OS. Things should look native, but i have no idea. I only really used Tk because it comes built-in with Python, and seeing as almost all the people that have seen my programs go "Oh, I have to download something to make it work?!?!", I didn't want to add anything else. Laser_Dude, how about some screenshots from Linux?

Edit: I went and found out how to make transparent GIFs, expect a nicer toolbar next release.
MamiyaOtaru
Posts: 32
Joined: Sat Mar 15, 2008 8:50 am

Postby MamiyaOtaru » Mon Mar 31, 2008 6:12 am

Here's a shot of it running in Linux (KDE). One can see the widgets not looking like those in other programs, as Laser_dude mentioned. Tk is slightly homely in linux. PyAI gets the job done though!

Image
That dialog is resizable (unlike in OSX IIRC) so one can comfortable read everything.

Side note: now that I've tried with the .xbm in Windows, not only is the black and yellow, it's inverted. The PyAI is black in Linux instead of yellow in windows, and the background is white instead of black in windows. Just weird.

And yes, if you want to stalk me, my name is Jason and I live in the same timezone as Denver :P
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am

Postby poiuy_qwert » Mon Mar 31, 2008 6:20 am

Yeah very odd, though I made it so it uses the .ico if it can, if not it uses the .xbm, so windows users get nice colors and transparency.

Also thanks for the screenshot, even if it made me wanna puke looking at it :S There must be a way to change how it looks...
User avatar
BroodKiller
Posts: 25
Joined: Sat May 19, 2007 4:34 pm

Postby BroodKiller » Mon Mar 31, 2008 7:54 am

Just my 2 cents: Qt indeed doesn't look native, but wxWidgets works much better in this regard.
MamiyaOtaru
Posts: 32
Joined: Sat Mar 15, 2008 8:50 am

Postby MamiyaOtaru » Mon Mar 31, 2008 8:20 am

Huh? I mentioned wxWidgets since a lot of linux users use Gnome, and wxWidgets uses GTK on Linux. Qt is a fine crossplatform library though and looks great on OSX and Windows, and for me as a KDE user would be "native" on Linux. PyAI as it is uses Tk, not Qt. I'm still waiting for something like wxWidgets that can use either Qt or GTK on Linux :-/

Seriously though, that's all out of the scope of PyAI. Tk is great, and looks fine except for those of us on a particular not so widely used OS. I think I'll stop talking about toolkits now and try to let this thread be about PyAI again. :)
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am

Postby poiuy_qwert » Mon Mar 31, 2008 3:14 pm

I don't really have much knowledge in GUI packages, especially about how cross-platform they are. Really I only expected Mac and Windows users to be using it since thats where StarCraft works (excluding wine if StarCraft works with it), and had no idea that Tk would be so hideous on Linux :X I feel sorry for anyone that wants to use it on Linux, but I wont be changing to another GUI package (not that you suggested it, just saying).

Return to “PyMS (poiuy_qwert's complete modding suite)”

Who is online

Users browsing this forum: No registered users and 1 guest