Forum: Python Oct 31st, 2008 |
| Replies: 4 Views: 432 Alternatively you could do this:
for swipeload in range (0, 15, 1):
exec('E'+str(swipeload)+'_Path = os.path.join("data","E"+str(swipeload)+".gif")')
exec('E'+str(swipeload)+' =... |
Forum: Python Oct 31st, 2008 |
| Replies: 7 Views: 563 The thing about outputting super/subscript in term is that it will vary from system to system. Experiment with the '\x##' replacing ## with any hex number from 01 to FF. Eventually you will find... |
Forum: Python Oct 31st, 2008 |
| Replies: 209 Views: 97,134 Why don't you post it in a new thread so that we don't muddy up the tutorial thread with random comments.
Editor: Thanks, this post has been moved to its own thread. |
Forum: Python Oct 30th, 2008 |
| Replies: 6 Views: 987 Where is data_file defined? |
Forum: Python Oct 30th, 2008 |
| Replies: 3 Views: 794 import wx
x = dir(wx)
for y in x:
if y.find('ID_')!=-1:
print y
output: |
Forum: Python Oct 30th, 2008 |
| Replies: 23 Views: 1,774 I think a better option might be to switch to pySonic
http://pysonic.sourceforge.net
the Song.userspeed() property in particular looks like what you would want |
Forum: Python Oct 30th, 2008 |
| Replies: 23 Views: 1,774 http://people.csail.mit.edu/hubert/pyaudio/ |
Forum: Python Oct 30th, 2008 |
| Replies: 10 Views: 1,019 take the following code as an example:
from Tkinter import *
root = Tk()
def test():
if (root.focus_displayof()==entry1):
print 'hello' |
Forum: Python Oct 30th, 2008 |
| Replies: 10 Views: 1,019 .focus_displayof()
not
.displayof() |
Forum: Python Oct 30th, 2008 |
| Replies: 7 Views: 563 Look here and see if it helps:
http://www.daniweb.com/forums/thread133360.html
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... |
Forum: Python Oct 30th, 2008 |
| Replies: 8 Views: 8,631 If you are stuck on windows, check out Notepad++ |
Forum: Python Oct 30th, 2008 |
| Replies: 6 Views: 1,945 |
Forum: Python Oct 30th, 2008 |
| Replies: 6 Views: 1,945 It could be an issue with the python versions, but that isn't usually the error you get when that is the case. |
Forum: Python Oct 30th, 2008 |
| Replies: 6 Views: 1,945 try this before the import
import sys
sys.path.append("c:\Python\DLLs") |
Forum: Python Oct 30th, 2008 |
| Replies: 8 Views: 873 You, sir, just blew my mind.
Also, "Ternary" |
Forum: Python Oct 30th, 2008 |
| Replies: 8 Views: 873 yes, but because of the traverse(p->lokid); two lines into the function, it restarts itself over and over until the end when the fact that p is not defined forces a return. There is no way for it to... |
Forum: Python Oct 30th, 2008 |
| Replies: 8 Views: 873 So, looking at your translation, would you agree with me when I say this code is broken? |
Forum: Python Oct 29th, 2008 |
| Replies: 8 Views: 582 huh, just search for "class average" you'll find something to help you. |
Forum: Python Oct 29th, 2008 |
| Replies: 8 Views: 873 def traverse(p):
try:
p
except NameError:
traverse(p=lokid)
if (p==splitchar):
traverse(p=eqkid)
else:
print p
traverse(p=hikid) |
Forum: Python Oct 29th, 2008 |
| Replies: 8 Views: 582 look here to see how someone else did it.
http://www.daniweb.com/forums/thread66974.html&highlight=class+average |
Forum: Python Oct 29th, 2008 |
| Replies: 2 Views: 297 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... |
Forum: Python Oct 29th, 2008 |
| Replies: 21 Views: 1,636 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... |
Forum: Python Oct 29th, 2008 |
| Replies: 3 Views: 374 picme3=(PhotoImage(file="table.gif"))
(I think (I) (Might) ((See) A Problem) (Here)
wait... maybe not... I'm so confused now... why do you have the extra ()? |
Forum: Python Oct 29th, 2008 |
| Replies: 6 Views: 909 I just realized what you want
you want a new frame at the top of your program, above the other content...
I wish I new wxpython better, I don't use it honestly. Maybe someone else can show you... |
Forum: Python Oct 29th, 2008 |
| Replies: 6 Views: 909 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... |
Forum: Python Oct 29th, 2008 |
| Replies: 10 Views: 1,019 My suggestion would be to look at focus_displayof() instead of focus_get() |
Forum: Python Oct 29th, 2008 |
| Replies: 10 Views: 1,019 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. |
Forum: Python Oct 28th, 2008 |
| Replies: 4 Views: 1,275 I don't think I can properly walk through this without seeing more. What does the input data look like? How is it loaded? |
Forum: Python Oct 28th, 2008 |
| Replies: 2 Views: 527 The hierarchy ends up like this:
window
background
verticalBox
horizontalBox
inputArea
transferBtn
loadBtn |
Forum: Python Oct 28th, 2008 |
| Replies: 23 Views: 1,774 Similiar to what evstevemd said, I was thinking you would need to change the sample rate (how many bits per second are played) if you take a 44000hz sample and play it at 88000hz, it should play at... |
Forum: Python Oct 28th, 2008 |
| Replies: 25 Views: 1,795 I posted earlier that I use vim when I am programming in *nix |
Forum: Python Oct 28th, 2008 |
| Replies: 23 Views: 1,774 What platform are you on? What module are you using for playback right now? |
Forum: Python Oct 28th, 2008 |
| Replies: 25 Views: 1,795 They are very "commandlinesh", which is what makes them so powerful. Seriously, if you are going to be doing a lot of development on *nix learning vim or emacs is the best thing you can do, even if... |
Forum: Python Oct 28th, 2008 |
| Replies: 6 Views: 1,750 Which version of python are you using? |
Forum: Python Oct 28th, 2008 |
| Replies: 1 Views: 458 Are you getting an error when you try to parse it?
what about:
content = file.read().encode('ascii', 'ignore')
? |
Forum: Python Oct 28th, 2008 |
| Replies: 2 Views: 446 So, did you ever get started on this? show us some code and maybe we can help you out |
Forum: Python Oct 28th, 2008 |
| Replies: 5 Views: 491 I'll write up a better explination later, but here is a class that would create the widget and check your answers:
from Tkinter import *
class question():
def __init__(self, parent, q_text,... |
Forum: Python Oct 28th, 2008 |
| Replies: 25 Views: 1,795 Kate is for KDE, so if you are using kubuntu you will be able to use it,
otherwise SciTe is supposed to be kate like, and made for gnome.
just do:
sudo apt-get install scite |
Forum: Python Oct 28th, 2008 |
| Replies: 25 Views: 1,795 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. |
Forum: Python Oct 28th, 2008 |
| Replies: 3 Views: 441 I'll assume you have already read the tutorial at:
http://www.py2exe.org/index.cgi/Tutorial
basically, once you have py2exe installed you need to make a script to build the exe. Make a file... |