Search Results

Showing results 1 to 40 of 664
Search took 0.04 seconds.
Search: Posts Made By: Paul Thompson ; Forum: Python and child forums
Forum: Python 2 Days Ago
Replies: 5
Views: 230
Posted By Paul Thompson
snippsat, you should post that as a tutorial :)
Forum: Python 2 Days Ago
Replies: 1
Views: 148
Posted By Paul Thompson
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
Posted By Paul Thompson
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
Posted By Paul Thompson
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
Posted By Paul Thompson
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
Posted By Paul Thompson
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
Posted By Paul Thompson
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
Solved: Scorecard
Views: 509
Posted By Paul Thompson
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
Solved: auto-update?
Views: 404
Posted By Paul Thompson
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
Posted By Paul Thompson
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
Posted By Paul Thompson
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
Posted By Paul Thompson
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
Posted By Paul Thompson
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
Posted By Paul Thompson
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
Posted By Paul Thompson
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
Posted By Paul Thompson
Post the exact error you are getting, that helps a lot :)
Forum: Python 27 Days Ago
Replies: 6
Solved: While loop
Views: 335
Posted By Paul Thompson
Cause in line 4 of the program you reset the input to 0!? :P Delete line 4
Forum: Python 27 Days Ago
Replies: 6
Solved: While loop
Views: 335
Posted By Paul Thompson
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
Posted By Paul Thompson
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
Posted By Paul Thompson
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
Posted By Paul Thompson
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
Posted By Paul Thompson
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
Posted By Paul Thompson
Yeah there is still no py2exe support for python 3.x
Forum: Python 29 Days Ago
Replies: 5
Views: 267
Posted By Paul Thompson
And also change the like

app.Mainloop()

to

app.MainLoop()
Forum: Python 29 Days Ago
Replies: 8
Views: 353
Posted By Paul Thompson
Okay so you need to just copy the names file into
Forum: Python 29 Days Ago
Replies: 8
Views: 353
Posted By Paul Thompson
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
Posted By Paul Thompson
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
Posted By Paul Thompson
Ah yeah, forgot about doing the compiling of them. Im glad you liked it though :)
Forum: Python 30 Days Ago
Replies: 2
Views: 503
Posted By Paul Thompson
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
Tutorial: Useful input trick
Views: 577
Posted By Paul Thompson
Wow a tutorials, i havent seen one of these posted for aages...
Forum: Python 30 Days Ago
Replies: 7
Views: 316
Posted By Paul Thompson
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
Solved: GetBestSize()??
Views: 208
Posted By Paul Thompson
Thanks! Thats it. :)
Forum: Python 31 Days Ago
Replies: 2
Solved: GetBestSize()??
Views: 208
Posted By Paul Thompson
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
Posted By Paul Thompson
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
Posted By Paul Thompson
Alright. Cheers grib. I was hoping you could help with this :)
Forum: Python 31 Days Ago
Replies: 7
Views: 263
Posted By Paul Thompson
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
Posted By Paul Thompson
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
Posted By Paul Thompson
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
Solved: pizza delivery
Views: 355
Posted By Paul Thompson
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
Posted By Paul Thompson
Sooo. What work have you done? Its nice to see a base from which we can help you.
Showing results 1 to 40 of 664

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC