Starting Python development

Contribute code to SolydXK and make it even better.
RavenLX

Re: Starting Python development

Postby RavenLX » 08 Sep 2014 03:00

I think in all my years of programming, I personally found that every language has it's frustrating parts. And there's been times I have also said "I should have written this in [another language here] instead." But then go try another language and find that I end up against another brick wall in the development process again but in another part of the project. The best I could come up with is to try and pick your language that best suits the project before you start the project and then stick with it until the end.

But, my way isn't always the best way either. Many times, it really is better to do some things in more than one language. Like writing a C library and linking it to some other language, for example, so that you get the power of the code in the C library but the ease of use or benefits of the other language.

oneleaf
Posts: 18
Joined: 06 Aug 2014 06:38

Re: Starting Python development

Postby oneleaf » 10 Sep 2014 03:59

I was curious if anyone could compare working with Tkinter vs PyGobject/PyGTK? I found Tkinter very easy and fun to use. Are the GTK+ GUI kits similar in concept? I have looked at Glade before, but if PyGobject is similar to how it works in Tkinter, I might just give it a try without using Glade. Unless people highly recommend using Glade?

RavenLX

Re: Starting Python development

Postby RavenLX » 10 Sep 2014 04:34

I haven't worked with TKinter but I think you might find Glade interesting. I like it because it's more WYSIWYG oriented and you can design the interface easily. That's what Glade is basically: an interface designer that saves an XML file that describes the interface and you can then link it into Python and I think even C/C++ if I'm not mistaken? Glade is a GUI interface creation tool.

oneleaf
Posts: 18
Joined: 06 Aug 2014 06:38

Re: Starting Python development

Postby oneleaf » 10 Sep 2014 05:43

RavenLX wrote:I haven't worked with TKinter but I think you might find Glade interesting. I like it because it's more WYSIWYG oriented and you can design the interface easily. That's what Glade is basically: an interface designer that saves an XML file that describes the interface and you can then link it into Python and I think even C/C++ if I'm not mistaken? Glade is a GUI interface creation tool.


Thanks, I will likely give it a try soon. I guess I was curious if anyone used the PyGTK/PyGObject without Glade, and how tedious it was (for someone coming from Tkinter). I guess there is only one way to find out! :) I will take a look at the documentation and see how I get on, and maybe move over to doing it with Glade.

RavenLX

Re: Starting Python development

Postby RavenLX » 10 Sep 2014 16:55

If you could come up with a basic tutorial on Python/GTK+ without glade, that would also be very useful. Let us know how that goes as well, if you're able.

oneleaf
Posts: 18
Joined: 06 Aug 2014 06:38

Re: Starting Python development

Postby oneleaf » 10 Sep 2014 17:11

RavenLX wrote:If you could come up with a basic tutorial on Python/GTK+ without glade, that would also be very useful. Let us know how that goes as well, if you're able.


Cool will do. I took a look at the GTK3 documentation last night and really struggled to get the exact name and descriptions of the methods and properties, which didn't match what was available in the module. The API documentation appears to not match the module and the readthedocs tutorial is not comprehensive enough. I am wondering if the PyGTK (GTK2 based) and PyGOBject (GTK3 based) has a lot of stuff mixed up and documentation is still in a state of turmoil. So I found Scott Quier's link to the pdf in the previous page and it looks like a much more accurate resource. So I am going to use that.

Took a look at Glade. Took awhile to figure out how it all works, but I do think I will try it without Glade first.

oneleaf
Posts: 18
Joined: 06 Aug 2014 06:38

Re: Starting Python development

Postby oneleaf » 13 Sep 2014 02:49

RavenLX wrote:If you could come up with a basic tutorial on Python/GTK+ without glade, that would also be very useful. Let us know how that goes as well, if you're able.


Alright just finished a prototype using the Gtk bindings directly. Definitely doable and for simple applications, I think many people may like doing it this way. I used both the grid and the box layout and found them both very convenient.

The biggest issue is that documentation is a bit hard to find. Lots of parameters, attributes, and methods did not seem to match the documentation I found. Takes a bit of futzing around, but once you get the hang of it, it is pretty easy. I also learned that Gtk+ is not threadsafe, but they do provide a nice mechanism for sending separate treads to the main thread, which was very handy for the app I was working on.

Not sure if a tutorial will be more useful than just looking at my heavily commented code explaining all the steps. Once I can think of a name for this application, I will put it up on Github. On that note, can anyone help me come up with a good name for a Time Machine-like Backup program? It does timestamped versions in separate directories using hard links to allow for incrementation, and you can monitor backups in a virtual terminal. Lets you save and manage your backup jobs.:)

Here is what it looks like: main window plus popup window when running backup:

Image

RavenLX

Re: Starting Python development

Postby RavenLX » 13 Sep 2014 12:08

You must be a Battlestar Galactica Fan from what I see by what you named your program. 8-) (Personally, I love the '70s Cylons, thus why my avatar looks like it does. :twisted: )

Anyway, time machine? Maybe something back to the future-ish? Or TardisBackup (I am not a Dr. Who fan so I probably don't know what I'm talking about there)?

Or The Backup Vortex?

I always had problems figuring out names for things.

Anyway, would be glad to take a look at your code once you have it on github.

RavenLX

Re: Starting Python development

Postby RavenLX » 13 Sep 2014 13:01

I've just signed up for this course: https://www.coursera.org/course/interactivepython

Hopefully it'll help me learn Python. It's free. I'll be discussing it in this thread, if I have anything to report:

viewtopic.php?f=27&t=4664&p=44216#p44216

oneleaf
Posts: 18
Joined: 06 Aug 2014 06:38

Re: Starting Python development

Postby oneleaf » 13 Sep 2014 20:56

RavenLX wrote:I've just signed up for this course: https://www.coursera.org/course/interactivepython

Hopefully it'll help me learn Python. It's free. I'll be discussing it in this thread, if I have anything to report:

viewtopic.php?f=27&t=4664&p=44216#p44216



Cool! I would be interested in taking that course too. I am starting a Coursera course on Scala on Monday.

Yep, big BSG fan :)
Wanted to call the backup program frakkup, haha.

RavenLX

Re: Starting Python development

Postby RavenLX » 13 Sep 2014 22:21

Frakkup is even better! :mrgreen:

User avatar
jsalpha2
Posts: 293
Joined: 28 May 2013 12:28

Re: Starting Python development

Postby jsalpha2 » 17 May 2017 13:21

Saw on Betanews today. Learning Python E-Book for free. https://betanews.com/2017/05/17/get-learning-python-ebook-40-value-free/
They seem to want business users, but let me download a copy anyway. I never got to far last time I tried to learn python...(frowny face.)

User avatar
ilu
Posts: 1362
Joined: 09 Oct 2013 12:45

Re: Starting Python development

Postby ilu » 18 May 2017 13:27

I hope you did not fill in any correct data. No book is worth giving away that much information, especially if you are really working in a company's backoffice. With working spam filters nobody will care about advertising, but that's the kind of data needed to prepare fishing attacks.


Return to “Code”

Who is online

Users browsing this forum: No registered users and 1 guest