15,190 Topics
![]() | |
Hi I have got the TypeError. I use lists at the same way in my other programs it works excellent, but just in this program I have got problem don’t know how to solve it? [COLOR="Red"]Traceback (most recent call last): File "E:\extra_b.py", line 42, in <module> ordna(pile) File "E:\extra_b.py", line … | |
i recently started python and i wanna learn how to implement modules in my program, but when ever i try to string modules together it says function not callable how do u make functions callable and if u cant then how would u put this code 'readTextfile.py--reads and displays text … | |
How can I get every Token (word) and PreviousToken(Previous word) From text file For example if the text file content is "Every man has a price. Every woman has a price." First Token(word) is "Every" PreviousToken(Previous word) is none(no previos) Second Token(word) is "man" PreviousToken(Previous word) is "Every" Third Token(word) … | |
Ok heres the deal i need to make this program that will allow users to practice their addition and subtraction for whole numbers between 1 and 100, 1 and 200 and 1 and 500 (the levels of difficulty). The user will be allowed to choose which operation to have questions … ![]() | |
Hi! I have a class: [CODE=python]class A(object): calledMethod = None def a1(self): pass def a2(self): pass[/CODE] Now when I create an object and call some method: [CODE=python]a = A() a.a1() #or a.a2()[/CODE] I need somehow to save the name of called method in variable calledMethod. Could this be done with … | |
HI all, whenever we open any python/wxpython program there is one more window other than our application is running which is command line window that black window for showing any error or any output through print statement.So i want to remove that window from my wxpython's application,how to do this?please … | |
Hi everyone, I have looked through the ctypes documentation, but can't find anything about making the mouse click, I mean, I can get it to move, but not click. Thanks in advance. | |
Well, I need a pretty simple code (Lempel-Ziv-Welch compression algorithm) converted from Python to Java. I don't want to run JPython because I don't need it to be interpreted as Java, I need to interpret it myself because I use a scripting language similar to Java, but not exactly the … | |
G'day all, I am just starting to teach myself python and in the program below I am reading in a CSV file and moving files from one directory to another. I would like to be able to ensure that the user enters a Y or an N only, if they … | |
Hi I have a function dela ( ) and I want to call it by user (c) times, but I get an error. [COLOR="Red"]Traceback (most recent call last): File "C:/Python25/My programs/extra_b.py", line 21, in <module> for j in range (c): TypeError: range() integer end argument expected, got str.[/COLOR][code=python] if __name__ … | |
Hi, all I am studying Python recently. I have written a example code to create a GTK window. Below is the sample code: import pygtk pygtk.require('2.0') import gtk import gtk.glade import os import sys import re from signal import SIGKILL from math import floor from time import time import trace … | |
I can't upload very large files (more than 500 MB) on the site using ftplib library. Who shall help me? | |
I'm pretty new to programming. I've just been studying a few weeks off and on. I know a little, and I'm learning as I go. Programming is so much fun! I really wish I would have gotten into it years ago, but here's my question. I have a longterm project … | |
This problem has been bugging me for the past few days. I've tried all sorts of different things to get it to work, studied my books, but nothing. It goes like this: Let's say I want my robot to recite the three laws of robotics. I can say, "Recite the … | |
For instance, if you have the following (random example): [code=Python]w = input("Enter width") h = input("Enter height") for x in range(0,w): for y in range(0,h): print x,y if (raw_input("Stop? y/n") == "y"): break[/code] That would only break out of the y loop. You could introduce another variable, and change the … | |
Hi Everyone, I am trying to install Tossim (simulator for Tiny OS ) on my Mac. I have a Macbook which runs 10.4.11 . I am stuck because I am unable to find the file libpython.2.4.so . Can someone please tell me the directory that this file gets stored in … | |
Nvm :/ Please excuse my blindness. Where's the delete topic button at? :( Please excuse it again. ~Shadow14l | |
Hi. I am totally new to python. I have a problem that I have been trying to solve without any form of solution. I have a group of files in Directory A that are named like: Text__###__TEXT___###.tif These are dummy files. The real files are in Directory B and are … | |
I just want a console to run. When I use this function, I don't ever want the automatic tk window to appear. How would I use this function without any gui? *Also on a side note, what is the python code tag? (python)is it this :P?(/python) | |
Hey guys, lately i've been having some trouble with file I/O but usually i don't heres an example of reading a file: [CODE]print "\nReading..." myfile = open('myfile.txt', 'r').read() print "\n",myfile[/CODE] but is there and easier way to do that because when i try to run the program just stops, it … | |
I'm trying to create an audio playing program for my final project in my computer graphics class. I'm using tkSnack but i keep on getting this difficult error and i seem not to find any solution. >>> from Tkinter import * >>> root = Tk() >>> import tkSnack >>> tkSnack.initializeSnack(root) … | |
hi all! how can we list all directory as well as file(all hirerchical) in python script by giving the path as input | |
[quote] cell.health -= fighters[0].compDmg(fighters[0],cell) TypeError: compDmg() takes exactly 2 arguments (3 given)[/quote] Both fighters[0] and cell are object instances. How on earth does it see 3 arguments in this? I don't think wider context is needed, but just ask if it is. | |
Hey guys, I've came across problem and wondering say if you have a 2 lists called user_list and pass_list and you have a prompt for username and password. Instead of 1 user name and password how could it be for all can be used at the same prompt? heres an … | |
I write code to get most frequent words in the file I won't to implement bigram probability by modifying the code to do the following: How can I get every Token (word) and PreviousToken(Previous word) and frequency and probability From text file and put each one in cell in table … | |
HI All, I am connecting to a https site through proxy.But when I am trying to do it I am getting Unknown Protocol Error ..Is there any problem in ssl or proxy??? Can anyone help me in this regard??? | |
Dear all, Previously i used Python2.3 now i upgraded to python 2.4 but my problem iam getting error ImportError: No module named pywin.framework.startup what to do ?????? regards Narain | |
i want to define a dictionary in python script i come from china . start to learn python only a week ago e-mail: [email]zls11610@onestx.com[/email] | |
If I write a code like: def addstring(n): a1=raw_input("PRINT THE FIRST STRING:") a2=raw_input("PRINT THE SECOND STRING:") a3=" " a4=a1+a3+a2 print "THE TWO STRINGS YOU PRINTED ARE ADDED AS" print a4 Now, if I design one HTML form where strings can be submitted but if I put one ADD button how … |
The End.