15,181 Topics

Member Avatar for
Member Avatar for nyfan68

I am working on a simple project and I need a little help. I have created a program that draws circles on a canvas. The circles are blue, and the method flash() takes a random int count, and will light up a circle and change its color to yellow. The …

Member Avatar for Schol-R-LEA
0
298
Member Avatar for zahra97

see first elif statement for syntax error, where have i gone wrong?? this is only a section of code, help very much appreciated. if dice == dice2 : print ("The scores on both dice remain constant, no changes are made.") elif dice > dice2 : print ("The scores of the …

Member Avatar for Daemon_CC
0
350
Member Avatar for zahra97

here is *part* of my code: newvalue1 = difference + c newvalue2 = difference + d newvalue3 = difference2 + cc newvalue4 = difference2 + dd if dice == dice2 print ("The scores on both dice remain constant, no changes are made.") elif dice > dice2 print("The scores of the …

Member Avatar for Schol-R-LEA
0
229
Member Avatar for saimadanmohan

def get_inverse_dict(): """ returns a dictionary which maps a -> z, b->y ... z->a Hint: 1. see the constants in the string module, and the zip builtin function. 2. google lookup extended slicing notation to create a z..a string from a..z string In shell: help(zip) and experiment using zip in …

Member Avatar for saimadanmohan
0
345
Member Avatar for varshaholla

I want to do exactly how these search engines do, ![52ec8527edb271dac9465a607d37b068](/attachments/large/4/52ec8527edb271dac9465a607d37b068.png "52ec8527edb271dac9465a607d37b068") But I want to show the same thing using pop-up message, where there shouldn't be any buttons, and it should display the message continiously Thanks in advance!

Member Avatar for varshaholla
0
554
Member Avatar for dedon4

hi,please i need help in the thorough explanation of this program, madlip.py """String Substitution for a Mad Lib Adapted from code by Kirby Urner""" storyFormat = """ Once upon a time, deep in an ancient jungle, there lived a {animal}. This {animal} liked to eat {food}, but the jungle had …

Member Avatar for slate
0
325
Member Avatar for Hüsnü

How can I reach to source code of a web page with python ? I use these code block but it doesn't work perfectly. If I open the html file(site.html) on a web browser, some characters disapper. import urllib.request req = urllib.request.Request('https://www.google.com') response = urllib.request.urlopen(req) the_page = response.read() a = …

Member Avatar for slate
0
386
Member Avatar for tony75

Hi I would like to learn how to code System Programming for windows via python(Python System Programming) Any tip or suggestion?where can I begin! Any recommend books,links and video tutorial? I appreciate your help

Member Avatar for slate
0
840
Member Avatar for abaddon2031

So i am trying to take some code that i had working before and turn it into a function but every time i run my code it kicks it to line 9 in my code which is a continue statement and says the its not properly in the loop. I …

Member Avatar for abaddon2031
0
240
Member Avatar for j.heller

Dear Daniweb community; I am working on a Touchscreen application. For this work I need to Change the window if a user clicks on it. My code: def init(win): def getclick(event): parent.destroy() openSubWindow(dialog); frame = Frame(win, width=650, height=550) frame.bind("", getclick) frame.pack() win.title("Ausgangsposition") win.minsize(650, 550) I used the following idea: http://effbot.org/tkinterbook/tkinter-events-and-bindings.htm …

Member Avatar for ZZucker
0
215
Member Avatar for abaddon2031

I am working on a python code that is supose to search a directory and see if a file in the directory has a _add_ or a _update_ and to change a few fields in my code that call the add and updata and change the directory name to match …

Member Avatar for abaddon2031
0
222
Member Avatar for krystosan

I havent done this before, but I want to make a window that plots a graph looking at file structure on different server locations, and in that UI I want to add control like if i want to copy the remote the file to local if missing or if outdated, …

Member Avatar for woooee
0
461
Member Avatar for Fighter01

I am asking a question about file handling within python. I am capable of creating a text file which can then be read via python. However, i am trying to create a python Recipe storer and therefore i would need to be able to store recipes (entered through python) with …

Member Avatar for Fighter01
0
525
Member Avatar for mooseless05

Hi, I have been working on some code in Tkinter - this is my first ever coding in python and have basically copied chunks of code over to see what is possible but I am stuck on one section - I am trying to create a GUI in Tkinter but …

Member Avatar for woooee
0
260
Member Avatar for zahra97

import random #allows a random value to be produced a = input("Enter name for character 1") #variable verified, reports information to user b = input("Enter name for character 2") #variable verified, reports information to user c = int(input("Enter value for first strength for character 1")) #variable verified, reports information to …

0
105
Member Avatar for nomiahmadkhan

Hey, there guys. I am working a Twitter library which can perform several tasks. If you can fork the repo and contribute I would love it :) https://github.com/itsnauman/Twoooly-For-Twitter

0
142
Member Avatar for zahra97

import random #allows a random value to be produced a = input("Enter name for character 1") #variable verified, reports information to user b = input("Enter name for character 2") #variable verified, reports information to user c = int(input("Enter value for first strength for character 1")) #variable verified, reports information to …

Member Avatar for Schol-R-LEA
0
156
Member Avatar for Diego_4

# I want to eliminate a list from a bigger list, only by typing something # tasks = [] task = [task1,year,month,day, hour, minute, second, microsecond,str(cuando),cuando]# this is a list that is filed into another list named tasks# # If I type a position, I want to eliminate a complete …

Member Avatar for TrustyTony
0
172
Member Avatar for crebs

I am trying to use web2py to build an app. I have a simple print function that a user submits a key word . The string or int key word is directed to an sqlite db to retrieve a row and output the data. I need to know 1. how …

0
191
Member Avatar for j.heller

Heyho users; I need to update a label in a window every x seconds to get an variabel ("res") which is up to date. My current code: def init(win): win.title("Ausgangsposition") win.minsize(800, 600) lab=Label(win, text="Aktuell: " + res +" Euro", bg='#40E0D0', fg='#FF0000') lab.place(x=20, y=30) btn.pack() def updater(win): ids = lab.after(1000, updater) …

Member Avatar for woooee
0
8K
Member Avatar for zenith_96

heya again guys - sorry for asking for help once again, but i think once i have my head round this, i'll sort myself out pretty well *python noob* :?: the prac is to add an option to change the price of a listed item in a catalog - this …

Member Avatar for Nivir
0
355
Member Avatar for Afroula

Hi everyone, I'm trying to extract text from between tags but only in certain conditions. <title> and <pos> are both children of <page>, but neither one is nested inside the other (i.e., they're siblings). Each <page> always has one <title> and zero to 5 <pos> sections. What I need to …

