15,181 Topics
| |
hello, I have started learning python these days. Although i am following a course on coursera.org for learning it , but that course is going very very slow. Also, I don't know if that course contains all things which is need to build codes in python. I have very good … | |
I have a database with some entry. In my web application I log in with a page and show the corrosponding entries for that user on another page. I am using Jinja werkzueg for my light weight example. And using SQL alchemy. Here is my code for showing the password … | |
I hav amde this alias : test='python -m nose.core --tests $1 -s --with-coverage' this runs but gives an OS Error saying: $ test test_filterList.py nose.plugins.cover: ERROR: Coverage not available: unable to import coverage module ....E ====================================================================== ERROR: Failure: OSError (No such file /Users/sanjeevkumar/Development/python/-bash) ---------------------------------------------------------------------- Traceback (most recent call last): File … | |
import sys i=0; def func1(i): print "i am in function func1" if i<5: i=i+1 func1(i) else: return return def main(): print "beginnning the function\n" func1(i) print "hello Daniweb" s='aman' print "hahha" main() it is giving me syntax error in print "hahha" statement. WHat is that ? According to me, it … | |
Good day everyone - Since this is my first post, I must say hi. I just started learning Python 8 hours ago and I like to challenge myself, so following a guide on playing with files, I decided to make a program that would open a .txt and it would … | |
I am trying to run python -m nose.core --tests test_module.py -s --with-coverage but I keep getting error message saying /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: No module named nose but then i installed nose like this $ sudo easy_install nose Searching for nose Best match: nose 1.3.0 Adding nose 1.3.0 to easy-install.pth file Installing nosetests … | |
In what has been called by some commentators the ‘most significant update in five years’ the latest version of Python finally come of age. Python 2.5 not only apparently fixes some 450 bugs discovered since the 2.4 release was, err, released, but also throws in some 350 patches for good … | |
Hi everyone, I just downloaded and installed numpy, and I'd like to give it a try. But I can't seem to import it. When I try, this is what happens: Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for … | |
First of all, I should say I'm brand new to PyGame and am pretty new to advanced Python. I'm trying to make a side-scrolling game but just making a sprite move back and forth with keyboard input is proving to be a problem. It appears that the loop is running … | |
Hello everybody~! I'm trying to install the latest version of pyHook for my Python 3.3.2 shell. I am a new coder in Python, all though I am rather experienced in lua. Unfortunately, after multiple attempts of trying to install pyHook (1.5.1), I am unable to do so as I get … | |
I made a button "yes". If the button is clicked, how do I insert "5" into an entrybox (aldready existing). | |
Hello! Pretty new to Python but I'm kind of loving it. Already involved in illustration, design, and creating web content for clients, but I'm hoping to expand beyond that into full-fledged web development as well. I know a fair amount of html/css, and was looking for advice on other languages … | |
Hi Guys I want to use ModemDriver.py (v2.0.13) to send and receive SMS via a Mobile Broadband modem. Please don’t tell me to use Wammu/Gammu etc. I have wasted weeks trying to get then to work correctly! I can get things working via the command line. What I want to … | |
I need to restrict this loop from using values greater than 101 and less than zero. The assignment is to make program that finds the average of test scores inputed. I can't figure out what to do, but i feel it's simple. thanks in advance T = 0 GC = … | |
I need help with my homework. Out professor doesn't explain anything and i'm struggeling. TMy homework is: Write, test and debug a program which asks the user to enter three floating point numbers and then reports the largest and the smallest of these values. Here is the example program dialog: … | |
I need to write a program as following: Write, test and debug a program to calculate and output the minimum, maximum, and average of a list of positive test scores. Ask the user how many scores s/he intends to enter. Assume exactly that many scores will be entered one per … | |
Hi I am getting this error AttributeError: 'module' object has no attribute 'instancemethod' I searched through the forum and found answers for this error, but it is not working in my case. I am using python 2.6 and wxpython 2.8. The program which where running perfectly earlier are also showing … | |
import unittest import filterList class TestFilterList(unittest.TestCase): """ docstring for TestFilterList """ def setUp(self): self._filterby = 'B' def test_checkListItem(self): self.flObj = filterList.FilterList(['hello', 'Boy', 1], self._filterby) self.assertRaises(filterList.ItemNotString, self.flObj.checkListItem) def test_filterList(self): self.flObj = filterList.FilterList(['hello', 'Boy'], self._filterby) self.assertEquals(['Boy'], self.flObj.filterList()) if __name__ == '__main__': unittest.main() my above test test_checkListItem() fails , for the below filterList.py … | |
hi i recently found an interesting problem(#19) on the project euler website - projecteuler.net The real answer is 171 and i am getting 175 What is wrong with this code- def sunday(): c=0 sun=0 months=[31,59,90,120,151,181,212,243,273,304,334,365] leapmonths=[31,60,91,121,152,182,213,244,274,305,335,366] for i in range(1901,2001): n=leap(i) #Checking if year is leap year if n == … | |
| I'm new to python so any help would be appreciated, here is a code i've been working on for calculating gpa, I have to calculate gpa of an inputed number of courses by a user (could be 2-infinte number of courses); btw this is not the whole function but only … |
Hi guy, I need those of you who has below os to help me test run [this new software](https://sourceforge.net/projects/fastfilemanager/). windows os (64 bit/32 bit) windows 7/xp/2000/98 etc linux (64 bit/ 32 bit) It is really simple to install the above software, just download the zip file, unzip it, click on … | |
I want to test the layer filtering feature that I added in the UI, so to test using mox def test_layerFilter(self): """ layer filter Knob changed """ mx = mox.Mox() mx.StubOutWithMock(self.writeTab, '_createElementTypesFilterList') mx.StubOutWithMock(self.writeTab, 'getDetails') mx.StubOutWithMock(self.writeTab, 'updateResolutions') self.writeTab.updateResolutions() # Calls self.writeTab._createElementTypesFilterList().AndReturn(['I', 'IST',]) self.writeTab.getDetails().AndReturn(['I_bar']) mx.ReplayAll() self.writeTab.refresh('layerFilter') self.assertEquals(self.writeNode['layerOption'].values(), ['I_bar']) mx.verifyMox() my test assertion … | |
I have an assignment that is very similar to a past assignment. I have to create a for loop to find gpa. The previous assignment was to use a while loop: stop1 = int(input('How many GPAs do want to calculate? ')) totalgp = 0 totalgp1 = 0 while stop1 > … | |
I am working on a program for work and trying to make a massage bar with text can anyone help? I just want the text to move across the screen. from tkinter import * Gui = Tk() Gui.geometry('8000x100+1+600') Gui.title('ALARTS') Gui.config (bg = 'blue') massage = Label(Gui, text = 'this is … | |
A simple way to find duplicate words in a text. In this case the text is preprocessed to eliminate punctuation marks and set all words to lower case. | |
Hello , I have a question about , if there is possibility , to prepare event , after an insertion in database is done , and how ? , using MySQLdb for python and MySQL . | |
Hello , I am trying to modify a backup script , using the zipfile module , it creates the folder of the day , and inside it the zip file that contains the two source folders , but not the underfolders and the files inside them . here is all … | |
i ll send u a question based on checking cheks in chess try coding that in python , here is the question, Problem 2: Check for Checks; Source Module: checkChessCheck Test Module: checkT est Given a board position in chess, check if either the white king or the black king … | |
Hello all I have decided that I will participate in an online coding contest.i just want to ask which programming language is appropriate or powerful for a programming contest?ruby or python?i want to participate with python or ruby as my primary language.i have a little exp. with python but don't … | |
Implement function ion() that takes a string as input and returns True if the entered string ends in 'ion' and false otherwise. ion('congratulation') True ion('marathon') False How can I start this off and Finish it? |
The End.