15,406 Topics

Member Avatar for
Member Avatar for hondros

Hey there. I've been programming in Python for about a month now. I've created simple programs for myself, such as games and e-mail applications. Still getting GUI down, I'll post if I need help there. Anyways, here's my problem: Running: Windows XP Python: Python 2.6 I installed the newest version …

Member Avatar for Eswarimallur
0
2K
Member Avatar for novice20

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' …

Member Avatar for novice20
0
191
Member Avatar for mukthyar1255

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

Member Avatar for Gribouillis
0
84
Member Avatar for bmanzana

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) …

Member Avatar for bmanzana
0
119
Member Avatar for Zaffron

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 …

Member Avatar for Zaffron
0
113
Member Avatar for WolfShield

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: …

Member Avatar for WolfShield
0
430
Member Avatar for colts18

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.

Member Avatar for raptr_dflo
-1
473
Member Avatar for HelloPeople1

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 …

Member Avatar for raptr_dflo
0
317
Member Avatar for jarograv

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 = [] …

Member Avatar for TrustyTony
0
101
Member Avatar for mahela007

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 …

Member Avatar for mahela007
0
763
Member Avatar for Schol-R-LEA

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, …

Member Avatar for Schol-R-LEA
0
697
Member Avatar for mukthyar1255

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

0
50
Member Avatar for rssk

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

Member Avatar for rssk
0
79
Member Avatar for ehud07

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 …

Member Avatar for matthewkeating
0
166
Member Avatar for Thisisnotanid

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, …

Member Avatar for Schol-R-LEA
0
333
Member Avatar for LogicallyInsane

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 …

Member Avatar for LogicallyInsane
0
86
Member Avatar for JohnRedCorn

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?

Member Avatar for TrustyTony
0
142
Member Avatar for leegeorg07

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?

Member Avatar for SamarthWiz
0
167
Member Avatar for e-papa

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 …

Member Avatar for vidur
0
207
Member Avatar for zpzp16

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 …

Member Avatar for vegaseat
-1
110
Member Avatar for hisan

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 …

Member Avatar for raptr_dflo
0
5K
Member Avatar for hisan

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

Member Avatar for raptr_dflo
0
214
Member Avatar for pmennen

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 …

Member Avatar for vegaseat
0
522
Member Avatar for tbjo

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 …

Member Avatar for vegaseat
0
191
Member Avatar for dilbert_here00

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 …

0
114
Member Avatar for jamie-pu

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='') …

Member Avatar for TrustyTony
0
170
Member Avatar for mukthyar1255

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 >>> …

Member Avatar for TrustyTony
0
161
Member Avatar for jarograv

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. …

Member Avatar for woooee
0
156
Member Avatar for mukthyar1255

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

Member Avatar for vegaseat
0
99
Member Avatar for WolfShield

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 = …

Member Avatar for WolfShield
0
469
Member Avatar for TrustyTony
0
365
Member Avatar for palobo

Hi all, I'm trying to learn python. So far I've managed to get some usefull scripting done to automated some tedious jobs. Now I have an itch I'd like to scratch writing and app in python. I do however want a unified look and feel across Mac, Windows and Linux …

0
95
Member Avatar for Arthas

Hi. i didnt actually find the exact place to start this thread. I ,and my friends, are doing a major project on HIDS(host based intrusion detection system). I think i know the sources of information i need for the analysis but i dont know how to get them. These are …

Member Avatar for Arthas
0
84
Member Avatar for mukthyar1255

Hi , I am beginner in python programming ,how to configure new Python Package(third party packages) on windows7 platform..please tell me the configurations Thanks Mukthyar

Member Avatar for TrustyTony
0
58
Member Avatar for JohnMG

Hello! This is my first post. I've put this up on several other forums, but this one seems slightly more active (python-forum.org is a snooze-fest). I have been learning python for a few months and decided to make a chat server that you connect to through telnet. It's working fine …

Member Avatar for TrustyTony
0
956
Member Avatar for markfw

Hi First of all I want to thank everyone in this forum who helped me to understand PySide. I have a question about QtCore.QProcess: Here how my program works: I have button (QtGui.QPushButton) when it gets clicked, my program should call my C compiler (GCC) and compile the source code. …

Member Avatar for markfw
0
348
Member Avatar for Sandmann

