- Strength to Increase Rep
- +4
- Strength to Decrease Rep
- -1
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
I answer questions when work gets boring...
- Interests
- My family, surfing, music, just relaxing at home...
Re: [QUOTE=XxAaronxX;725407]Hi, This is the first Python code i have written without the aid of a tutorial, i was wondering if you could look over it and provide me with your feed back on any bad habits i may have and if there was an easier way to write this, Your … | |
Re: [code] picme3=(PhotoImage(file="table.gif")) [/code] (I think (I) (Might) ((See) A Problem) (Here) wait... maybe not... I'm so confused now... why do you have the extra ()? | |
Re: try this before the import [code] import sys sys.path.append("c:\Python\DLLs") [/code] | |
Re: If you are stuck on windows, check out Notepad++ | |
Re: What platform are you on? What module are you using for playback right now? | |
Re: Do you have python installed on your PC? If so, and you are running windows, it should be as easy as double-clicking the file (assuming you gave it a .py extension) if not, go to python.org and grab it. If you are running some flavor of *nix. add the path … | |
Re: look here to see how someone else did it. [url]http://www.daniweb.com/forums/showthread.php?t=66974&highlight=class+average[/url] | |
Re: I don't think I can properly walk through this without seeing more. What does the input data look like? How is it loaded? | |
Re: Alternatively you could do this: [code=python] for swipeload in range (0, 15, 1): exec('E'+str(swipeload)+'_Path = os.path.join("data","E"+str(swipeload)+".gif")') exec('E'+str(swipeload)+' = pygame.image.load("E"+str(swipeload)+"_Path")') [/code] But dictionaries are a better option. | |
Re: what do yuo mean by "access"? the smb shares? or they can't ping each other or what? | |
Re: In windows I use notepad++. I've tried that ecplise plugin (the name escapes me) and I liked that also. In *nix, its always vim for me though. | |
Re: Look here and see if it helps: [url]http://www.daniweb.com/forums/thread133360.html[/url] if that isn't what you are looking for, maybe you can clarify what you are trying to do? is this going to be CLI or are you wanting to put something on a GUI? | |
Re: Where is data_file defined? | |
Re: he was saying if you expect us to look at your code, put that before and after your code in your post. so that we can see syntax highlighting and what not. | |
Re: [code=python] import wx x = dir(wx) for y in x: if y.find('ID_')!=-1: print y [/code] output: [code] ID_ABORT ID_ABOUT ID_ADD ID_ANY ID_APPLY ID_BACKWARD ID_BOLD ID_CANCEL ID_CLEAR ID_CLOSE ID_CLOSE_ALL ID_CONTEXT_HELP ID_COPY ID_CUT ID_DEFAULT ID_DELETE ID_DOWN ID_DUPLICATE ID_EDIT ID_EXIT ID_FILE ID_FILE1 ID_FILE2 ID_FILE3 ID_FILE4 ID_FILE5 ID_FILE6 ID_FILE7 ID_FILE8 ID_FILE9 ID_FIND ID_FORWARD ID_HELP … | |
Re: [code=python] def traverse(p): try: p except NameError: traverse(p=lokid) if (p==splitchar): traverse(p=eqkid) else: print p traverse(p=hikid) [/code] I think this is what you would want... someone correct me though... I thought it was good, but then I reread it and I'm a little drunk... What I am confused about is, two … | |
Re: It sounds like you have your terms a little confused... Actually, after reading that again... I tihnk you have me a little confused... Maybe we will be able to help you better if you give us a little more information. your pysocket example sounds like it is a script that … | |
Re: My suggestion would be to abandon WxPython and use pygame instead. It is much better suited for this type of stuff. Other than suggestiong you switch to PyGame, I am not sure exactly what you are asking... What do you mean "add an image on top of the window"? As … | |
Re: The hierarchy ends up like this: [code] window background verticalBox horizontalBox inputArea transferBtn loadBtn transferArea [/code] the loadBtn, transferBtn, inputArea, and transferArea objects are defined with: [code] loadBtn = wx.Button(background, label = 'Load') transferBtn = wx.Button(background, label = 'Transfer') inputArea = wx.TextCtrl(background) transferArea = wx.TextCtrl(background, style = wx.TE_READONLY | wx.TE_MULTILINE) … | |
| |
Re: Are you getting an error when you try to parse it? what about: [code] content = file.read().encode('ascii', 'ignore') [/code] ? | |
Re: I'll assume you have already read the tutorial at: [url]http://www.py2exe.org/index.cgi/Tutorial[/url] basically, once you have py2exe installed you need to make a script to build the exe. Make a file called setup.py in the directory with the python file you want to make an exe out of. put the following inside … | |
Re: So, did you ever get started on this? show us some code and maybe we can help you out | |
Re: I'll write up a better explination later, but here is a class that would create the widget and check your answers: [code=python] from Tkinter import * class question(): def __init__(self, parent, q_text, a_list, correct, incorrect): self.frame = Frame(parent) self.q_text = q_text self.a_list = a_list self.correct = correct self.incorrect = incorrect … |