- Strength to Increase Rep
- +12
- Strength to Decrease Rep
- -3
- Upvotes Received
- 225
- Posts with Upvotes
- 137
- Upvoting Members
- 64
- Downvotes Received
- 31
- Posts with Downvotes
- 22
- Downvoting Members
- 16
I am a 17 year old High school student. I live in Newcaslte, Australia. I started learning python as my first programming language just before i turned 14 and since then it became my hobby.
- PC Specs
- Custom Built PCQ8400 quad core processorNvidia Geforce 5400 8 gigs DDR3 ramWindows 7 home premium
| |
Hi i have been spending the last few days deciding on an IDE that would let me program in Java, C++ and python and notepad++ looked pretty good. The only issue is i cant work out how to make the program run once i have made it. I looked in … | |
Re: This is an example of how to use the with statement in python 3.0: [code=python] with open('test.txt') as f: print(f.readlines()) # output >> ['test'] [/code] | |
Re: How about a Noughts and Crosses game with AI so when the computer can it will win and it will block the player from winning if it can. Try make it so there are difficulty setting ranging from easy to beat to nearly impossible. If you want you could add … | |
Re: Wow a tutorials, i havent seen one of these posted for aages... | |
Re: If you ever need the values of wx ID's as well as any other constants in wxPython here is a way to do it: [code=python] import wx class MainFrame(wx.Frame): def __init__ (self): wx.Frame.__init__(self,None,title = "ID's and Values", size=(400, 400)) self.text = wx.TextCtrl(self, wx.ID_ANY, style = wx.TE_MULTILINE) for f in wx.__dict__: … | |
| Re: You really need to use [noparse][code][/code][/noparse] tags otherwise it looks messy. Also, provide a link to where you referenced things from, when referencing directly it is also a good idea to surround the text in quotation marks to indicate this is directly from a reference. Otherwise its good :) |
Re: Try using the absolute path, such as "C:\\Documents and Settings\\Paul\\Desktop\\Programming\\Excel\\values.xls" Remember that the double backslash is used so there are no escape characters such as \n used accidentally. There is a way to get around that and that is putting an r in front of the first " sign. That … | |
Re: have you tried os.walk. That is a function that will iterate throught the files and sub directories of the folder you are talking about. | |
Re: Well i know this may be obvious, but Tkinter is all ready to be used in python 3. So anybody who uses that GUI toolkit will still be able to use it in python 30. | |
Re: Ah, excellent. threading is a great thing to show people.... Im still stuck for another idea for a tutorial though.. Unless i do wxPython ones. I already have some of those at my site tho :P | |
Re: heres a bit more: [code=python] running = True sent = raw_input("Enter a sentence") while running: for word in sent.split(): if word[0] in "aeiou": print word + "way" else: print word[1:] + word[0] + "ay" [/code] What i did was ask for a sentence at the start and then i split … | |
Re: This post is over a year old. Just let it die. | |
Re: os.makedirs is a really useful function. It makes all of the path that you give it. So if you gave it the path C:\Python\Test\one\two you dont already have to have the path Python, Test, one or two. This is better then os.mkdir because that doesn't work unless you have the … | |
Re: ha ha ha! Just need a license first! Are you scared of heights? | |
Re: Hi Just download the wxPython Docs and Demos and go to the wxWidgets Reference. I think that might help. | |
Re: Well im voting for the scanner. Thats how i learnt and thats how i go, i dont find anything wrong with it so i stay that way.. addmitedly i really dont know a thing about Buffered Reader anyway, so it could be loads better for all i know. | |
Re: yeah i get this error a lot. What i do to fix it is to go Ctrl+Alt+Del and then go to processes and then stop and python process. Hope that works! :) | |
Re: [QUOTE=cwarn23;1107815]Also I will add on top of that it is possible to use the Firefox adblock on Opera simply by exporting it's block list as a .txt file and add those blocked url matches (with wild cards being * ) into Operas url blocking system. And of course you can … | |
Re: Well if you want the python.exe you find it in C:\Pythonxx\python.exe If you want it to be opened by IDLE then you find that in: C:\Pythonxx\Lib\IdleLib\idle.bat If you then check "open with this every time" box then it will do that. Oh and xx is the version of python, so … | |
| Re: Yeah i agree, i think the best that you could do was boot into windows or something and then just start you new 'python OS' being a fullscreen gui that can do things that you want it to. But as for an actual os, it is impossible as python isnt … |
Re: Woah, people seem easily offended today. :S But back to the topic at hand, i'm quite annoyed that is talked about how it was a mix of python C++ etc. Because i really couldn't see much of the python in it, it doesn't look like python, it compiles, unlike python … | |
Re: You should probably document your code to explain what each bit is doing, like why you need the third item in the list, why it need to be converted so many times, and what getch() and msvrt are. But other then that, good snippet | |
Re: Yeah, i get this a lot with wxPython. Something on the lines of wx.App must be created first. And IDLE will not freeze, but it will not run the code again until you restart it. | |
Re: AutoPython did a great tutorial on threading that has been posted in the tutorials section of this forum: [url]http://www.daniweb.com/tutorials/tutorial238590.html[/url] Hopefully that clears anything up if you needed a hand :) | |
Re: I don't even know if i would trust Ms Paint to measure something to the nearest cm let alone to decimal places. :S |