614 Posted Topics

Member Avatar for dinilkarun
Member Avatar for nealpcarpenter

If you want to can use the pyHook module Download-http://sourceforge.net/project/showfiles.php?group_id=65529 Here is a program that will listen for any keystrokes really easily: [code=python] import pythoncom, pyHook def OnKeyboardEvent(event): print 'MessageName:',event.MessageName print 'Message:',event.Message print 'Time:',event.Time print 'Window:',event.Window print 'WindowName:',event.WindowName print 'Ascii:', event.Ascii, chr(event.Ascii) print 'Key:', event.Key print 'KeyID:', event.KeyID print 'ScanCode:', …

Member Avatar for Freaky_Chris
0
219
Member Avatar for Stefano Mtangoo
Member Avatar for lllllIllIlllI

Hi I have fiddled around with other GUI's such as pygame and wxPython but i wanted to use something a little more powerful when it came to 3D objects and i saw what PyOpenGl can do. But i spent ages looking for any help but i couldn't find any place …

Member Avatar for lllllIllIlllI
0
684
Member Avatar for paynegm

The reason it will say failed at the end of the code is becuase sum and count only exist inside your method. To stop that you can add [icode]global sum[/icode] and [icode]global count[/icode] to the start of the code.

Member Avatar for jlm699
0
77
Member Avatar for usdblades

Jargon is programming terms such as variables, definitions, modules. At least thats how i understand it to be.

Member Avatar for usdblades
0
96
Member Avatar for lllllIllIlllI

Hi My problem today is i have opened up the wxPython Demo and copied one of the pieces of code across to IDLE so i can have a fiddle with it. My problem is that at the start it goes [icode]from Main import opj[/icode]. Thats what stuffs it up. The …

Member Avatar for lllllIllIlllI
0
177
Member Avatar for iamgame

It would be cool if you could have a text file full of all of the words so the user could add their own. Your text file could look like this: Python:yothnp spam:apms This was the user could add their own and you could just import it to a dictionary …

Member Avatar for iamgame
0
760
Member Avatar for predator78

sys.argv is the arguments you give to the program when you run it from the command line. For example: [code] C:\Python> python image.py This_is_arg_0 This_is_arg_1 [/code] Hope that helps. What i think you have to do is give the program a location of some images to convert. That seems the …

Member Avatar for lllllIllIlllI
0
152
Member Avatar for lllllIllIlllI

Hi everyone What i am doing now is creating a program that the user can change the way buttons look half way through. My problem is i couldnt work out how to update the wx.Button's style while the program is running. I was wondering if anyone could help me for …

Member Avatar for lllllIllIlllI
0
156
Member Avatar for dinilkarun

you can use such flags as [code=python] wx.TOP wx.BOTTOM wx.LEFT wx.RIGHT #Here is an example self.sizer.Add(self.Tree,proportion=1,flag = wx.TOP|wx.BOTTOM) #Now that would only expand top and botton # I cant remember if you need wx.EXPAND in there too.... [/code] to tell the sizers which ways it is allowed to expand.

Member Avatar for lllllIllIlllI
0
114
Member Avatar for dinilkarun

I think you might we able to use sizers to do this. There is a flag you can use when making a sizer called wx.ALIGN_CENTER and this will keep it in the center no matter what.

Member Avatar for dinilkarun
0
81
Member Avatar for lllllIllIlllI

Hi What i am trying to do is make a wx.FileDialog() show Import as the label on the button. I know you can change it to such things as open and save but i cant find a way to let me change it to a label saying import. Any help …

Member Avatar for sneekula
0
83
Member Avatar for jasimp

I tried it and liked it. I thought it was nice to just have a web browser that was so simple for once. As much as it is good i just cant see why google needed to enter the web browser wars!

Member Avatar for stephen84s
0
625
Member Avatar for Ene Uran

Oh that is so mean! The poor people. The chimps looked pretty into it though! :)

Member Avatar for sneekula
1
73
Member Avatar for zachabesh

why do they need to be different files, couldn't you just make them definitions in the one file and then just call them when they are needed?

Member Avatar for zachabesh
0
83
Member Avatar for William Hemsworth
Member Avatar for ~s.o.s~
3
120
Member Avatar for massivefermion

Py2exe is probably the easiest one to use and there are code snippets helping you to use it as well. Vegaseat did this one - [URL="http://www.daniweb.com/code/snippet499.html"]http://www.daniweb.com/code/snippet499.html[/URL]

