[Tutor] Integer to binary

2007-07-10 Thread Mihai Iacob
Hello, Is there a function that converts from integer to binary (or a module that handles this)? The only thing close to it that i found in the manual is the binascii module but i can't get it to work. Thanks _

[Tutor] How to import modules using the input() command

2007-11-15 Thread Mihai Iacob
Hello, I was wondering if there is a way to import modules using the input() command. If i try to do it directly it gives me an error: >>> input() import time Traceback (most recent call last): File "", line 1, in input() File "", line 1 import time ^ SyntaxError: invalid s

[Tutor] Having trouble with " table % listTable.values() " line

2006-11-24 Thread Mihai Iacob
Hello, This is my first post so if i make any kind of mistakes take it easy on me :). I don't know how to explain clearly what is the problem but i'll try. table = """ %s |%s |%s --- %s |%s |%s --- %s |%s |%s """ listTable is a dictionary. listTable = {0 :'X', 1 :' ' , 2 :' '

[Tutor] Writing a list in a text file

2006-12-03 Thread Mihai Iacob
Hello def saveBugs(data): store = open(filename, 'w') for timeMark,aList in data.items(): store.write(timeMark + '\n') store.write(aList + '\n') store.close() data is a dictionary aList is a list After i run this part the following error pops up: Traceback (most rec

[Tutor] Starting a .py file from Idle

2008-05-02 Thread Mihai Iacob
Hello, Can anyone tell me how to start a program directly from the interpreter (i'm using IDLE). Usually i open a new window , write the lines of code and press F5 to run the program in the interpreter. The problem is that i need to to that directly from the interpreter. (I'm running windows).