Forum: Python 2 Days Ago |
| Replies: 5 Views: 230 snippsat, you should post that as a tutorial :) |
Forum: Python 2 Days Ago |
| Replies: 1 Views: 148 You can individually set a sizer/widget to show/hide. You do this by going:
sizer.Show(False)
#or otherwise
ExampleTextCtrl.Show(False)
Then you can set them to show again by doing the same... |
Forum: Python 5 Days Ago |
| Replies: 2 Views: 128 Stop. More information, spent an extra 2 minutes posting your question and it will save a lot of time in the long run. So.
What GUI toolkit? Tk? wxPython? Qt?
What exactly are you wanting to find?... |
Forum: Python 6 Days Ago |
| Replies: 8 Views: 212 mmmm, i would use decorators as well... i was just thinking if you didnt want to have to type that arbitraryFunction() that you probably wouldn't want to type @arbitraryDecorator
That being... |
Forum: Python 7 Days Ago |
| Replies: 8 Views: 212 Yes, you can, although its not that pretty, here is something that i think shows how something like that can be done.
class Example(object):
#This is what we use to call every function
... |
Forum: Python 16 Days Ago |
| Replies: 3 Views: 378 For storing them you can use a dictionary:
lines = text.split("\n")
lineDic = {}
for i,l in enumerate(lines):
lineDic["Line %i"%s] = l
print lineDic
Hope that helps :) |
Forum: Python 17 Days Ago |
| Replies: 19 Views: 587 I tried wing IDE personally, i got the personal version. Though i do not use it any more, it actually wasn't nearly as good as it looked like it would be.
Now i just use Netbeans with a python... |
Forum: Python 20 Days Ago |
| Replies: 15 Views: 509 Isnt it possible that you could just have two large buttons side to side? When you click them you can set the label (if you are using wxPython) via wx.Button.SetLabel("Label Here") Then you can bind... |
Forum: Python 20 Days Ago |
| Replies: 12 Views: 404 Why dont you just have it that it reads the first line of project1 and that can have a simple string telling you what version it is. Then if there is a newer one replace
Have this as the first... |
Forum: Python 21 Days Ago |
| Replies: 1 Views: 376 Please post the code that you have written, or a specific problem that you have. We are *not* here to do your homework |
Forum: Python 22 Days Ago |
| Replies: 11 Views: 636 You really need to use 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... |
Forum: Python 22 Days Ago |
| Replies: 3 Views: 286 Here is another page you also might enjoy
http://docs.python.org/library/email-examples.html |
Forum: Python 22 Days Ago |
| Replies: 2 Views: 241 We can fix that with one character, a lowly comma :)
If you put the comma after the print statement it should work
for x in range(1, len(depend)):
#comma after the whole statement
print... |
Forum: Python 23 Days Ago |
| Replies: 10 Views: 398 I think this is what you need:
import os
os.startfile('filename.py')
Hope that helps :) |
Forum: Python 24 Days Ago |
| Replies: 5 Views: 303 I'll say the same, its worked a treat on my computer, and apart from the usual IDLE annoyances with wxPython its all running smoothly. :) |
Forum: Python 25 Days Ago |
| Replies: 8 Views: 290 Post the exact error you are getting, that helps a lot :) |
Forum: Python 27 Days Ago |
| Replies: 6 Views: 335 Cause in line 4 of the program you reset the input to 0!? :P Delete line 4 |
Forum: Python 27 Days Ago |
| Replies: 6 Views: 335 Okay, so look at your sentence just here:
That tells you exactly what you need to do, first: Ask the user for the current population
This is done with just an input statement
#designed for... |
Forum: Python 28 Days Ago |
| Replies: 11 Views: 366 Steve's code is almost right :)
The problem is in line 5
line.replace('.','')
The problem with that is that it doesn't store the new string in the variable automatically, so just add a line = ... |
Forum: Python 28 Days Ago |
| Replies: 5 Views: 267 All that the .pyw extension does that the .py doesn't is make that black window "python.exe" not show up, which is useful for wxPython apps, sometimes :P |
Forum: Python 29 Days Ago |
| Replies: 9 Views: 631 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.
... |
Forum: Python 29 Days Ago |
| Replies: 8 Views: 353 Okkay. Then what i would do is rather than just saying
open("names.txt")
I would do the full address of where i put the file so
open(r"C:\Program Files\Wing IDE 101... |
Forum: Python 29 Days Ago |
| Replies: 1 Views: 176 Yeah there is still no py2exe support for python 3.x |
Forum: Python 29 Days Ago |
| Replies: 5 Views: 267 And also change the like
app.Mainloop()
to
app.MainLoop() |
Forum: Python 29 Days Ago |
| Replies: 8 Views: 353 Okay so you need to just copy the names file into |
Forum: Python 29 Days Ago |
| Replies: 8 Views: 353 Could you post the exact error? That can help a lot.
As well there are a few things you need to address.
def name_list():
infile = open('names.txt', 'r')
names = infile.readlines()... |
Forum: Python 29 Days Ago |
| Replies: 4 Views: 831 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 |
Forum: Python 30 Days Ago |
| Replies: 2 Views: 503 Ah yeah, forgot about doing the compiling of them. Im glad you liked it though :) |
Forum: Python 30 Days Ago |
| Replies: 2 Views: 503 Regex is one of the more complicated modules that you can use in python. Once you have learnt it though you can use it many different programming languages, so its a useful tool for using with... |
Forum: Python 30 Days Ago |
| Replies: 6 Views: 577 Wow a tutorials, i havent seen one of these posted for aages... |
Forum: Python 30 Days Ago |
| Replies: 7 Views: 316 You can find out how something is make up by using the dir() function.
This lists all of the variables, methods and classes of whatever you put inside the brackets :) |
Forum: Python 31 Days Ago |
| Replies: 2 Views: 208 |
Forum: Python 31 Days Ago |
| Replies: 2 Views: 208 Hi,
Im using wxPython for my latest project and i was wondering, how do i make the window go to the best size, so it includes all of the objects on screen?
I used to be able to remember... but i... |
Forum: Python 31 Days Ago |
| Replies: 5 Views: 335 Well you can use the type() function to show what type the number is:
>>> type(12)
<type 'int'>
>>> type(12.4)
<type 'float'>
>>> type(input())
12
<type 'int'>
>>> type(input()) |
Forum: Python 31 Days Ago |
| Replies: 7 Views: 263 Alright. Cheers grib. I was hoping you could help with this :) |
Forum: Python 31 Days Ago |
| Replies: 7 Views: 263 So.. By importing the program into its own __init__ module it then imports everything in the folder... Or am i still missing the point? |
Forum: Python 31 Days Ago |
| Replies: 7 Views: 263 Hmm... I have always wondered.. What is the significance of the __init__.py filename? I know what __init__ but what does it do in relation to files? |
Forum: Python 31 Days Ago |
| Replies: 7 Views: 263 Hi guys,
Im a making a program where i need to be able to specify a folder and have my program import every module from that folder into my program... I was wondering how i would go about it. I... |
Forum: Python 32 Days Ago |
| Replies: 12 Views: 355 If you are using python 3 then you just have to change your input and print statements to fit
order=int(input("Please enter the price of the order: "))
x=1.50
if order <10:
print("the total... |
Forum: Python 32 Days Ago |
| Replies: 4 Views: 269 Sooo. What work have you done? Its nice to see a base from which we can help you. |