Added: 1 year ago
From: metalx1000
Views: 14,725
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (44)

Sign In or Sign Up now to post a comment!
  • Very good tutorial, I don't know Python and this is all clear to me.

    I like how simple it is to open the window. :)

  • Lol @ hitting space 4 times. xD

    You have to tell vim to write 4 spaces when hitting tab. That's how it work in other text editors and IDEs.

  • how do you get your text editor to work that way?

  • @JosephEaorle: Hum? In what way? What feature are you referring to? I'm using VIM, and mostly the default settings on Linux Mint/Ubuntu, but they may not be the default setting on all systems. 

  • I don't understand why QT is so much more complex than say WPF. In windows forms everything is so simple and natural.

  • @kotapaka i hate windows and microsoft.

    Open source software is free and 1000 times better (and more bugfree!).

  • You can setup the space tabs, with "set tabstop=4" now you can use tabs and ever be 4 spaces in your vim session, you can configurate in your vimrc too

  • __init__ is not integer. It's the function too initialize the class.

  • @kurniasan: I know that. If I said something in this video I apologise.

  • @metalx1000 you probably mistakenly say "integer" at 3:16, or I heard wrong. Anyhow, good tutorials.

  • @kurniasan: I'm sure I did. Thanks for watching.

  • Comment removed

  • tabs are ok for indenting code but not for aligning code. Every one can set the tab width to there preferred width. The important thing is consistency, so to not mix up spaces with tabs.

  • @Julien1345: Agreed

  • Make sure that you are either using python 2.x and pygtk >2.22 or python 3.x and pygtk 2.26 or else it will not find the right modules.

  • thanks for the tutorials great stuff!!!!

  • I did all this exactly and all i get when i run the program is the terminal opens for a second and goes away and I don't get any window.

  • @electroman6913: What is the output you get in the terminal? Can you post that, and your code in the forum so we can look at it?

  • @metalx1000 Your last base.main can't be indented, I tried that, and got an errorr, unexpected indent, so whne you modify this video, have it not indented.

    So the last part looks like this: base = Base()

    base.main()

    Best regards, =)

  • @rick8028: It should be indented. You must have indented differently then you did with the line before it. If you don't indent it will work, but it isn't part of the "if" statement any more. If it isn't part of the 'if' statement then if your if statement fails you will get an error on the base.main() line because you never created base. So, check your indenting so that it is done properly to avoid errors in the future.

  • @metalx1000 Yeah, sorry, I got more errors, I'm not sure where I went wrong. 

  • This, (Linux) has only changed, drastically, the world, by 10% so far. The real change is yet to come. i predict even more fantastic things are going to be created for us, by users (and devolpoers) in the future. we have the basics now; and that is great.

  • @analyzingfunny: I would say 10% of the seen world. Most of the world already runs on Linux You just don't see it. Most GPS Devices, Webservers, ebook readers, Newer TV's, and DVRs run Linux. My new 32" LCD TV is running on Linux, Kindle and Nook Ebook Readers. Garmin and TOM TOM GPS also are running Linux.

    Also, a lot of video camera and digital camera run Linux. Android has about 26% of the market share on Cellphones right now and Android is Linux. Android is also on most Tablets.

  • Whitespace is important in Python. Mixing spaces and tabs is the real thing to avoid, you can use spaces, or you can use tabs if you want to. Most people prefer to use spaces, so it's usually better to get used to doing that, so you can edit their code without any issues.. I wish I knew exactly how to get Vim to replace tabs with spaces, but I haven't figured it out as of yet.

  • @squirrelthetireMOAG: in your vimrc file add this:

    :set tabstop=4

    :set shiftwidth=4

    :set expandtab

  • hmmm... i guess this isn't an intro for noobs, because i didn't understand anything.. :(

  • @elnegrobembon: Well, it kinda is. I would suggest learning Python, before jumping into GUI. What is it you don't get. It's only 10 lines of code. Really, there are only 2 lines that really pertain to making the window.

    win = gtk.Window()

    win.show()

    Feel free to ask any questions.

  • @metalx1000

    yea, i didn't know that you had to know python first..

    i thought this was a python tutorial... but it's cool. i found some python tutorials and i'll probably come back to check this out afterwards..

    thanx..

  • @elnegrobembon: I also have a basic Python tutorial play list on my site. Let me know if you have any questions.

  • @metalx1000

    ok, thanx... i'll check it out right now..

  • My ./win.py isn't launching.. it seems to run the process but then returns to the terminal as if it's been killed.

    I'm on Linux Mint 8.

    Help?

  • @Majortws: Do you get any errors? Did you use win.show()? Post your code in the forums on my site so we can look at it, other wise I could sit here and guess all day and not have a clue what is wrong.

    Thanks

  • Awesome! I will propagate to your channel and specifically to this list of tutorials...

    Thank you

  • @benghaith: Thank you, that will help.

  • I ALWAYS use tab to indent. for VIM set TS to 4 by edit "/etc/vim/vimrc" and add ":set tabstop=4" And for nano fin the row "set tabsize 8" and change it to 4, dont forget to uncomment if it is comment out.

  • @acollsen: Thanks, I knew this could be done, and I've been meaning to. But, I hadn't looked up how to do it. I will do that now. Thanks

  • Is Qt4 already ported to Python 3 so I can use it, as I currently use Tkinter to design GUI's?

  • @ACPCalin: I have not used Python 3 yet, so I can't answer that right now.  Sorry.

  • hahaha maybe i should have watched this before my previous question on the intro vid. look forward to the qt and python stuffs.

  • the /usr/bin/python sometimes doesnt work for me when i move to another computer with the source. /usr/bin/env python, however, i have had 100% success with so far. thanks for the tutorial.

  • python is always welcome. i'd love to see more gtk stuff, but that's just me. thank you for taking the time to make these videos.

  • Thanks! I look forward to the rest of these tutorials!

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more