15,190 Topics
![]() | |
Hi dears. I am searching around a reporter for python. some thing such as crystal_report or stimul_report witch used for C# and some languages other. thanks. | |
I'm writing a script that will search file names looking from certain file extensions. The thing is, is that I am looking for multiple extensions, and the list may change. I could write an if statement using "and", but the line just gets a bit long and can become difficult … | |
Hi All, I am a newbie in python. I have a SoapUI XML which looks something like this <soapui> <testSuite name=> <testCase> <testStep> <config resourcePath ="testpath"></config> </testStep> </testCase> </testSuite> </soapui> Now from python, I have to first validate that resourcePath is equal to "testpath". If yes change it's value to … | |
Hi all, this is my first post. A couple days ago, in preparation for a math final, I attempted to code a program which would allow me to solve triangles (law of cosines, sines, etc.). Now that the test is over, I am now interested in getting it working. [CODE]#This … | |
Hello everybody ! wow my first time on danyweb ! ;p Well, here the deal. Im doing a script that basically copy and past into the local drive a specified directory with all this files. Im doing the copy with a copytree which is working well. But, (and I know … | |
I'm writing a script that will search files that contain certain keywords, and then output the line to a text file. The problem I'm having is that the script is opening every type of file, including executables. The script seems to work fine, as in it doesn't crash when it … | |
how do I launch a python script within the IDLE python shell from the command line? basically I want to use Notepad++ as my editor, but when I press F5 I want my script to run in the IDLE python shell (NOT in a cmd window). If I do C:\Python26\Lib\idlelib\idle.pyw … | |
This is must read if you learned Java before Python: Python Is Not Java: [url]http://dirtsimple.org/2004/12/python-is-not-java.html[/url] | |
Be aware this is going to be ugly because I have never written anything in python and am attempting to quickly pick up just enough to solve my problem. I need a way to automate doing about 2 weeks of daily archives of a backup file. I think I have … | |
Hi, I'm looking to break up a file with space delimiters. Its really just a list of numbers with spaces in between them, and I need to put each of the numbers in a list as separate entries. However, they are all on one line like so: 5 7 6 … | |
[CODE]from Tkinter import * import pygame.mixer sounds = pygame.mixer sounds.init() correct_s = sounds.Sound("Correct.wav") wrong_s = sounds.Sound("Wrong.wav") number_correct = 0 number_wrong = 0 def play_correct_sound(): global number_correct number_correct = number_correct + 1 correct_s.play() def play_wrong_sound(): global number_wrong number_wrong = number_wrong + 1 wrong_s.play() app = Tk() # creat a tkinter application … | |
Hello, I am trying to sum lists if a condition is met, not working, not sure why, I end up with PN=[0,0,0,0,0,0,0,0] which is it's initial condition and should be PN=[1,1,1,1,0,1,1,1] as PN0 and PN1 satisfy the condition PNi.count(1)<2, so PN+PN0+PN1 = [1,1,1,1,0,1,1,1]. Thanks. [CODE]>>> PN0=[0,0,1,1,0,1,0,1] PN1=[1,1,0,0,0,0,1,0] PN2=[0,0,0,0,1,0,0,0] PN=[0,0,0,0,0,0,0,0] NULL==[0,0,0,0,0,0,0,0] … | |
As I started to mention in this thread [URL="http://www.daniweb.com/forums/thread293034.html"]Checking for filetypes?[/URL]: I'm writing a script that will search files that contain certain keywords, and then output the line to a text file. The problem I'm having is that the script is opening every type of file, including executables. The script … | |
The wxPython GUI toolkit makes a very nice plotting component/widget available. You can select line or marker plotting, or a combination of both. All you have to supply is a list of x,y point tuples. Other features include zooming and printing. | |
atlast I have managed to get some working code but the first problem is that I have is taht.. when I call draw(2,4) I have a column of 2 circles and 4 rows and I would actually like it to be a clomun of 2 and row of 4. Secodly … | |
Hello, can someone please tell me why this simple if ststement dose not run [CODE]>>> VList=[0,0,1,0,1,1,0,0] >>> if VList.count(1) < 5: print('Yes') else: print('No')[/CODE] The VList.count(1)works so not sure what is wrong, but I think that's were the code is crashing. Thanks | |
Guessing Game with functions, classes, methods, etc [CODE=python]#Code should always be in a method or class #Always start variable names with lowercase, classes could be capital #input.upper() allows the user to use lower or upper case for each option import random from operator import itemgetter def isint(x): try: int(x) return … | |
hello everyone ı just bougth a new walkman. ı am thınkıng of addıng or writing some media players ın to sony walkman. but ın sıde the walkman ıt has no any applıcatıon or programs do u have any ıdea how to add python programs ınt o walkman and also our … | |
Okay, so I'm sitting here bashing my head against the desk. I've been googling this for what seems the past hour. I cannot find any relative good links for making Python work with WAMP server. Yes, I understand how CGI scripts work. Unfortunately, I have no idea how to configure … | |
Whenever I run my python code, the window do not have any icon.. How to change it some icon or the icon I want to assign? I can assign a good icon for the exe generated thru py2exe. I want to assign icon for the window opened after double clicking … | |
[CODE]app = Tk() # creat a tkinter application window called "app" app.title("TVN Game Show") app.geometry("300x100+200+100") b1 = Button(app, text = "Correct!", width = 10, command = play_correct_sound) b1.pack(side = "left", padx = 10, pady = 10)[/CODE] In the above code, I understand that "app" is my TK() object. But what … | |
As I told before here is second implementation of one word anagrams, which prepares lookup table for all available words, if it is not generated and afterwards uses it for fast lookup. The implementation of lookup table generation is quite unoptimized, but it is only done once per vocabulary. If … | |
I made a program to search something on google and return how many results it has and it works perfectly as long as the sending code is not inside a function. If I put it in a function the reply from google isn't seen as a http packet(even though it … | |
I have my image converter up and running, except that I need to have multiple extensions for a single format(JPEG and TIFF). I tried putting the names in separated by commas, but that doesn't work. | |
I have been trying to use a wxPython textctrl to display a list of files, but it did not fit my purposes. The wx.StaticText seemed useful, and a ll works except for one major kink; I don't know how to scroll it. Moved post to its own thread, since the … | |
Hi I was wondering if there was any way in which using Python i would be able to move the mouse pointer and make it click at certain x and y values. This would be used in a Macro type machine for the mouse. I have looked around for modules … | |
Hi, I was wondering if anyone has a sample code on how to implement fuzzy c means clustering in python for 3D points. I looked around online and haven't found anything promising. Thanks. | |
hi. wondering if someone can take a few min to help me out. Well im taking this opencourseware from MIT, intro to programing. I got this assignment [url]http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00-introduction-to-computer-science-and-programming-fall-2008/assignments/pset9.pdf[/url] and I could do it on my own... the only problem is I dont understand what the hell they want me to … | |
import MySQLdb db = MySQLdb.connect(host = "localhost",user = "root",passwd = " ",db = "TESTDB" ) cursor = db.cursor() sql = """CREATE TABLE CRAWLER ( FIRST_NAME CHAR(20) NOT NULL, LAST_NAME CHAR(20), AGE INT, SEX CHAR(1), INCOME FLOAT )""" cursor.execute(sql) db.close() when i execute this code there is an error occure like … | |
how to install the msqldb package and where to place it in python? then when i compile the code there is an error like no module named MySQLdb.... pls clarify this.... |
The End.