User Profile
Collapse
-
Yeah, sorry about that. Seems I was having trouble with my compiler. -
Introductory program broke
Well I'm trying to learn C++ (know a little Python) and I wrote what was supposed to be a quick and easy four function calculator. Well, after finally getting the compiler to work without any errors or warnings, the program wouldn't open up or do anything. It was running, though, and I had to close it via the processes tab, because I couldn't see it.
Anyone got any ideas on this one?
EDIT:
Oh, and I'm using wxDev-C++... -
The source code is just a txt file with a py extension. Run it with the python interpreter to use it....Leave a comment:
-
Button refferences in Tkinter class
I'm rather new to both Tkinter and Classes, so whatever I'm doing wrong probably seems really stupid. Just bare with me, here. The reference to the buttons seems to disappear after the __init__ method, so when I try to call them and change them in another method, I get an attribute error.
Code:def __init__(self): self.window = Tk() self.left = Frame(self.window, relief='sunken', border=1)
-
Erm, I'm not sure, but I read somewhere that after a number gets to be a certain length in Python it uses 'Long Integers' or whatever...Let me look it up.
WikipediaLeave a comment:
-
Hmm...
pickle.Pickler( adFile).dump(ad Dict)
returns a value error. I'm still playing around with it. Didn't have much time to look at everything last night.
About the IOError, I'm thinking it has something to do with the security settings on this computer. Perhaps student users don't have permission to write the right thing, I don't know. Would anyone know what security settings might effect Pythons ability...Leave a comment:
-
Oh, I'm sorry. I'd completely forgotten the Dill thing. It's
import cPickle as Dill
Don't quite understand why I would only import Unpickler as I'm also dumping stuff..?
But yeah, I see what you’re saying. I can't believe I forgot to put the () after .close, and I didn't use Unpickler at all.
Anyway, thanks for the help, I'll probably re-write a bit of it tonight and see how it...Leave a comment:
-
Pickle Stuff and Filename Recognition
First of all, the important parts of the code...
Code:def AddressRW(aw, ar): #For Reading & Writing to address file while aw == True: try: #(W)right adDict = {} adFile = file('address.txt', 'r') adDict = Dill.load(adFile) adFile = file('address.txt', 'w') newName = raw_input("Enter
-
-
'cat' in windows (quick question)
The tutorial I'm using is written by a linux user, and he uses the cat function. He said to use whatever works the same way on your OS. What would work like this for windows users? -
-
Text doc lists [solved]
Hi, I'm trying to use a .txt file to store data (in lists) for python, but I've got no idea how to go about this. Would that even be a good way to store lists? -
It didn't work because I named the program Password.py where the .py was unnecessary. X_XLeave a comment:
-
UPDATE: Ok, it's Monday. I tried sys.path.append ('blahblah'), which added the directory, but still didn't help create the module.
Also, sys.path doesn't show the the path on my computer, either, though the program I'm importing (or really a library of functions) is in the same folder. This isn't any different than on the school computer...
I'll remember the sites URL tomorrow (or the day after, which seems more...Leave a comment:
-
Hmm, thanks. I suppose I should be doing that all the time, if that's the proper way to go about it. D: I'll reserve all my thinking for tomorow. 'Tis late.
But, yeah, thanks for the help. I think I should read that section again.Leave a comment:
-
Password is another part of the program I'm writing in the same folder, which is like 'Python Programs' or something on the desktop. From what I've seen so far, Python should automatically compile that and use it, right? That's what it does on my computer. D:Leave a comment:
-
The actual program is tabbed, isn't it? Could you do that, I can't really tell whats going on otherwise. >.>
Well, I don't know. I might still not be able to tell what's going on, but it will help.Leave a comment:
-
Module faled on school computers [solved]
I got my teacher to intall python on one of the computers, but python doesn't seem to want to compile modules. I used the same code I use at home, but I get
ImportError: No module named password
or something like that. Might this have something to do with some of the ungodly settings schools use to lock down computers? Or is there something else I'm missing? -
I know, but the intention was to find the number of characters in a particular object in the list. A 'no less than five characters' thing.
I don't really need it anymore because I'm changing the way I'm going about this particular problem, but is it possible to do that using the len function on lists?
Thanks for the help, mate.Leave a comment:
-
Oh....Duh, nvm.
I've run into another problem, but from what I've seen, the proper sintax is
user.append(raw _input("Type in desired username "))
right?
I can't properly test it, because (after changing user to a list) my original code directly afterward doesn't work.
if len(user) > 4:
Doesn't work because it's asking how many objects are in...Leave a comment:
No activity results to display
Show More
Leave a comment: