- Strength to Increase Rep
- +4
- Strength to Decrease Rep
- -1
- Upvotes Received
- 15
- Posts with Upvotes
- 10
- Upvoting Members
- 6
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Programming, alcohol, stimulants, mathematics, girls
- PC Specs
- Tablet PC
Re: Well, here's the tutorial like you asked for. I've expanded on it quite a bit. Could people please read over it, in case I've made mistakes? There's a better version at my blog because it features screenshots. Link: [url]http://fuse.baywords.com/wxpython-tutorial/[/url] [b]Tutorial: GUI programming with wxPython[/b] [B]Index[/B] [URL="http://www.daniweb.com/forums/post623596-2.html"]Introduction[/URL] [URL="http://www.daniweb.com/forums/post623596-2.html"]Start[/URL] [url=http://www.daniweb.com/forums/post623598-3.html]Sizers[/url] [url=http://www.daniweb.com/forums/post623600-4.html]Putting it … | |
I have a problem guys. It's due to duck typing. Now I expected to run into something like this sooner or later, but I can't help but feel there's a better solution. [code=Python]import re def patternMatching(pattern, string): matchList = re.findall(pattern, string) print '\n'.join(['%s' % v for v in matchList]) [/code] … | |
Re: I was about to try and help, but then I realised this is Tk. :( | |
Re: Press F5 whilst in IDLE. If you choose to run your code outside IDLE, you'll probably see it flicker and disappear, so you'll need to use command prompt instead. | |
Re: Hahaha, wow. I tried this exact same thing. Actually, I thought about trying it (got as far as using SetValue for the textbox when programme loads), but decided instead to use wx.SearchCtrl. wx.SearchCtrl is a subclass of wxTextCtrl, so it inherits all of the same stuff, but the benefit is … | |
Re: Because if you need to do a graphical game, I'm not entirely sure you have enough time to learn PyGame. Although I suppose it'd be very easy to modify chimp.py to suit your needs. | |
Re: You don't use colons or semicolons in Python, normally. Only use colons for: if else elif def class for while And similar. Do not use a colon for import. | |
Re: Here's my advice: [url]http://www.daniweb.com/forums/thread128350.html[/url] My other advice would be Kubuntu. But kudos for the LOGOWriter reference. | |
Re: Don't be discouraged! The Python standard documentation is thorough, and there is much information out there for you. In future if you're wondering if there's, say, a function to break a string up at every comma, you could try typing this in google: string python First result is your answer: … | |
Re: We're up to 2.5 now man. [url]http://www.python.org/download/releases/2.5.2/[/url] | |
Re: I learnt wxPython yesterday. I tried Tkinter at first, but disliked it. Here's a summary of why: [url]http://www.wxpython.org/quotes.php[/url] It's really easy to learn and understand. The trouble is there's little sample code and many tutorials on it are out of date because it seems to change a fair bit each … | |
Re: Hi. I cleaned up your code. I didn't put it in a class, but you really should consider it. [code=python]import random def run(money): global go try: bet = int(raw_input("\nPlace your bet: ")) if bet <= money and bet > 0: money -= bet money = roll(bet, money) return money elif … | |
Re: We coved this a few threads down: [url]http://www.daniweb.com/forums/thread127918.html[/url] Hope that helps. | |
Re: [QUOTE=DustinS;622419]I just started messing with Python, and was having a great time with entering Tkinter GUI commands into the Python shell (ActivePython 2.5). Its fun entering commands one at a time and seeing components appear real-time (instead of normal process of having to compile the whole thing first). Anyway, I … | |
Re: Care to elaborate... a lot? I mean it'd help if you mentioned what GUI module you're using, for a start. | |
Hi there. I'm new to Python. I started learning it 3 days ago. I've figured out everything by myself so far, but this is stumping me: Whenever I load a file such as a html document or a text file, it loads fine. But when I load this gif or … | |
Re: You mean like a Java applet? I'm not sure, but I think if you want to do that you need to learn, well, Java. It's no small task and Java is specifically designed for the job (among other things) due to its common-place virtual machine and such. | |
Re: Use regular expressions. Or use the split method. I'd use regexp's because you've got both \t AND \n. Though I suppose that's a lot of extra overhead (someone tell me? I'm not sure how efficient regexps are compared to say string manipulation methods), so it's probably better to just go: … | |
Re: [QUOTE=EAnder;621774]I am trying to add user input using the raw_input function to string url_orig. I am attempting to replace the spaces with +'s to make a 'google search'. the replace function works fine in IDE but not when I excecute the program. Any help will be appreciated [code]url_orig = 'http://www.google.com/search?hl=en&q=' … |