![]() |
|
Re: ** Python Support Thread **
Code:
aCode:
"a" |
Re: ** Python Support Thread **
I am going to try to write a GUI program for my fantasy football leagues' live drafts this year.
My first though was to write it in javascript and run it on localhost, but I've never worked with python GUI stuff so I'd like to learn it. Anyone have any experience/recommendations for which GUI package to use? It seems like there are many options - with TkInter being the stdlib one. The program should be fairly simple and not very intensive. I'll simply have a form which holds all of the players and various information about them, a "DRAFT ME" button, and a second page/tab which lists the big board (where and to which team each player was drafted). |
Re: ** Python Support Thread **
OK, so you'd only do that when comparing strings. When comparing integers, you wouldn't use quotes...yeah?
|
Re: ** Python Support Thread **
Quote:
|
Re: ** Python Support Thread **
Code:
a = 5 |
Re: ** Python Support Thread **
Thanks guys. Fwiw, an actual explanation is much more helpful than the above.
|
Re: ** Python Support Thread **
What Xhad did was wholly appropriate: Python has a REPL that you should learn to use and master. He simply showed you the steps you may want to take when you use it.
Comparisons like this are something you have to teach yourself in order to understand it and your not going to learn w/o experimentation. You're facing a midterm, this is day-one stuff. |
Re: ** Python Support Thread **
Quote:
|
Re: ** Python Support Thread **
Quote:
QT is maybe a bit more popular and includes more "application framework" stuff than wx. I don't have much experience with it though so I can't really comment on it. You might also want to check out http://www.python-camelot.com/ which is built on top of QT. I saw a talk by the creator at a Python conference and it looked pretty cool. |
Re: ** Python Support Thread **
@myNameisInga,
Meant that your explanation was more helpful than Xhad's. No offense meant to either, just an observation. |
Re: ** Python Support Thread **
Quote:
i think it handles large applications alright. |
Re: ** Python Support Thread **
Quote:
|
Re: ** Python Support Thread **
Quote:
Second, one application being written in a language isn't proof of anything. If you want to debate the merits of python vs. whatever - I'm cool with that, but this is a silly post. So to counter your one vague data point with one of my own. Friends of mine at Google say that python is discouraged for large applications. It's used for scripting, prototypes, and small projects but thats about it. |
Re: ** Python Support Thread **
yeah, there is no way EVE is the largest application in the world. My guess is teh largest program in the world is written in COBOL :p
|
Re: ** Python Support Thread **
Quote:
|
Re: ** Python Support Thread **
Quote:
Also, it's not a matter of Xhad's post being appropriate. It's a matter of responses being helpful. And, given that this is a support thread, it's *probably* better if the responses are helpful... Finally, your comment about "this is day-one stuff." What does the that have to do with anything? I could have posted something like "lol DaveT, learn calc 1 before posting in this thread." But it'd be irrelevant. |
Re: ** Python Support Thread **
These are user supported forums, meaning no one here is getting paid to answer questions. Complaining about the tone of a forum is all well and good, but getting mad at people for not answering the question the way you want is not going to go over well on 2+2. The comment about you line of questioning being fist day stuff should have indicated to you to go back to whatever text book or notes you are taking for this corse and see where the hole in your learning was.
|
Re: ** Python Support Thread **
Quote:
Code:
if letter in ['a','e','i','o','u']: print('ZOMG')(replace print with counting or whatever you want to do of course) |
Re: ** Python Support Thread **
@Kerowo,
I'm well aware these are user-supported forums; I help out in the SMP Math/Physics HW thread all the time. Who's getting mad here? I was providing constructive criticism. It's not as if someone responding can either: a) give advice that's terse/uninstructive or b) not give advice at all There's actually a third option: namely, giving advice and providing some sort of motivation for it, even if it *seems* obvious. The comment that "you're facing a mid-term, this is day-one stuff" is just a ****head thing to say. Let's not pretend it was actually meant to help me figure out exactly where in the book to find the answer. My assumption in saying that more explanation is more helpful was meant to be constructive; my guess is most people prefer more explanation rather than just the answer. |
Re: ** Python Support Thread **
You're reading tone into a post that probably isn't there. To my ear the tone of your constructive criticism was worse than the day one stuff response.
|
Re: ** Python Support Thread **
As much as I want to debate this, let's move on.
|
Re: ** Python Support Thread **
Mariogs, if you'd like a correlation, imagine if someone went into SMP and said they had a mid-term tomorrow, and they came in with this question:
"What's the difference between y and y(0)?" And knowing that the mid-term likely covers stuff the chain rule and implicit differentiation or MVT, I guess you'd be pretty much falling out of your seat if someone came in and asked such a question. Did they do any homework at all? Did they think about anything they wrote down as they wrote it? Did they skip the entire first half the class and are now cramming? Understanding the difference between a string, a number, and a variable is so fundamental to programming that I can tell you just about what page it is in any introductory text on programming or "Learn XXXX Language" book: less than 5 pages after the Introduction and About Us" page. This book dives into the nitty-gritty on page 11, which is the first page of Chapter 2, one page after the introduction: http://www.greenteapress.com/thinkpython/thinkCSpy.pdf This book starts the same thing on page 37, which yeah, has a long-winded 2-chapter introduction on the virtues of Python: http://books.google.com/books?id=1Hx...python&f=false But them again, programmers can't live without google: http://www.google.com/webhp?rlz=1C1L...w=1366&bih=667 Google is a wonderful resource and repository for basic programming questions. You'll find 1,000 word blogs on your question. |
Re: ** Python Support Thread **
I trying to get into programming graphics. I've looked around a bit and it looks like tkinter, pygtk, pyqt, and wxpython are the main modules being used. I'm curious what the big differences are between these, if any. Generally the posts I've seen will say that which one is the best will depend on what you're trying to do, but I haven't seen anything that says if you're trying to do x, this is better, if you're trying to do y, that one's is better.
Am I right thinking that tkinter is good to start learning, but I should move on to one of the others when I can? It seems some people seem to think tkinter isn't robust enough. And then from there it's pretty much all similar. What are other people using? |
Re: ** Python Support Thread **
I'm kind of in the same boat but would actually prefer xulrunner or something like that. Alas I don't really have much time to compare etc.
I also seem to be incapable of googling something usefull for "web technology based multi window application development" or basically "what are my options if I want to develop a multi window desktop application but kind of want it to run everywhere and use webby stuff" |
Re: ** Python Support Thread **
i am still very much a python beginner. i've gone through a python book and understand the simple examples. now i'm trying to use python to scrape data. this is difficult thus far.
i'm using beautiful soup and urllib2. i've looked at several examples which have helped me to write lines of code that is getting me closer to what i want to do. but i still haven't gotten to the point of being able to actually put that data into a meaningful format that can be analysed, much less scrape it in a systematic patterned way so that the process could be automatized to pull hundreds of data points. here's an extremely simple example from stackoverflow, and i can't even replicate it, and i have no idea why: http://stackoverflow.com/questions/2...ng-with-python in the link, someone poses a question about how to scrape sunrise and sunset times. another user posts an answer (the first one) which ought to do the trick. however, when i copy paste this code, i do not see a list of sunrise/sunset times. either: i copy paste the entire code Code:
import urllib2or, i will copy paste this part: Code:
import urllib2Code:
for row in soup('table', {'class' : 'spad'})[0].tbody('tr'):Code:
Traceback (most recent call last):why do i get an error message when i copy/paste in 2 waves instead of typing it all in one wave? shouldn't it not matter, as the first paste is just identifying the variable soup, which should still be stored when i paste the second half? why am i getting maximum recursion error? why is it not printing the sunrises and sunsets in the first example where i copy/paste the entire thing and nothing happens? thanks for your help! |
| All times are GMT -4. The time now is 06:18 PM. |
|
Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Copyright © 2008-2020, Two Plus Two Interactive