614 Posted Topics

Member Avatar for Hawkeye Python

Mark thread is solved has moved. You can now find it as a link at the top. Use ctrl+F and search for solved and you should find it. It is next to the bit that says "Python Discussion Thread View First Unread" Just an FYI for anyone who needs to …

Member Avatar for lllllIllIlllI
0
95
Member Avatar for jv_05

Actually, if you want to learn about sockets then i suggest this tutorial just here [url]http://www.amk.ca/python/howto/sockets/[/url] it gives more than just the syntax and actually helps you learn how to use them. Though, this one: [url]http://www.devshed.com/c/a/Python/Sockets-in-Python/[/url] is the one that i learnt with, it was pretty good. Hope that helps …

Member Avatar for lllllIllIlllI
0
178
Member Avatar for fxm

I disagree. For a few reasons, first of all, no one really cares about your "Solved Threads" count, so there is no need to only award one poster with the solved thread. Another problem there is, what if 15 different people all helped just a little bit with your problem, …

Member Avatar for WaltP
1
162
Member Avatar for fxm

It is because of the way that chrome handles the javascript. Notice when you hover the mouse over the Go to last post button the link that is displayed down the bottom is a javascript link. Therefore chrome will not see it as you clicking a link so much. Because …

Member Avatar for fxm
0
126
Member Avatar for root

hmm... it doesn't have any kind of "This thread is more than three months old" warning that i can see. Thats odd

Member Avatar for vegaseat
0
95
Member Avatar for captain.don

Okay, so an import error eh.... well, if it is working once windows has fully loaded then that makes me think that something is not being started quickly. [code] import wmi [/code] I am going completely off guesswork here as i have never used wmi. But if what you said …

Member Avatar for Tech B
0
196
Member Avatar for WASDted

[QUOTE=jwenting;1218170]Not only do online petitions never work (and rightly so, there's no way in hell to know if the people "signing" are real and not some bot being used to generate millions of "signatures", but I fully agree with banning kids from playing gory games. Just as I fully agree …

Member Avatar for jwenting
0
243
Member Avatar for Lapixx

Here is what i would do. I would have something that is the Main function, that calls room1 to start off with... Then IF room1 wants to call room2 it returns a special value that means i know the Main function has to call room2. [code] def room1(): #is you …

Member Avatar for ultimatebuster
0
168
Member Avatar for GeekByChoiCe

I know what they are talking about. We used to be able to go to a forum and middle mouse click on the 'last post' button which would open a link in a new tab. Now though it is javascript which means that it will not open in a new …

Member Avatar for lllllIllIlllI
0
156
Member Avatar for jpl1993

That is because there is no class or function called tennisPro.. Also, you need to use code tags [noparse] [code] #code here [/code] [/noparse] cheers

Member Avatar for TrustyTony
0
140
Member Avatar for ubi_ct83

There is no goto keyword in java that will take you to a certain line. According to wikipedia the goto keyword is reserved in java but not actually used. So, goto is not a choice.. changing the code should be though. i'll leave that to someone a little more equipped …

Member Avatar for ubi_ct83
0
154
Member Avatar for lllllIllIlllI

If you go the community forum category you can see forum threads that you are not meant to see. I have a screen shot attached.

Member Avatar for NathanOliver
0
177
Member Avatar for Lapixx

The problem with having globals is that it means that you are usually declaring something inside a function when it is going to be used outside a function so it is probably better to just declare the variable outside any sort of function at all. It also makes it easier …

Member Avatar for snippsat
0
8K
Member Avatar for dbphydb

just an FYI as to what split is for (i am assuming you are new to python) is that is automatically splits up a string into its separate words. Such as [code] 'Hello i am Paul'.split() #Would give the result of a list: ['Hello','i','am','Paul'] [/code] The argument you can give …

Member Avatar for dbphydb
0
5K
Member Avatar for jpl1993

If you have to make your own sort algorithm i would look at the wikipedia pages for sorts such as the bubble sort. It is a very simple sort and the pseudo-code can be very easily translated into python. [url]http://en.wikipedia.org/wiki/Bubble_sort[/url] From wikipedia pseudo code [code] procedure bubbleSort( A : list …

Member Avatar for lllllIllIlllI
0
141
Member Avatar for Kruptein

Here is a quick program to get all the current ones. But it really doesn't matter if you overwrite them for the most part anyway. The chance of you doing that is also very small [code] import wx for f in dir(wx): if f.startswith("ID_"): print f, eval('wx.'+f) [/code] This will …

Member Avatar for Kruptein
0
147
Member Avatar for Dani
Member Avatar for cahram

If you knew that the array is only two deep (2D array) then you could do it: [code] for listIndex, subList in enumerate(myList): try: ind = subList.index('sheep') break except ValueError: print "Not in list number",listIndex print "It is in list number",listIndex print "and index number",ind,"of that list" [/code] What that …

Member Avatar for TrustyTony
0
202
Member Avatar for Chrisjj

Sheesh man who really cares. I hope you're not going to be getting that many infractions that the grammar actually annoys you.. :P

Member Avatar for diafol
0
783
Member Avatar for Kruptein

One thing to always look into when using wxPython is the api. The one for the richtextCtrl is found here: [url]http://www.wxpython.org/docs/api/wx.richtext.RichTextCtrl-class.html[/url] There you will find methods to set and get values, and by using these intelligently you should be able to achieve what you want.

Member Avatar for Kruptein
0
392
Member Avatar for karrotbear

<CannedResponseforhomework> So, what have you done? Remember here at daniweb we aren't here just to do your homework: [url]http://www.daniweb.com/forums/announcement114-2.html[/url] When you have shown effort, we will show some too. </CannedResponseforhomework>

Member Avatar for vegaseat
0
113
Member Avatar for lllllIllIlllI

Well just then i hit 1000 posts, one of my prouder moments at daniweb :) [url]http://www.daniweb.com/forums/thread264325.html[/url] It's good to reach that number, and get a star on my profile. Does this mean i can count myself as a regular now? :P Anyway, 1000 posts in i'm still loving it, so …