Member Avatar for lllllIllIlllI
0
76
Member Avatar for lllllIllIlllI

Hi guys I have been making a program over the last few days that grabs an image and re-paints it in paint in 256 colour. The main thing this program is for is so you can watch it getting painted in paint. It works perfectly on my computer but i …

Member Avatar for lllllIllIlllI
0
370
Member Avatar for lllllIllIlllI

Hey everyone I am interested in learning Pygame as a GUI that is suited to making games and i was wondering if it was worth it? My question is, is it good for anything else than games or animations?

Member Avatar for Ene Uran
0
110
Member Avatar for lllllIllIlllI

Hi guys Im pretty new to java after programming with python for about a year i thought i'd give it a go. I did have a quick question though. How would i check for membership in a string. For example [code=java] String str1="Hello world"; String str2 = "world"; [/code] Is …

Member Avatar for peter_budo
0
101
Member Avatar for dr_hamburger

I think this might have a lot to do with the competition being held in Australia for High School Students in python at the moment, it sound suspiciously like a problem that is stumping almost all of the people on the final week.

Member Avatar for woooee
0
503
Member Avatar for damyt01

you counld use string.replace For example: [code=python] words = 'hello i enjoy eating rasberry muffins' words = words.replace('rasberry muffins','toasted bread') print words # this will output 'hello i enjoy eating toasted bread' [/code] Hope this solves your problem. :)

Member Avatar for jlm699
0
110
Member Avatar for lllllIllIlllI

Hi I have made a program that uses a GUI for most of its functions but as soon as i change it to an exe using py2exe all the buttons turn all square and everythin looks like it came from windows 98 rather than XP. Is there any way to …

Member Avatar for lllllIllIlllI
0
903
Member Avatar for lllllIllIlllI

Hi What i want to do for this is to have my program run in the background simulate pressing a button such as ENTER every 10 seconds or so. I have trauled the net and found solutions for VB and C++ but none for python. Is this possible in python …

Member Avatar for lllllIllIlllI
0
388
Member Avatar for lllllIllIlllI

Hi I have been trying to do one of the projects in the projects for beginners section that asks you to get your computer to log off after a certain amount of time has passed without any mouse or keyboard movement. I am not yet up to that bit, in …

Member Avatar for Gribouillis
0
1K
Member Avatar for FreezeBlink

What kind of editing? Do you mean automated resizing or drawing new things onto the picture and then saving it? wxPython has a lot of cool image/paint tools so you could check that out but in the end it really depends on exactly what kind of editing you want to …

Member Avatar for lllllIllIlllI
0
74
Member Avatar for Aia

Government is a great, great thing. As much as it it annoying i think without it helping and 'being the centre of out existance' we all would be in a much worse place today. Governments are sort of like a buisness that has a monopoly on a whole place and …

Member Avatar for Aia
0
761
Member Avatar for FreezeBlink

Vegaseat gives a few options in this post: [url]http://www.daniweb.com/forums/thread34434.html[/url] They include alternatives to Winsound.

Member Avatar for lllllIllIlllI
0
83
Member Avatar for lllllIllIlllI

Hi I have a weather forecasting program that uses a few threads. These threads stop and start at different times throughout the program so there is no set amount of threads at one time. My problem is when i try and close the main thread the program keeps going because …

Member Avatar for jlm699
0
99
Member Avatar for shadwickman
Member Avatar for shadwickman
0
122
Member Avatar for tweak

