15,181 Topics
| |
hi all, i have loaded a dll with ctypes.cdll and i want to get thta dll's parameters and method like when you write: <'the dll handle'>. and just after you put the dot a list appears to show you the methods or like when you get a dir() from a … | |
Hi All, Its long have not been here. Python have been a language that have refused to get off my shoulders. After more than a year or two I'm back. And to cut story shot is, though I love Rhythmbox, It have the poorest Podcasting module I have ever encountered. … | |
This code determines if datetime object represent first workday of month, but it does not consider the special days like New Year (this year weekend but last year Friday). Reaction to Basic efforts in: [url]http://www.daniweb.com/software-development/legacy-and-other-languages/threads/362098[/url] There algorithm idea given by [URL="http://www.daniweb.com/members/jonkiparsky/775324"]jon.kiparsky[/URL] based docstring says 'workday' when it should be 'weekday': … | |
Some details of my machine and installed packages before proceeding further: [B]Mac OSX version: 10.6.6 Python version: Activestate Python 2.7.1 wxpython version: wxpython 2.8 (uses Carbon API hence limited to 32-bit mode arch only) [/B] I installed wxPython2.8-osx-unicode-py2.7 from wxpython website using their .dmg installer file. This package uses the … | |
help me face recognize using eigenfaces with opencv, a person in webcam | |
I was exploring random art and modified this nice example from vegaseat: [code]# random circles in Tkinter # a left mouse double click will idle action for 5 seconds # modified vegaseat's code from: # http://www.daniweb.com/software-development/python/code/216626 import random as rn import time try: # Python2 import Tkinter as tk except … | |
Hi all, I was working on a MATLab program and I came to a point where I wanted to define a function such that one of the arguments would be used as a command. To clarify, the function being defined was an implementation of Simpson's rule that would integrate using … | |
Hi, Noticed on the Mac that after a script runs the terminal is still there and not usable, one has to control q it to go away. Is there a way to have the script quit the terminal from the script when it ends? Thanks, jkrueger | |
Currently I am making code to be used to make my playing of an online conquest video game easier. The first program the user would run is the initialize program. This is how the program looks: [CODE] #initialize import csv x=1 y=1 n=0 citiesx=[] citiesy=[] city_names=[] total=input("How many cities do … | |
When I try to open an excel file by calling EXCEL itself from python, I cant see any Excel file opened . How can I fix that? Thanks in advance. The code I use is: [CODE] import os from win32com.client import Dispatch xl = Dispatch('Excel.Application') wb = xl.Workbooks.Open(os.path.abspath("Modules.xls")) [/CODE] | |
Hi guys, I am a bit new to OOP in general, and I was just wondering if I am going around what I want to do in the right way. I am making a small game to try to learn OOP and in this game I have several classes for … | |
Hi, I am developing a website, I Have to get the google map on the basis of a particular location which i would get from an object of the database. This ill use it from the template language. For example: [B]person.address[/B] is what ill refer and i should get the … | |
My assignment is to write a golf program that tallies the scores and prints out names and final scores in this format: Player4:21, Player2:33 etc etc. My question is can you use the range function to assign input to the proper variable name in Python 2.7. Here's what I have … | |
My coding here: [code] option_input = raw_input(">>>") option_input = option_input.upper() if option_input == "V": print "High Scores:" saveFile = open("scores.txt", 'r') scores = saveFile.read() saveFile.close() nameScore= [] for line in scores.split('\n'): # skip any empty line if not line: continue userScore, score = line.split(',') #convert score to a numeric value … | |
Hi, I am working with [B]python2.4 on windows[/B], and want pysnmp to be imported. Have downloaded [B]pysnmp-4.1.14a.tar.gz[/B] and [B]pyasn1-0.0.12a.tar.gz[/B] and put it under [B]D:\Python24\Lib\site-packages\[/B]. Still i am getting the import error. from pysnmp.entity.rfc3413.oneliner import cmdgen ImportError: No module named pysnmp.entity.rfc3413.oneliner What should I do to make pysnmp importable? | |
Hello all. I am trying to write a short little game, mainly to boost my knowledge of classes and objects, and of course I am starting to encounter problems. I have several classes for different types of creatures in this game. Most of them take the form of: [CODE] class … | |
After reading a reply to a post regarding importing modules, help("modules") was suggested as a means to display what is currently available. I tried it and got errors after only performing a basic install of Python 2.7 and Python for Windows. Can these be repaired [see attached] | |
Hi guys I'm writing a top down shooter game in pygame and wanted to use sprites for my object. I got a character sprite working fairly well except I have two problems. 1. When I rotate my character the point of rotation is changing. This causes a uneven rotation in … | |
Im taking Intro to computer programming and I have to designed a program in python that reads the numbers on a .txt file and then adds those numbers and display the sum to the user. Very simply program but I can't get it to work. I know sure how to … | |
Using functions, how would I print the lowest, highest, and average of my PAY list? [CODE]try: text_file = open ("Pay.txt", "w") text_file.writelines(Pay) text_file.close() except (IOError): print 'Error opening/writing Pay.txt' try: text_file= open("Pay.txt","r") PAY= text_file.readlines() text_file.close() PAY.sort()[/CODE] | |
I have to write a program in Python that creates two circles colliding to each other and to the sides of the window. Here is what I have so far, but the problem is that they don't collide and they don't bump against the walls. Please tell me what i'm … | |
I have a simple question with Python numpy. I have a numpy array as follows. [CODE]a = [ [1000 2 3] [4 5000 6] [7 8 9000] ] [/CODE] I want to be able to print 3 slices of the array to a txt file so that the elements in … | |
Hi, I'm a Linux user, and have general knowledge of windows. OK, have cygwin terminals working and have colorama and termcolor modules working. Colorrama allows use of termcolor on windows. So, when doing quick scripts that have some color in them programed on Linux I can quickly cxfreeze them on … | |
Hey guys, Couldn't find the answer to this question in any old threads, probably because I don't know the terminology involved well enough. I have a program which takes in data and writes it into a numpy array at the beginning of a pipeline. I use a class called Masterarray … | |
What would be the loss if Python was fully interpreted instead of having a hybrid (compilation + interpretation) model of implementation ? | |
hello, I just signed up to ask...How would I store the information from my code(see below) into a object? I'll be naming the object employees. The code I have now executes this:(please tell me if there are any mistakes on the code I have so far) 1.Ask the user to … | |
I have this psuedocode: [QUOTE]FUNCTION initialize FOR row = 1 to num_items get random number for the list ENDFOR ENDFUNCTION initialize FUNCTION show FOR row = 1 to num_items show output: list(row) ENDFOR ENDFUNCTION show FUNCTION sort FOR pass = 1 to num_items posn = 1 sorted = True WHILE … | |
Hi i'm trying to make a basic snake game. However i cannot seem to be able to display any food. I have tried numerous different ways but i just can't get anything to show :@. I simply want a red rectangle that will display in random places everytime the snake … | |
hi there ,,, im new to this forums and i really need somehelp in paython as i've got this homework and i need somehelp with it !! ,,, and im so stuck in it ! 1.Write a function to find average of a series of numbers entered by the user. … | |
Hi I am new to python. I am trying to get my fraction program to work but I keep getting this error message: Any advice would be helpful! [ICODE] File "main.py", line 5, in ? from fraction import* File "/home/students/bf133052/CS4223/fraction.py", line 10 def__init__(self,numerator,denominator=1): ^ SyntaxError: invalid syntax [/ICODE] here is … |
The End.