Member Avatar for Afroula
0
2K
Member Avatar for abaddon2031

Ok so I have been searching for several days on how to write a simple python script that will HTTP post to my server. I am jsut looking for some tips on how to write this properly cause as of right now im having to upload my add and update …

Member Avatar for abaddon2031
0
396
Member Avatar for ssbb

I have a homework to make a calculator(infix-to postfix) and I need to do it asap. I get always an error when I run this code(Enter a postfix expression (or nothing to quit): +54 Traceback (most recent call last): File "C:\Python32\infix to postfix", line 69, in <module> main() File "C:\Python32\infix …

Member Avatar for iamthwee
0
2K
Member Avatar for Rabee_1

Hello , I have to write a code that read a file in python and convert each chaaravter to 1, or 0 and send these digets to a a selonoid to make a strike or not to make ( brille printing ) is that possible ???? please need your help …

Member Avatar for iamthwee
0
476
Member Avatar for Fighter01

Hi, i have just started programming with python and i have beken given a task where i must create a python calculator. So far i have created the code (seen below) however i need help explaining it-e.g. saying what each part of the code does: from tkinter import * root …

Member Avatar for Fighter01
0
959
Member Avatar for tony75

HI I need to copy .dll files in C:\Windows\system32\ which is found or match in my my_file.txt file to C:\tools folder. my code not work and need also to found words that can match my_file.txt. so for example I have RICHED20.dll in my my_file.txt if the same file name"RICHED20.dll" exist …

Member Avatar for snippsat
0
1K
Member Avatar for WHchaz1027

Hello Guys, Good Day. I have this kind of error `OperationalError: no such table: table_name` when I make a query like `modelname.objects.all()` in **manage.py shell**. But I already did the ff: 1. settings.py > Databases > django.db.backends.postgresql_psycopg2 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), }, 'db_foo': { …

Member Avatar for WHchaz1027
0
695
Member Avatar for j.heller

hello daniweb community; The first window my application shows is this one: def init(win): win.title("Ausgangsposition") win.minsize(800, 600) getcurrentrateandcurrentbalance() btn.pack() Usage of win: win = Tk() win = Toplevel() methode getcurrentrateandcurrentbalance() def getcurrentrateandcurrentbalance(): threading.Timer(5.0, getcurrentrateandcurrentbalance).start() print "Hello, World!" + result lab=Label(win, text="Aktueller Kurs: " + res +" Euro/BTC", bg='#40E0D0', fg='#FF0000') lab2=Label(win,text="Aktuell …

Member Avatar for woooee
0
5K
Member Avatar for abaddon2031

I have a python script that connects to my database and updates it with a file that i specify. But i keep getting a syntax error on line 5 and for the life of me i can not figure out what it is. If someone could pointit out and how …

Member Avatar for abaddon2031
0
453

The End.