Skip to main content
Welcome guest. | Register | Login | Post

Uploading Sourcecode?

9 replies [Last post]
supermike's picture
Offline
Joined: 2006-02-17

I wanted to create a supercool PyGTK tutorial that could help one move beyond their knowledge of Bash and into the world of making a simple PyGTK GUI that shells out to call Bash commands and return the results. The mixture can be a great learning experience for noobs. Later on they can expand their Python skills (yeah, I know, ack, spit, but which is worse? Mono? Yuk.) and not have to shell out to Bash as much.

The sample would allow someone to choose a directory where they wanted to do an 'ls' command, then do it and return the result in the textbox below the menubar. Meanwhile, it would demonstrate menubars, updating widgets, showing dialogs and getting their results, etc.

Unfortunately I didn't know what your opinion was on going to this extreme of not only attaching a very small 8.9K file, but discussing the code in sections.

I was hoping to keep it short and sweet -- far shorter than my tutorial on firewalls.

Let me know what you think.

tbuitenh's picture
Offline
Joined: 2005-12-21

Hey! No spitting on python!

free-zombie's picture
Offline
Joined: 2006-03-08

don't mess with pythoneers !
python ftw

oh... and I have a chat program in PyGTK + glade... for a more complex example...

supermike's picture
Offline
Joined: 2006-02-17

tbuitenh. Got a laugh from your comment. I have a love/hate Python relationship, and everyone I talk to at my company, which also includes one of the original developers of the Apache web server team, hissed at me when I demonstrated how to them how to do something in Python with a GUI. I had to wear a helmet around them after that in order to miss getting hit with the rather large pumpkin and other vegetable products.

I only use PyGTK because that's the way everyone builds easy, fairly-stable GUI apps on Linux, predominantly. Most of Red Hat's control panels are built this way. And I don't want to pay for anything like Real Basic, and PHP-GTK just isn't there yet.

a thing's picture
Offline
Joined: 2005-12-20

Sound like a good way of explaining it, although I'm personally not intrested in Python or GTK (KDE FTW).

tbuitenh's picture
Offline
Joined: 2005-12-21

The only GUI work I did in Python was with TkInter, not PyGTK. It was much cleaner than all other GUI code I have ever seen (all C), but leave it to me to waste it all by adding exceptions everywhere, for everything including sudden failure of the universe (in a manner of speaking, of course).

Anyway, if you want to be a real purist, you should write your GUI code in a separate GUI language. If you won't do that, use an OO language, doesn't really matter which one.

So the only thing I can imagine your cow-orkers hate is Python itself. I have to agree all this self.foo = bar is silly, but that's the only really bad thing in Python. The list of shame for C++ with STL or for Java is much longer than one item... Never mind Perl (IIRC they did add OO to Perl some time ago, and it IS used for GUIs).

free-zombie's picture
Offline
Joined: 2006-03-08

OO perl, pffffft. worse/dirtier than OO javascript, and that's saying something.

supermike's picture
Offline
Joined: 2006-02-17

So what's the vote? Does nuxified agree we should provide a place for small source code to a limit, or should we be required to place it somewhere else and link it?

free-zombie's picture
Offline
Joined: 2006-03-08

/me has no problem with code

libervisco's picture
Offline
Joined: 2006-05-04
"supermike" wrote:

So what's the vote? Does nuxified agree we should provide a place for small source code to a limit, or should we be required to place it somewhere else and link it?

Sorry I'm coming rather late at this..

Yes, I wouldn't mind it. What exactly do you mean though, to allow some source code files in attachements or have a special section for uploading and viewing code?

Comment viewing options