15,181 Topics
| |
Hi all, i have different modules developed so far, and a main script needs to call the modules based on user's choice. will doing like this work?? using raw_input(), i wait for user choice, and once a choice is made, corresponding module is called. if main.py, does an 'import xxx.py' … | |
Hi I am new to python programming,please explain me how to install external modules written by other python users,please mention names of such modules.. Thanks Mukthyar | |
when i run this code an icon for the image is created but when clicked it says that no preview is availeble any help would be grately apretiated. heres the code. [CODE]from Image import * import ImageDraw z=1 win=new('RGB', (400,400), 'rgb(255,255,255)') win.save('c:\\Documents and Settings\\bradley\\desktop\\python programs\\frac.png') while z < 100000: x=(z**+1) … | |
Obviously, it doesn't work. So what I'm trying to do (this is all very rough at the moment, merely an experiment/test to see if I can get it to work) is have a method under the player class that, when called, takes the value of the requested item, sees if … | |
So, I am working with some code I don't understand. Here is the file: [CODE=Python] import sys import os def change_ext(directory, old_ext, new_ext): for f in os.listdir(sys.argv[1]): base, ext = os.path.splitext(f) if ext[1:] == sys.argv[2]: os.rename(f, "%s.%s" % (base, sys.argv[3])) if __name__ == '__main__': if len(sys.argv) < 4: print "usage: … | |
Hey guys I cannot figure out how to add collision detection can someone explain how I just want my tank to stop moving when it hits the other tank. Can anyone help? Thanks. | |
Hi We are high school students working on a final project for our course. We are making a top down shooter type game using pygame (its kind of like boxhead), and have made made all of our game except for the ai. We really need some help with this, so … | |
I have this code: [CODE]import csv from math import * distances=[] pos=0 tally=0 target_x=input("Please enter the X coordinate of the target city: ") target_y=input("Please enter the Y coordinate of the target city: ") count = sum(1 for row in csv.reader( open('cities.csv') ) ) cityname = csv.reader(open("cities.csv", "rb")) citynames = [] … | |
Hi. I want to try and control a Servo motor directly from a USB port. (without using an intermediate microcontroller). To do this, I need to send pulse width modulation signals on one (or more) wires of the USB cable. Is it possible to do this with python? (I found … | |
I [url=http://www.daniweb.com/software-development/python/threads/364777]recently discussed[/url] some problems I had had in getting PyODBC working with Django and Django-pyodbc, but at the time it was decided to switch to an ASP.NET solution instead. For various reasons, we are trying once again to set up Django and PyODBC, and while we've had some success, … | |
Hi, I am new to Pyhton programming,I have 2 doubts 1)can i do client-server,web application,database access programming using python,GUI application? 2)what are the modules are used to do this programming? please provide some website link and details reading this programming. Thanks Mukthyar | |
hi all.... i hav three scripts like 1)memory.py 2)channelmap.py 3)upload.py [B]i need to run only one script depending upon a selection(i.e,1)memory.py, 2)channelmap.py , 3)upload.py ) is there way to do this [/B] plzzzz help me | |
Hey guys, I'm new to pygame, and working on a simple educational worm game project. The idea is to display a math problem every time the worm hits the apple, and then have the student answer that math question. I can't figure out a way to get the keyboard inputs … | |
Hi all, I was experimenting with techniques of generating random numbers and eventually decided on the following. I realize there's a big discussion in computing circles about "randomness" and as such am not trying to make any claims here. What do you think? Thoughts, comments, suggestions, discussion of underlying theories, … | |
So after pretty much giving up on programming (I think I should say that I kinda forgot about it actually) and not checking Daniweb, I decided after a few months of doing other things I'd come back to Daniweb and start trying to program once again. After skimming through "Learn … | |
Hi I'm trying to strings to be saved into a textfile, however, it does not put each string onto each line. So instead looking like this, First Second Third It looks like this, FirstSecondThird What do I need to do to get it to write to the next line? | |
| Hi I was wondering if there has ever been/ are plans to be a python os and if it exists where could it be found? secondly i was wondering if python could be installed on windows mobile or android? |
HI guys, I want to create and encryption system that converts a character to encrypted data, I'm thinking about using the ord() and chr() functions in python then slice the sting into characters implement the encryption on each character and bring them back together what do you think, Is there … | |
hi I have a list like L=[1,2,-3,5,12,0,-2,23,51,-10,1,68] I have to Subtraction each item of list from other .i.e l[1]-l[0] & l[2]-l[0] & l[3]-l[0]&... and l[2]-l[1]& l[3]-l[1]&... and l[3]-[2]&... I must arrange this Subtraction in a table.I know I must use while or for...in... to create tow loop but I am … | |
hi All, I am importing the SQL DB data into a CSV file, the length of the data is too large and doesn't fit with default csv file column width, so i need to increase the column width please let me know how can you achieve this . below is … | |
Hello all, i am importing the data from db using MySQLdb module in python, please let me know how to write this data into an excel sheet. from db i get data in multiple rows and columns please tell me how to write in excel | |
The Eric4 IDE I've been using IDLE under the latest Enthought release (python 2.7) running windows XP (and windows 7 on another computer). But I decided I wanted to use a real IDE with the goal of writing GUI applications. It seemed like Eric4 would be a reasonable choice. I … | |
Hi! I'm working on code for a personal project thingie, and I'm stumped by part of it. I am trying to search a line (provided in a separate .txt file) to see if I can find any consecutive occurrences of elements of a list in said line. For example: in … | |
Hello All, I have a question on win32gui, how do I get the window ID corresponding to a window handle. I am able to get the window handle, class, caption using functions like "win32gui.GetWindowText", "win32gui.GetClassName" etc, but I can't find a function that returns the window ID for a particular … | |
| Hello, Im trying to make a simple equation solver with tkinter. Originally i built it without using classes and it worked fine however I am now trying to use a class. [CODE]from tkinter import * import math class RootFinder(Frame): def __init__(self, master=None): Frame.__init__(self, master) self.grid() self.create_widgets() def create_widgets(self): self.root1lbl=Label(self.outputframe, text='') … |
Hi, I am a beginner in programming of python , in python to view all the functions and other objects of 'keyword' module,i used the command ,dir results the some objects like __file__,__package__,__doc__ but these are not the functions of keyword module,could u please tell me the reason................. :D >>> … | |
I have this code: [CODE]def welcome(): '''========Welcome to Jaron's======= ====Video Game Rental Service====''' def menu(): while True: print '''0-\t Exit 1-\t Register 2-\t Log-in 3-\t Browse 4-\t Read-me''' try: menu_choice=int(raw_input('Please make a selection by number: ')) global menu_choice break except ValueError: print "Oops, it seems like you made a mistake. … | |
Hi, i am beginner in python programming,can you please let me know.what is difference in between the python Package and python library, Thanks Mukthyar | |
I am going through a tutorial and have come to opening a file. I'm running it in Command Prompt, but I know there is no problem with that because I have been running code in it without problems. Here is the code I'm supposed to be typing: [CODE=Python] f = … | |
One solitaire game practice until the first win or 'q' after game. |
The End.