Hi there!... i was seeing some codes in Python, but i can't understand it, so... i really don't want learn phyton, by that reason i want to know some things (specific things) for try convert it, now... if someone can convert it for me, i'll be sooo glad :P. Here's …

Member Avatar for vegaseat
0
169
Member Avatar for Shane the House

I have been working with lists for a year now, but I am inconsistent with the way I have them setup. I want to know the standard. Let's say you have a computer represented as pixel colors in the form of a list. To simplify it let's just use numbers …

Member Avatar for vegaseat
0
121
Member Avatar for sahityaonprakri

Can anyone give me these solution PLZ.[TEX][/TEX] [CODE]import string STUDENT_ID = 0 STUDENT_FIRST_NAME = 1 STUDENT_SECOND_NAME = 2 STUDENT_MARK = 3 def inputMarks (mList): print "inputMarks not yet implemented" def calcGrade (mark): print "calcGrade not yet implemented" def printIndividualRecord (record): print "printIndividualRecord not yet implemented" def printAllRecords (mList): print "printAllRecords …

Member Avatar for vegaseat
0
116
Member Avatar for mikio

please could some one understand what i am saying i need a program that can count number of digit in a number given by the user .for example if we see123 it has 3 digits...?

Member Avatar for vegaseat
0
2K
Member Avatar for markfw

Hello Quick question: Does anyone know why my window doesn't show frame? Thank Mark [CODE] import sys from PySide import QtCore, QtGui class UI_CMDTester: def __init__(self): self.__app = None self.__win = None def init(self, \ w_title, \ w_width, \ w_height): self.__app = QtGui.QApplication(sys.argv) self.__create_win(w_title, w_width, w_height) sys.exit(self.__app.exec_()) def __create_win(self, w_title, …

Member Avatar for vegaseat
0
226
Member Avatar for bleedblue

Need help building a phonebook that will store and produce a telephone directory. The phonebook needs to be able to order the data by first name, last name or birthday, and produce output as such. The data is to be stored in a text file (simple database), and can be …

Member Avatar for griswolf
-1
191
Member Avatar for Ronene

Hi guys , I have the following code : [CODE]x=int(input())[/CODE] If I get a string from the user string ,list or a double , then I'd an exception . Is there a way to get any input from any type , and store it within "x" , even though I …

Member Avatar for vegaseat
0
193
Member Avatar for Aaronjw

Alright, I am working on this for an assignment and I cannot seem to figure out where I went wrong... My first problem, whenever I input the CC number, the only one it accepts is the last one in my text file... My second problem, when it does accept a …

Member Avatar for Aaronjw
0
140
Member Avatar for hisan

Hi All, i have basic python knowledge please let me know how to get started with jython please let me know where can i find good online books for jython, how to write some small programs and how to run them

Member Avatar for vegaseat
0
149
Member Avatar for MaYouSHka

hi all, i have been working for two months on a project and i have come up with an algorithm that is a mix of R. Mitkov's algorithm on anaphora resolution (robust, knowledge-poor algorithm) and several filters that are applied first to the xml file (a POS tagged text) to …

Member Avatar for TrustyTony
0
339
Member Avatar for dx135

You can use a decorator to modify the function object once, by assigning initial values to some new attributes. Then use these attributes as you would use static variables in other languages. Here is the result: (1, 1, [1]) (3, 2, [1, 2]) (6, 6, [1, 2, 3]) (10, 24, …

2
511
Member Avatar for vegaseat

Hello, I am vegaseat, the goofy moderator from the Python forum of DaniWeb. I wanted to know if anyone in the Java forum has played around with Java based Python, also known as Jython. Jython uses easy to learn Python syntax and can use the Java libraries. To make a …

Member Avatar for bumsfeld
2
494
Member Avatar for txwooley

In the book "How to Think Like A Computer Scientist" on the website openbookproject.net the tutorial leads you to draw a house with a pre-written script. It then instructs you to: # Wrap the house code in a function named draw_house(). # Run the script now. Do you see a …

Member Avatar for shasta90
0
591
Member Avatar for HiHe

According to the Python 2.7 manual this construction of the with statement should work: [code]text = "aim low and reach it" fname = "test7.txt" with open(fname, 'w') as foutp, open(fname, 'r') as finp: # write text to file foutp.write(text) # read text from file mytext = finp.read() print("to file --> …

Member Avatar for vegaseat
1
170

The End.