15,181 Topics
| |
Hi, I want to get a link from a webpage say h++p://www.daniweb.com. This page might be aspx. Then I want to extract a particular url from this and I have to open that url with some parameters. What should I use for this for doing this in python?? Just need … | |
I am working on a psycopg2 application for a customer. I first used: SELECT * from table which worked fine with 'cursor.fetchone()'. But due to some technical details between the customer's database and the database on my company's side where I could not depend on the order of the fields, … | |
Hi, I created successfully an .exe file for my python code. As a .py file, it works like a charm. But when I try to run it from the exe version, I get error as follows: [CODE] Traceback (most recent call last): File "CreateAS.pyw", line 14, in <module> File "pulp\__init__.pyc", … | |
I know that many people have programed for the Ipod, and have used a lot of different languages, but I can't figure out how to use python to make apps. I understand that I need an interpreter, but I don't know where to find one. Also, how do I import … | |
I was wondering if there is a way to make a transparent image for Tkinter. I was wanting to layer some images at random so I wouldn't know the background to use... at first I was using .GIF but I heard .PNG worked for transparency but I couldn't get .PNG … | |
I'm trying to make the old box game (if you are unfamiliar with it you can play it here: [url]http://www.tcastle.com/games/dots/dots.html[/url] I've seen it go by many different names though) and I was wondering if there was a way to get the pictures on buttons to change easily this is the … | |
I cant figure out how to make a input lock that if the user types in a letter and not a number between 0 and 1000 that it will keep on asking for a number until it gets it. Thanks for any help. | |
Hello, i have the following query. I have a txt file with data like this: [CODE]1 observational study 1.1 cohort study 1.1.1 retrospective cohort study 1.1.2 prospective cohort study 1.2 cross-sectional study[/CODE] And another file with data like this: [CODE]cross-sectional survey 12345.txt retrospective study 2345.txt ...[/CODE] I want to do … | |
The program is suppose to create and account but if the passwords do not match after the 3rd iteration it's suppose to output that its been too many tries and end the program... I can't seem to figure this out any help would be greatly appreciated. [CODE]while 3: print ("Welcome … | |
I am wanting to refer to a number of items from the end of a list, but can't get the syntax right, [CODE]previousDays = 5 pDaysRange = (31-previousDays,32)[/CODE] previousDays is the variable I can change, there are 31 days in the month so i'm trying to take the last 5 … | |
I'm trying to do some simple parsing as example: [code]import csv import os,sys spamWriter = csv.writer(open('eggs.csv', 'wb'), delimiter=' ',quoting=csv.QUOTE_MINIMAL) string = "cat /home/myfile.txt |grep -m 1 "my game" " string2=os.system(string) spamWriter.writerow([string2]) [/code] [quote]home]# python excel2.py File "excel2.py", line 4 string = "cat /home/myfile.txt |grep -m 1 "my game" "[/quote] ^ … | |
Hey guys, before I begin, I'd like to specify that this is for a personal project that I am playing with, and not for work or school or anything of that ilk. In Python, I am trying to define a function that will search a .txt file containing a large … | |
Hi, I'm intend to do the following -do a calculation ; record the value with timestamp to excel (csv format will do) -repeat above step; append a new row to csv with newly calculated value and timestamp. ... ... continue in endless loop. Could someone give me some pointers on … | |
Hello All, I have a very simple search cursor that is selecting from a table a list of names in order to query a database. It was working fine until I encountered a name with an apostraphe in it. O'Brien for instance. The search cursor is very basic. [CODE] inCur … | |
Hello, I've just recently found out about Python scripting and I am interested in programming an auto login script. However, when looking around, I haven't found any Python web scripting tutorials or guides. If someone could either explain to me how it works, or point me towards a good tutorial … | |
Sorry - I know this isn't strictly Python, and i'm more asking for a formula than code! Usually Excel functions show how they are calculated but i can't find anything on this one! So given a set of data, predict what the next value will be based on the previous … | |
Hello, Iam using matplotlib to create a scatter plot and i have trouble in converting to exe. The error iam getting is [CODE]Traceback (most recent call last): File "portopti.py", line 8, in <module> File "matplotlib\pyplot.pyc", line 95, in <module> File "matplotlib\backends\__init__.pyc", line 25, in pylab_setup ImportError: No module named backend_tkagg[/CODE] … | |
I have an issue while creating a CSV file using the CSV module [CODE]csvFp = csv.writer(open(fileName,"w"), delimiter=',') csvFp .writerow('1') csvFp .writerow('2') csvFp .writerow('3')[/CODE] When i execute the above code,it creates the CSV file correctly but a blank line is inserted between each row eventhough i have not inserted that in … | |
dear Group256 i am a student who is doing my project on python platform...according to my project i has to have a client server public chat code which is very similar to the one u have posted here. i am currently working on a code for this puepose but i … | |
[I]<<mod edit: answer to [URL="http://www.daniweb.com/software-development/python/threads/32007/1496502#post1496502"]this post[/URL] from the sticky "[URL="http://www.daniweb.com/software-development/python/threads/32007"]projects for the beginner[/URL]">>[/I] [CODE] #1 * 8 + 1 = 9 #12 * 8 + 2 = 98 #123 * 8 + 3 = 987 #1234 * 8 + 4 = 9876 #12345 * 8 + 5 = 98765 #123456 … | |
I'm trying to do a project that uses the trigonometric functions, but I'm having some trouble with them. When I type in this code: [CODE]import math print 0.5+math.cos((2*math.pi)/3)[/CODE] I get the answer 2.22044604925e-016. That's obviously not right. cos((2*pi)/3) is -0.5, so I should get the answer 0. Can anybody help … | |
Hi All, I created succesfully an executable version (Py2exe, Pyinstaller) of my application. When I try to run the app from .exe, I get an error as follows in the log file: [B][CODE]Traceback (most recent call last): File "CreateAS.pyw", line 8, in <module> ImportError: cannot import name Publisher[/CODE][/B] I am … | |
I have no idea where to start with this Python code. Any help is greatly appreciated. There is obvious going to be an input function but I'm not sure how to make the list. Here is the problem: Write a program to take in the names of U.S. Presidents into … | |
Hello I'm trying to make a verb conjugator for Spanish. The problem is that I need to get the last two characters in the verb to be able to determine the verb group to which it belongs. In Spanish, conjugation depends on the verb ending, among other factors. Verbs end … | |
For example I have a non-ordered list of values [10, 20, 50, 200, 100, 300, 250, 150] I have this code which returns the next greater value: [CODE] def GetNextHighTemp(self, temp, templist): target = int(temp) list = [] for t in templist: if t != "": list.append(int(t)) return str(min((abs(target - … | |
Hi All Hope everyones doing good. I have two \t files with 3 columns, file1 contains 600050 rows and file2 contains 11221133 rows. I am comparing file2 with file1 to match common entries in first two columns, if file1[0:2] in file2[0:2 ,] write file2[0:2]+column 3 else fil1[0:2] + 5. I … | |
I am trying to read from a txt file and counts the number of times each word appears. The problem is that it counts the EOL characters as well. I tried to use the rstrip, still it didn't do anything. So how can I handle these end-of-line characters? Please help. … | |
Hello, I am looking into the matplotlib module to plot my data. The graph that I am interested is in the following code. Now I want to mention some labels over the each bar plot mentioning some string and values is there any function to do? Also I want to … | |
I have a foreign key linking two models. One is called ZumaDirectors, the other ZumaConsolidated. For some reason I cannot access fields on ZumaConsolidated from ZumaDirectors using foreign key. I can do this without a problem on ZumaDirectors with a foreign key linked to another table. I want to be … | |
Hi guys i have 3 question for the pygame pong game I made: 1. I keep getting an error when i run this that has to do iwth the wx window I made for the user to enter a speed. this is the error code: [ICODE] Traceback (most recent call … |
The End.