you could change the 'while play' to something else that was an integer that equalled 10 and then every time the person has their turn you subtract one away from it until it is zero and the program ends. [code=python] import random words = ['sprinkles', 'computer', 'mouse', 'shooter', 'edge', 'guard', …

Member Avatar for tweak
0
101
Member Avatar for The Dude
Member Avatar for sittas87
1
118
Member Avatar for PcPro12

yeah. I really think Bill has been really charitable and well i understand why he would retire. I mean he would be super rich. Its not like he needs to save for his super annuation is it!

Member Avatar for Ene Uran
-1
155
Member Avatar for Serunson
Member Avatar for lllllIllIlllI

Hi Guys What i am trying to do here is have a tuple of numbers, lets say X. Then i have a list of a few other tuples. I want the program to find the tuple that is closest in value. [code=python] x = (214,521) lis = [(200,500),(250,550),(300,600)] [/code] I …

Member Avatar for vegaseat
0
118
Member Avatar for Zepprulz

Could you hook the modem to the wired router and then run a CAT-5 cable or something to the wireless router? also [URL="http://www.wirelessforums.org/alt-internet-wireless/question-possible-have-2-wireless-routers-connected-one-modem-3992.html"]This[/URL] site looks like it has some ideas to.

Member Avatar for OlyComputers
0
136
Member Avatar for jikanyau

Okay this is my solution [LIST] [*]Go to Control Panel [*]Click System [*]Click the Advanced Tab [*]Click environment variables down the bottom [*]In the bottom scrollbox click on Path [*]Click edit [*]To the end of the list add this: ;C:\python25;C:\python25\scripts [*]If your python is not python 2.5 or is installed …

Member Avatar for lllllIllIlllI
0
97
Member Avatar for Duki

I dunno but thats what the site says that they are doing at the moment. They got about 13 million downloads and that must have to count for something at least!

Member Avatar for Infarction
0
210
Member Avatar for FreezeBlink

Are you running it in something like IDLE because if so getch wont work. Try using the python command window. yeah i just checked the code in the command window and it works a-okay! :)

Member Avatar for FreezeBlink
0
190
Member Avatar for moe3ius

For easy 3d design programs you can't go past the free Google Sketchup [url]http://sketchup.google.com/[/url] I also really like ashampoo CD and DVD burner, there is a free version wich is still quite good.

Member Avatar for sreein1986
0
192
Member Avatar for lllllIllIlllI

Hi I have made a program with wxPython and i have this bit of code: [code=python] def getpic(self,event,urlp='http://mirror.bom.gov.au/radar/IDR043.gif?20080427173538'): fc = url.urlretrieve(urlp,filename='Weather.jpg') image_file = 'Weather.jpg' self.bmp = wx.Bitmap(image_file) self.img = wx.StaticBitmap(self.background, wx.ID_ANY, self.bmp, pos = (20, 60)) self.background.SetInitialSize() [/code] This is a bit of my code, not the full thing but …

Member Avatar for lllllIllIlllI
0
570
Member Avatar for swills

If you were just playing sound the module 'winsound' would do the trick if you were on a windows machine.

Member Avatar for swills
0
140
Member Avatar for alexisellis
Member Avatar for lllllIllIlllI
0
127
Member Avatar for Dave Sinkula

i live in australia and i never hear ANY of the other names for it.

Member Avatar for Infarction
0
150
Member Avatar for sibdizzle

Um just a quick note: Im under the impression you do have parentheses after a class definition becuase this can be used to set class parents and attibutes as well as making it a new-style class. [code=python] # a few examples import wx class MainFrame(wx.Frame): pass #this means this class …

Member Avatar for G-Do
0
195
Member Avatar for lllllIllIlllI

Hi i have been fiddling around with the wxPython GUI toolkit for a bit and i wanted one of my programs to start with the window expanded. I googled it but couldn't find an answer there so any help here would be greatly appreciated.

Member Avatar for lllllIllIlllI
0
68
Member Avatar for cheechand

you could use a set. That would split the word into a set with all individual letters in it or you could go [code=python] strings = 'airplane' letters = [] for letter in strings: letters.append(letter) print letters #['a','i','r','p','l','a','n','e'] [/code] There might be a better way to do it but thats …

Member Avatar for lllllIllIlllI
0
72
Member Avatar for lllllIllIlllI

Hi Using a template from the tutorial Fuse offered i made this program: [code=python] import wx import os WINDOW_WIDTH = 700 WINDOW_HEIGHT = 600 class MainFrame(wx.Frame,object): def __init__(self): wx.Frame.__init__(self,None, title = "Paul's Text Editor", pos = (200,75), size = (WINDOW_WIDTH,WINDOW_HEIGHT)) self.menubar = wx.MenuBar() self.menufile = wx.Menu() self.menuinfo = wx.Menu() self.SetMenuBar(self.menubar) …

Member Avatar for lllllIllIlllI
0
644
Member Avatar for darkMatter2008

have you added the path in which Class1 is situated to sys.path? Try this: [code=python] import sys sys.path.append(place where myclass1 is located) import MyClass1 class MyClass2(): anobject = MyClass1() [/code] Make sure the file in which MyClass1 is located is called MyClass1.py or pyw or something like that

Member Avatar for bumsfeld
0
91

The End.