Search Results

Showing results 1 to 24 of 24
Search took 0.01 seconds.
Search: Posts Made By: Freaky_Chris ; Forum: Python and child forums
Forum: Python Jan 15th, 2009
Replies: 8
Solved: Portable Python
Views: 1,634
Posted By Freaky_Chris
You may find this helpful

http://www.voidspace.org.uk/python/movpy/movableidle.html

Chris
Forum: Python Dec 8th, 2008
Replies: 15
Views: 886
Posted By Freaky_Chris
Make the delay bigger, thats the idea behind wx.media.MEDIA_LOADED event it triggers when the media is loaded and only then, unfortunately it seems poorly documented.

Chris
Forum: Python Dec 7th, 2008
Replies: 15
Views: 886
Posted By Freaky_Chris
OK, here is my sugestion...please bare in mind i know nothing about Python GUI and event handling so i cannot really provide any sort of code examples.

You need to ensure that the media has loaded...
Forum: Python Dec 6th, 2008
Replies: 4
Views: 893
Posted By Freaky_Chris
This is a common problem, it seems you have to manually include the mail module, this link maybe of help to you
http://stackoverflow.com/questions/169897/how-to-package-twisted-program-with-py2exe
...
Forum: Python Dec 1st, 2008
Replies: 7
Solved: TextCtrl Woes
Views: 548
Posted By Freaky_Chris
Hehe glad you got it working.

To think i've only ever downloaded wxPython & created a basic window with a listbox on it. I've never even added data to that list box hehe. Ah well it's all good...
Forum: Python Dec 1st, 2008
Replies: 7
Solved: TextCtrl Woes
Views: 548
Posted By Freaky_Chris
Hmm thats odd. I did think about the SendKeys module but i wasn't sure if you wanted to use it or not.

Addressing your other issue, did you try using...
Forum: Python Dec 1st, 2008
Replies: 7
Solved: TextCtrl Woes
Views: 548
Posted By Freaky_Chris
Hmm i see your point, i cannot find a method of creating a wxKeyEvent event which is what is required for EmulateKeyPress().

Another possible solution would be to use
...
Forum: Python Nov 30th, 2008
Replies: 7
Solved: TextCtrl Woes
Views: 548
Posted By Freaky_Chris
Could you use EmulateKeyPress() after that to send a backspace to it?

Chris
Forum: Python Nov 29th, 2008
Replies: 2
Views: 526
Posted By Freaky_Chris
Yes there is it's pretty simple too

mylist = ['blue', 'red', 'green', 'green', 'red', 'red']

for word in set(mylist):
print word, "appears", mylist.count(word), "times."

Hope that...
Forum: Python Oct 5th, 2008
Replies: 3
Solved: use button
Views: 529
Posted By Freaky_Chris
I'm not sure if i understood you but i think you are after something like this, windows only all i could find

http://www.rutherfurd.net/python/sendkeys/
Forum: Python Jun 4th, 2008
Replies: 18
Solved: Which GUI
Views: 1,526
Posted By Freaky_Chris
Tkinter is the easier, and has one big advantage; its standard.

However i personally find hat wxPython is better although slightly harder to learn.

Chris
Forum: Python Jun 4th, 2008
Replies: 7
Views: 1,709
Posted By Freaky_Chris
m= start[0]*60+start[1]
n= finish[0]*60+finish[1]

here there is a problem, start[0] refers to the first character in the string start. so from your exmaple of 14, 12 start[0] would be 1. and...
Forum: Python May 20th, 2008
Replies: 4
Views: 582
Posted By Freaky_Chris
for word in list:
print word+",",

or did i just miss what you asked?
Forum: Python May 20th, 2008
Replies: 7
Solved: Type Erorr nr2
Views: 669
Posted By Freaky_Chris
def dela(c):
sum=0
pile = []
while sum < c:
b = random.randrange (1, 10 - sum + 1)
pile.append(b)
sum += 1
print pile,sum
return sum, pile...
Forum: Python May 20th, 2008
Replies: 7
Solved: Type Erorr nr2
Views: 669
Posted By Freaky_Chris
the first print is showing 2 different objects.
The second print is showing 1 object.

Read about lists & tuples, embedding in particular, this may help you understand

Chris
Forum: Python May 20th, 2008
Replies: 8
Views: 748
Posted By Freaky_Chris
It works perfectly, you just need to read about unicode(UTF-8) encoding and other data encoding. By default you are using ascii....which arabic characters do not fall under.

Chris
Forum: Python May 20th, 2008
Replies: 6
Solved: Quick question
Views: 593
Posted By Freaky_Chris
Indeed, after the def statement everything indented is included in the function for example.

def myfunc():
#in function
#still in function
#when in a function you can use normal...
Forum: Python May 19th, 2008
Replies: 6
Solved: Quick question
Views: 593
Posted By Freaky_Chris
what you saying is you want to use the same bit of code over and over?
sorry if this is not what you are asking
if so then you use a function

def myFunction(param1, param2):
print param1
...
Forum: Python May 19th, 2008
Replies: 3
Views: 715
Posted By Freaky_Chris
mywxpythonscript.pyw

this will then run with pythonw.exe which doesn't run the commandline window

Chris
Forum: Python May 19th, 2008
Replies: 4
Views: 2,393
Posted By Freaky_Chris
Simple read the use file.readlines() on both files to give you 2 arrays

so something like this

f1 = open("file1.txt", "r")
f2 = open("file2.txt", "r")

fileOne = f1.readlines()
fileTwo =...
Forum: Python May 18th, 2008
Replies: 2
Views: 1,007
Posted By Freaky_Chris
One way is to raise you own exception and then catch it with a break.


class myException(Exception): pass
w = input("Enter width")
h = input("Enter height")

for x in range(0,w):
for y...
Forum: Python May 18th, 2008
Replies: 8
Views: 919
Posted By Freaky_Chris
Hope it works for you, like i say we can always change it.

Congratulations, with the new born.

Chris
Forum: Python May 18th, 2008
Replies: 8
Views: 919
Posted By Freaky_Chris
lol thanks for pointing that out, i've updated it to avoid confusion. In actually fact although it is bad, in that example it will work fine. The only time you will have a problem with that is if you...
Forum: Python May 18th, 2008
Replies: 8
Views: 919
Posted By Freaky_Chris
import os
folderA = []
for path, dirs, files in os.walk("C:\\Folder A"):
for f in files:
folderA.append(f)

i = 0

for path, dirs, files in os.walk("C:\\Folder B"):
for f in...
Showing results 1 to 24 of 24

 


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

©2003 - 2009 DaniWeb® LLC