15,190 Topics
![]() | |
I'm currently making a program that saves the longest and shortest words in a sentence inside a list but i cant seem to append multiple words in a list as well as enter multiple sentence and only stop after a specific text or number is inputed. Python gui still confuses … | |
Hi everybody. I'm using python to create sql database. I created a test.db file and then made a table on it with the name "fims" and inserted some data on it.... title text, year text and director text. And then set values for them. Now when i type "sqlite3 test.db" … | |
Hello. I have used ScrolledText in my code, the scroll bar that appears is attached to the frame and although it scrolls the text box contents, I want that it was attached to the text widget itself. What can i do? | |
Hello, I have an one dimension numpy array with 1 to 5 numbers. I need to map these values to corresponding numbers between 0.76 to 1.24 with 0.12 interval. Then the problem is the find exact values in one array and fill the exact index in the second array. for … | |
Hello friends :) I'm almost familiar with Tkinter and Kivy frameworks, but i'm looking for other python GUI frameworks, soething better than Tkinter. Kivy is also great but i need to watch more tutorial videos and i'm not able to do that right now. Can you introduce a better and … | |
Hello, As Homework, we had to do the most boring thing known to Mankind, Mathletics. It is so easy. Mathletics links to live Mathletics where you have to answer as many Math questions as possible in 60 seconds. Later on, I found that Mathletics could be used as a challenge. … | |
**My goal:** search webapps folder to find all .war files and make sure a folder exists with the same name(indicating .war expansion) **My Code:** import os import stat file = open("hosts.txt","r") for servername in file: path = '\\\'+servername.strip()+'\\d$\\tomcat\\Servers\' server_name = servername.strip() for r,d,f in os.walk(path, topdown=False): for files in f: … | |
Hello everybody. I need a quick help. I have a problem with running my python file code. I use Linux. I had a file with the name "app3.py" file on the Desktop; then i removed ".py" from the end of the name of the file; so now i have "app3" … | |
I wanted to make a pattern in form- a b b c c c d d d d so far i've reached a a b a b c a b c d with this code for a in range (0,4): count=0 for y in range(0,a+1): print chr(ord('a')+ count), count+=1 print … | |
Hello. How can i set an image as a Tkinter window background? I mean the whole background of the window not a photo area. | |
Two third party Python modules imageio and visvis make it easy to load and view images. The modules come with the pyzo scientific package or can be downloaded separately. Module imageio can read many image file formats as shown in http://imageio.readthedocs.org/en/latest/formats.html You could also replace your image file name directly … | |
Python helps in real life situation to automate things. This program helps you to prep up your kids ability to go over/under ten, which is essential not only by itself, but also when calculating with bigger numbers. Program is not any special, but shows how useful Python can be in … | |
Hi, I don't know that this discussion is relevant or no in this community, if not I am really very sorry. I work in a software company from past 1 year. From last few days I start learning python. I know little bit of unix & shell scripting. My quesions … | |
Hi everybody. How can i install ttk module on linux? When i try to import and use it on my Tkinter window, the error says sth like there is no module named ttk. So it means i should install it right?! I'm using python 2. I want to use ttk … | |
Hello. Imagin we have a python file with many alphabet letters like this: (Which is infact meaningful like i am a programmer) i a m a p r o g r a m m e r How can i print them randomly that nobody could read it? sth like this … | |
With just about everybody snooping around your emails today with the excuse of hunting the bad guys, coding to keep some resemblance of privacy is getting important. I will start out with some simple encryption examples to get this started. You are invited to give us your thoughts and codes. … | |
Hi friends! I'm coding a program; i have a Tkinter window with a view button and i can add names with entry box and add button into a list that will be saved on a db file. Now i want the program to show the list names otomaticly when the … | |
Hello! My this time question is about breaking a list. I have a list with the name favorite_movies. Here is 2 functions of all functions from the file: def add(): load_favorite() favorite_movies.append(ent.get()) dump_favorite() #print (colors) def view(): load_favorite() from Tkinter import * v = Tk() v.geometry('300x300') v.configure(background = 'white') top … | |
Hi everybody. How can i creat e text file to use as a database in python? I want to save my project's data changes into hard disk. What should i do? | |
hi , I am trying to write " hi " in persian using unicodes like this : print('\uFEB3\uFEFC\uFEE1') but it prints from the left side and in reverse order like " ih " ( in persian or farsi language we write from right to left ) how can I fix … | |
Hello friends :) This is my code: #!/usr/bin/env python3 # -*-coding: utf8-*- def callback(): lbl.configure(text = 'button clicked!') import Tkinter window = Tkinter.Tk() window.geometry('300x300') window.configure(background = 'PeachPuff3') lbl = Tkinter.Label(window, text = 'Nothing yet!') btn = Tkinter.Button(window, text = 'add', command = callback).pack() window.mainloop() Why it doesn't work? | |
The script keep closing after the info gets copied to the clipboard. How can I prevent this to happen? import sys import Tkinter from string import * def Load_WordList(): wordList = open("wordlist.txt", "r") wStr = wordList.read() wList = split(wStr,"\n") return wList def compare(x,y): x1=0 x2=0 y1= [] y2= [] j … | |
## solution 1: fast enough response, simple function, fail fast from time import clock def isanaword(k,s): """ goes through the letters of second word (s) and returns it if first word (k) contains exactly same letters in same number """ for c in s: pos = k.find(c) if pos==-1: return … | |
Hello, I'm working on a small project to acquire information from regulations.gov using their API. It's fairly simple (codewise) what I'm trying to do. However, I get stuck with a "HTTP error 403: Forbidden". It means I'm connecting, but something seems to be the matter. I've been in contact with … | |
Hi everybody! How can i call a function from Tkinter without using Buttons? I have a test.py file and there is a function def message in it: def message(): print('Good morning') from Tkinter import * tk = Tk() tk.mainloop() I want to type test.py message from linux terminal and the … | |
Hello everybody! Me again with an other question :) I have a file with a list and 3 functions in it; view, sort, append. I used pickle to save data changes in to an other file (films.db). Imagine you want to use this programe for the first time on your … | |
Knowing the longitude and latitude coordinates of two cities you can calculate the distance between them. Use the code in https://www.daniweb.com/software-development/python/code/490561/postal-code-zips-and-location-python to find the coordinates. | |
Using http://download.geonames.org/export/zip/ you can get postal information for most countries in the world. The raw data string can be transformed into a Python list of lists that can be searched for zip codes, locations, longitude and latitude coordinates. | |
Hello friends. I want to create a list of sublists E.G. i = 0 pack = [] list = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20] while i < 17: sublist = list[list[i]: list [i + 3]] pack = pack + sublist i += 1 print (pack) the output is: Type "copyright", "credits" or "license()" for … | |
A look at [Dataset](http://dataset.readthedocs.org/en/latest/) and easy and Pythonic way to create a database. Other candidates in this categorie,i will mention [pyDAL](https://github.com/web2py/pydal) and [Peewee](https://peewee.readthedocs.org/en/latest/). I did some test of Dataset in this [post](https://www.daniweb.com/software-development/python/threads/490219/how-can-i-creat-e-text-file-to-use-as-a-database-in-python) to look at. So here a common task some web-scraping of food recipes(just a task i did help … |
The End.