Member Avatar for bumsfeld
10
248
Member Avatar for lllllIllIlllI

A couple of days ago i just got back from my first overseas trip. Where did i choose to go for this trip of mine? No other place than the fabled USA. As the first Paul to go there since Paul Hogan with Crocodile Dundee it was important to observe …

Member Avatar for lllllIllIlllI
0
718
Member Avatar for dpswt

I have no experience with wx.Config so i can't help you there, but there is a way you could do this without that and just using a file. [code] #... inside your frame/panel class def LoadCtrl(self): #Assuming listctrl is called listOne #and the file is fileOne f = open(fileOne) for …

Member Avatar for lllllIllIlllI
0
246
Member Avatar for jephthah
Member Avatar for jephthah
3
682
Member Avatar for ojulla julius

And what have you done? Remember we are not just here to hand out free homework. [URL="http://www.daniweb.com/forums/announcement114-2.html"]Show Effort[/URL]

Member Avatar for ojulla julius
-1
128
Member Avatar for jeffery12109

It isn't the third line that is having the issues. It is line 37. If you look there, there is an if yet no indentation after it. Though i assume all you need to do is backspace that if a couple of times to get it on the correct level. …

Member Avatar for jeffery12109
0
97
Member Avatar for Dani

Yeah... i might own that :P EDIT: Woops, didn't see that this was just a bumped thread

Member Avatar for lllllIllIlllI
0
138
Member Avatar for SoulMazer

If i remember correctly wxPython is not looking to port to python 3.x any time soon. So if you are interested in using that then i would reccomend that you don't change. Personally i have not moved, i have tried it out but i never really found a reason to …

Member Avatar for SoulMazer
0
159
Member Avatar for larrywjr

Well i would start by re-downloading the file. Something may have gone wrong that caused the download to stop halfway through. So try that, if you haven't already :)

Member Avatar for jcao219
0
244
Member Avatar for Mathhax0r

Yes, you can, although its not that pretty, here is something that i think shows how something like that can be done. [code] class Example(object): #This is what we use to call every function def functionCaller(self, functionName): #This is the function that needs to #be called every time self.FunctionThatGetsCalledFirst() #Now …

Member Avatar for jcao219
0
11K
Member Avatar for peter_budo
Member Avatar for Feenix45

It really depends. Are you using wxPython Tkinter or some other kind of GUI becuase they all differ. I can give you an example in wxPython [code=python] import wx class MainFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self,None) self.menubar = wx.MenuBar() self.file = wx.Menu() self.file.Append(wx.ID_ANY,'&Test') self.menubar.Append(self.file,'File') self.SetMenuBar(self.menubar) self.Show() app = wx.App(False) frame = MainFrame() …

Member Avatar for Bart_uam
0
2K
Member Avatar for SoulMazer

