15,190 Topics

Member Avatar for
Member Avatar for tony75

Hi I would like my python script take screenshot of my desktop every 15 mints and saving in my home dir in pic folder.but I get error? import os import sys import time import ImageGrab environ=os.environ img = ImageGrab.grab() FILES_DIR = 'pic' SAVE_PATH = os.path.join(environ['HOMEDRIVE'], environ['HOMEPATH']) LOGFILE_NAME = 'test.png' LOGFILE_PATH …

Member Avatar for tony75
0
4K
Member Avatar for MrNoobieCoder

I am an amateur python coder and i was wondering if it is possible to put a timer into my times table game and if possible where i could put it. Here's my code for my game help would be appreciated , thanks :) import random import time print ("Hello …

Member Avatar for woooee
0
302
Member Avatar for a8med

I nead too run a python program from another code. I have the main code wher you can chose what too do and if you chose 1 you will run a surten python program and then return and if you chose 2 you will run some other program and then …

Member Avatar for a8med
0
123
Member Avatar for Ismatus3

Hello , As mentioned in the tittle , i haver created a python small programm , that use MySQLdb , and just want to know the steps to be able to use it in an Android environnement ?

0
79
Member Avatar for ajit.nayak

Dear all, i have data coming in file named time.csv and i wanted to convert the file in format conv_file format . How could i do it python

Member Avatar for slate
0
267
Member Avatar for DougArndt

Greetings, first, I'm totally new to python. What I'm attempting to do is rebuild a clipped off sound wave. As I've been poking around I've come across things like "cubic spline interpolation" (that sounds like what I need -- but really is way over my head) I've come across other …

Member Avatar for Gribouillis
0
767
Member Avatar for ajit.nayak

