14,951 Topics

Member Avatar for
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
521
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
104
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
171
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
343
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
394
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
463
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
957
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
693
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
450
Member Avatar for varshaholla

I'm working on images and its working fine when code is out of function, and gives error when code is inside the function. My code is: def matching_image(): i = 0 resultlist_key = [] result_list = list() a_list = list() b_list = list() a_list.append(feature_matrix_ip)# feature_matrix_ip contains features of the query …

Member Avatar for varshaholla
0
5K
Member Avatar for abaddon2031

Ok i have a daily csv file that i am trying to get python to post to my database every day. I have used curl befor to post it but i want to set python up so that it post it for me is there a way to do this …

Member Avatar for abaddon2031
0
302
Member Avatar for nib.nalin

roblem Minesweeper is a computer game that became popular in the 1980s, and is still included in some versions of the Microsoft Windows operating system. This problem has a similar idea, but it does not assume you have played Minesweeper. In this problem, you are playing a game on a …

Member Avatar for slate
0
278
Member Avatar for j.heller

hello daniweb community; After a click on a button I need to "direct" the user from the current window to another, like you may know it from installations ("Yes I accept TOS"->click->new window please select installation path). Kind regards;

Member Avatar for j.heller
0
398
Member Avatar for vegaseat

If you use the Windows OS, then IronPython allows you to create a GUI program taking advantage of the .NET framework. You also have the option to compile the program into a standalone .exe file (and the needed .dll file).

Member Avatar for vegaseat
3
554
Member Avatar for j.heller

hello friends; I'v used the tutorial (http://www.daniweb.com/software-development/python/code/216550/tkinter-to-put-a-gif-image-on-a-canvas-python) but now the animation of my .gif doesn't work. I have used much more .gifs (animated) to check if the one was broken but no animated .gif is working in my GUI. Any idea how to fix this problem? Kind regards;

Member Avatar for vegaseat
0
495
Member Avatar for trade19

hi I want to know the easyest way to readline() or readlines() or read() a file so far I have this >>> file = open( 'write_total.txt', 'r' ) >>> file.readlines() ['Line 1\n', 'Line 2\n', 'Line 3\n', 'Line 1\n', 'Line 2\n', 'Line 3\n'] >>> I am not sure why this repeats …

Member Avatar for trade19
0
275
Member Avatar for tony75

Hi Please I need your help with this script. I have an logfile.xml and I need to picks the file names of the path but not duplicate and writes them into a bat file, like copy %windiw&\system32\<filename> %1% Output example for my .bat file should look like copy %windiw&\system32\ dbghelp.dll …

Member Avatar for tony75
0
1K
Member Avatar for abaddon2031

I have a very large csv file that had different values for certian fields and im wanting to split it up so that each of the different values gets put into its own csv file for example all of the fields whos value is 1110 would get read and written …

Member Avatar for rrashkin
0
225
Member Avatar for abaddon2031

Ok so im working on a script that reads a large file then splits it up into seperate files using the field in it called PC Number. What im wanting to do is check if the file already exist if it does then it just appends the new data but …

Member Avatar for abaddon2031
0
424
Member Avatar for abaddon2031

SO im working on a python code that reads a csv file with 1600 entries roughly and i am splitting them up on the collum value of pc numbers. I keep getting a error that states " Traceback (most recent call last): File "C:\Users\HatterX\Desktop\test\test25", line 50, in <module> data.sort(key=lambda x: …

Member Avatar for abaddon2031
0
467
Member Avatar for Alex_24

so heres the code import pyHook, pythoncom, sys, logging file_log = 'C:\\LogFile\\log.txt' some other non important stuff here so the issue is that everytime i try to run the program it says that pyHook is not a module. I have downloaded it for my system but it still doesnt work, …

Member Avatar for tony75
0
605
Member Avatar for sureronald

An image resize script that I have written to scale images from a digital camera. I couldn't used the gimp (my favourite image editor) to scale each of them one by one. This script takes two arguments which are both directory names. The first one is the directory containing images …

Member Avatar for Budy_1
0
727

The End.