I have a feeling that you could use a listctrl in a better way. If you use the style wx.LC_REPORT i think it is, you can have a look just like you want in just one widget. Ill just give you an example. [code] #!/usr/bin/python import wx class MyFrame(wx.Frame): def …

Member Avatar for SoulMazer
0
171
Member Avatar for lllllIllIlllI

Well, i am doing this because i think i should introduce finally. So i am Paul Thompson 16 years old I live in Newcastle Australia Probably the coolest thing that has happened in my life is that i lived on a boat for 3 years sailing up and down the …

Member Avatar for BestJewSinceJC
0
292
Member Avatar for happygeek
Member Avatar for Dave Sinkula
0
525
Member Avatar for octopusgrabbus

This shows that your data inside the `incoming_data` list is of type long. You can just 'add' (+) strings and longs together. You can do one of two things. You can do something like this using the comma >>>print "Hello this uses a comma to add an int to the …

Member Avatar for octopusgrabbus
0
340
Member Avatar for baki100

Yeah, i got that. Its easily fixed by taking out the manifest. I didn't have this problem with windows XP but i am getting it with 7. So i would use gui2exe like suggested above and just make sure that XP manifest file is unticket down the bottom Hope that …

Member Avatar for baki100
0
984
Member Avatar for TotalyWired

Grib, i have a feeling this is for some kind of python assignment. Essentially that pseudo-code works. I really never found pseudo-code that useful in python though. The actual code is just so similar to it that it almost makes no sense to make it. :)

Member Avatar for TotalyWired
-1
96
Member Avatar for farad

You should put your code in [noparse] [code] #your code here [/code] [/noparse] the code tags. This makes it a lot easier to see what your code is doing. It will keep indentation and highlight key words. :)

Member Avatar for farad
0
1K
Member Avatar for sammakko

I *think* i understand what you mean, but so i don't give you the whole answer i'll try and point you in the right direction. I think for something like this you should have a look at using sets [url]http://docs.python.org/library/sets.html[/url] These are great for easily taking out any of the …

Member Avatar for sammakko
0
89
Member Avatar for darkagn

Yeah, i was in favour of that "Up to" rep system back when Dave first suggested it, i'm surprised there hasn't been more talk on the subject. It sounds like a great idea.

Member Avatar for Ancient Dragon
0
469
Member Avatar for Robbert

You could just use the [icode]Show(False)[/icode] function on all of the children of the panel.

Member Avatar for vegaseat
0
175
Member Avatar for richardtreier

Do you get any error message? There should be a log file if you get an error while running the executable.

Member Avatar for snippsat
0
81
Member Avatar for Kruptein

Yeah i agree with vegaseat, we need to see the code for MyFrame, thats where the problem most likely is. Also just to make sure, are you actually getting any errors? Or is it just not updating?

Member Avatar for Stefano Mtangoo
0
276
Member Avatar for wtzolt

Perhaps have a dictionary? [code] >>> def FFunc(): print "This is the F function" >>> def BFunc(): print"This is the B function" >>> def DFunc(): print "This is the D function" >>> randomstuff = ['F','B','D','F','B'] >>> funcdict = {'F':FFunc,'B':BFunc,"D":DFunc} >>> for f in randomstuff: funcdict[f]() This is the F function …

Member Avatar for wtzolt
0
122
Member Avatar for kfancy

No. [url]http://www.daniweb.com/forums/announcement114-2.html[/url] Tell us your problem you are having ("its not working" doesn't count) and we can help you with your problems. We aren't going to go and find the bugs as well as try and fix them.

Member Avatar for woooee
0
170
Member Avatar for Hawkeye Python

This page explains it very clearly [url]http://www.network-theory.co.uk/docs/pytut/Packages.html[/url] One thing i noticed quickly though, you are not meant to have [code]my_package/ __init.py__ sub_pack/ __init.py__ test.py [/code] in your actual code for __init__.py Its just meant to be the way you organise the filesystem. From the first __init__.py you should be able …

Member Avatar for Ene Uran
0
96
Member Avatar for cwarn23

That seems like a lot of work for dani for a very small number of users to benefit.. And also, once the images are in the cache it should load faster

Member Avatar for jbennet
0
345
Member Avatar for kfancy

If you are using python 3 then the above code will not work. What you will need to do then is slightly different as [icode]input()[/icode] in python 3 returns a string. [code] choice = input("Press 1 to hit or 0 to stay") if int(choice) == 1: print "Lets hit it!" …

Member Avatar for jcao219
-1
102

The End.