Dear all I have downloaded matplot lib for python2.7.2 windows using[(http://matplotlib.org/downloads.html)][Click Here](http://www.) . As per example i tried coding i found pyplot is not highlighted.i have attached test.cv file for which graph has to be plotted import csv import matplotlib.pyplot as plt plt.figure() def main(): pass if __name__ == '__main__': …

Member Avatar for Gribouillis
0
695
Member Avatar for dean.ong.14

# calc.py - a Python calculator from tkinter import * # the main class class Calc(): def __init__(self): self.total = 0 self.current = "" self.new_num = True self.op_pending = False self.op = "" self.eq = False def num_press(self, num): self.eq = False temp = text_box.get() temp2 = str(num) if self.new_num: …

Member Avatar for Gribouillis
0
14K
Member Avatar for racigan

**this is my main file:** ExcelAppl = win32com.client.Dispatch('Excel.Application') Workbook = ExcelAppl.Workbooks.Open('excel file path') Sheet = Workbook.Worksheets.Item(1) Sheet1 = Workbook.Worksheets.Item(2) **this is the Python gui:** from Tkinter import * from tkMessageBox import * from tkColorChooser import askcolor import tkFileDialog import MainLibrary root = Tk() root.title("Chrysler Test Framework") root.geometry("800x500") def callback(): file_path …

0
192
Member Avatar for aVar++

Hello, This if statement is always returning true and I cannot see why. Could you guys tell me why? menu = input("Choose what you would like to do:\n\n1. Work out how far you will travel with a set time and speed\n2. Work out the speed you will need to travel …

Member Avatar for Gribouillis
0
247
Member Avatar for dany12

Hy I would like to know what python gui framework, I can use that will be compatible cross platform and will help me create my snippet saver, that will be relational database, with categories for each language. I thought I can use kivy to create my graphical interface than use …

Member Avatar for dany12
0
347
Member Avatar for tunisia

Trying use radio buttons to select which host I'm referring to since ultimately there will only be two and they are fixed addresses. This is the error: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1410, in call return self.func(*args) File "Untitled 2.py", line 63, in command=lambda: callback_power_off(off, host)) File "Untitled 2.py", line 28, in …

Member Avatar for woooee
0
381
Member Avatar for amini.chenini

I'm trying to figure out a way to define my function for loaning a book within a class. This is what I have so far: class Library: # the class constructor def __init__(self, books, patrons): self.books=books self.patrons=patrons def __str__(self): s="Patron(" for patron in self.patrons: s+=str(patron) + ', ' if len(self.patron) …

Member Avatar for woooee
0
236
Member Avatar for krystosan

I have made a QTableView that displays images from disk, there are two seriously agonizing problem I am facing. First of after the windows shows up making it maximize or changing size of window is very slow, and secondly I want to display images height width dependong on what can …

0
179
Member Avatar for Jade87

Hello, I've created a script that parses and downloads images from a website however now what I want to do is create a script that matches the files I've downloaded against common image file type signatures and then tells me how many of the files aren't those types. I'm still …

Member Avatar for Jade87
0
373
Member Avatar for rbyrd

I installed wxPython2.8-osx-unicode-py2.7 from the wxpython website using their .dmg installer file. When I used the included uninstaller to remove wxPython it would not accept my password. I think this may be because my password contains some non-alphanumeric characters. Can anyone help? I'm running OSX 10.6.8.

Member Avatar for Gribouillis
0
77
Member Avatar for CodingCabbage

How would I be able to have a button that's command is to return it's text in the button to a variable

Member Avatar for vegaseat
0
990
Member Avatar for fsrgio

hello, I'm trying to resolve an issue that is requested to create a game with the same kind of Flow Free. Where I have to create a NxN matrix, which must be greater than or equal to 2 and less than or equal to 7. The size is selected by …

Member Avatar for fsrgio
0
152
Member Avatar for krystosan

How do I display images in QListView of size of standard thumbnail size like 250 x 200 , and file nametext should wrap to next line , right now the images displayed are very small and are not positioned under each other in proper row column order. import sys import …

Member Avatar for krystosan
0
2K
Member Avatar for krystosan

I am trying yo create symbolic link on my mac, but when i try to run i get error saying original item searchMethod cannot be found `$ ln -s '/usr/bin/env python ~/Development/python/searchMethod/python/searchMethod.py' searchMethod`

Member Avatar for rojomoke
0
472
Member Avatar for Craig_2

Hey all, I have the following code that is working fine; basically it finds all files on my desktop and then prints the specific ones that I am looking of. I save all files to my desktop and the files contain the clients name so I figure once a week …

Member Avatar for Craig_2
0
406
Member Avatar for ZielonySBS

I have a company scanner but very often people forget to remove scanned (confidencial documents) I want to create a script which will once day check a "/home/scanner" folder and if there are any files it moves them to my /home/Administrator folder. I dont really dont know how to start. …

Member Avatar for Gribouillis
0
19K
Member Avatar for dean.ong.14

how can i produce my buttons using while loop and a list if stirng # python 2.x #from Tkinter import * #from tkFont import Font # python 3.x from tkinter import * from tkinter.font import Font def button(frame, text, command=None): ft = Font(family=('Verdana'), size=14) return Button(frame, text=text, font=ft, width=3, command=command) …

Member Avatar for vegaseat
0
242
Member Avatar for sandeeep11

hello sir, i have a xml file like <book> <title>abc</title> ........ <details> <name>abc</name> ..... <author>shakespere</author> <year>1980</year> </details> <details> <name>xyz</name> ..... <author>anand</author> <year>1995</year> </details> </book> i need to print the values of author,year if details.name == title here is my code DomTree = xml.dom.minidom.parse(file) book = DomTree.documentElement for t in domain.getElementsByTagName("title"): …

Member Avatar for vegaseat
0
268
Member Avatar for CodingCabbage

Why is this not working, no errors? photo exists in correct position... gui doesnt alwyas show up, image doesnt. Using python 3 from tkinter import * from random import * import time mainGUI = Tk() width2= 319 height2 = 240 widthOfScreen = mainGUI.winfo_screenwidth() #Get the width of the screen heightOfScreen …

Member Avatar for vegaseat
0
371
Member Avatar for evaldas.blauzdziunas

hello there im doing this homework assignment and we are making 'facebook' like system now... to sum up, when i press a certain link next to that link has to be printed - liked or sth... the problem is i dont know how to detect when i press the link …

0
106
Member Avatar for CodingCabbage

I wish to create a loop which adds images across a screen with random positions: photo1 = PhotoImage(file=address) #Assign image to PhotoImage XValue = randint(0,widthOfScreen-width2) #width2 = image width YValue = randint(0,heightOfScreen-height2) #width2 = image height Label(mainGUI, background = "white", image = photo1, borderwidth = 0).place(x=XValue, y = YValue) the …

Member Avatar for CodingCabbage
1
14K
Member Avatar for Cassidy_2

def main(): p =input("Enter your sentence: ") words = p.split() wordCount = len(words) print ("The word count is:", wordCount) main() I get the read out: Enter your sentence: Hello world Traceback (most recent call last): File "C:/Python27/idk.py", line 11, in <module> main() File "C:/Python27/idk.py", line 3, in main p =input("Enter …

Member Avatar for vegaseat
0
272
Member Avatar for dean.ong.14

how do i backspace from last number and also clear th? last equation and add a quit button????????? from tkinter import * from tkinter.font import Font def button(frame, text, command=None): ft = Font(family=('Verdana'), size=14) return Button(frame, text=text, font=ft, width=3, command=command) def frame(frame, side=LEFT, bg="black"): f = Frame(frame, background=bg, padx=5, pady=5) …

Member Avatar for TrustyTony
0
495
Member Avatar for Panarchy

Please help me, I want to make a quiz in python (And a game, if I get the time), can someone help me? I saw the topic projects for beginners, but it was a .dat file (which I opened using notepad 2), I don't know how to use a dat …

Member Avatar for EarthHorse
0
5K

The End.