15,192 Topics
![]() | |
Hi, I am just starting to learn Python GUI programming with Tkinter. The majority of examples on net and books show the widgets and windows in typical MS Windows style (i.e the blue top border, holding the maximizing, minimizing and cancelling buttons), as shown in the first picture. Is there … | |
so im trying to make it so that pressing enter without inputting any value, will break the loop, however, an empty string can be used because of [ICODE]for i in range(len(x_str_array)): x[i] = int(x_str_array[i]) bit.[/ICODE] [CODE] 'Exercise 7.3' # modified program from exercise 7.2 a=1 z="" while x !=z: x_str … | |
Hi everyone, I'm trying to write a Python script, where it counts the specific results from a database. Running the following line in MySQL Client works: SELECT name, COUNT(*) FROM results WHERE name="bla bla"; And it returns all of the results fine. But I'm trying to put it into a … | |
Hey guys. Im having some problems with python. I need to create a function that takes in two arguments where the first is a sequence(string) of letters. The other is also a string but of integers, that tells me start and stop that I want to cut out from the … | |
Hello, i would like to ask you help with my code, i can't understand why exactly it doesn't work like i am expecting :). I am working through "How to Think Like a Computer Scientist" by Jeffrey Elkner, Allen B. Downey, and Chris Meyers so i am still doing my … | |
I am doing some hobby coding regarding neural networks, and I was wondering if this is a correct and good use of abstract base classes or not. [code=PYTHON]import abc import collections import math import weakref class AbstractNeuron(metaclass=abc.ABCMeta): def __init__(self, weights, f=math.tanh, bias=1, biasWeight=0): self.weights = weights self.f = f self.bias … | |
i have a problem with this code: [CODE]s = "johnny" j = 'j' y = 'y' re.search(rj'\w+'+y, s).group[/CODE] i want to put the j variable instead of the string, with the y variable its ok but with the j i got an error!!! | |
Hello Everyone, I am making a GUI using Tkinter... I have completed that the GUI now i want to put the validation on those Entry Widget,,,,,... i know, i have to use the re module...... but i really cannot understand that....can someone please give me the simple example...like if i … | |
im working on a tron game with pygame and i cant figure out how to make my tail that the player's car makes disappear after somany pixels. i want the tail to start shortening itself after like 500 pixels. if you can, can you post the full code edited (im … | |
<< This is my python code >> << (Step 1) - I am registering the class of this python file for this PythonUtil class by executing this code in the pythonwin.exe interpreter >> class PythonUtil: _public_methods_ = ['funct’] _reg_progid_ = "PythonUtil.Utilities" _reg_clsid_ = "{73B6791B-C161-4F26-9402-D4AE4BC602AB}" def funct(self, val, item=None): print “hi” … | |
im trying to write a tron game with python but when ever the tail starts to erase, it erases too much. try running it and you will see what i mean. when you run it drive over your tail and watch it delete too much. [CODE] import sys, random, time, … | |
Hi, i have this code: s = "hi john' re.serach(r'j\w+h', s).group() and up to here there is no problem but i want to put the letter h in a str variable l = "h" re.search(r'j\w+'l, s).group() but when i do this i receive an error?? | |
I'm using windows 7, hoping to use Tkinter to open an internet window when a button is clicked that goes to a specific page in google chrome. Is this possible? [CODE]class App: def __init__(self, master): frame = Frame(master) frame.pack() self.button = Button(frame, text="Rejuvenation", command=self.info) self.button.pack() def info(self): pass #Will go … | |
How would I find the amount of characters in a string and then use that to print a certain amount of some character that you choose. For example: [CODE=Python] a = 'string' # this holds 6 characters print '*' * # amount of characters in string [/CODE] | |
Hi everyone! I would like to know if python is any good for creating apps for cellphones .. like Iphone,Blackberry.. or even for Ipods? Ive been researching on this matter but I never got a good answer.. haha Thanks in advance! :) | |
According to this post [url]http://www.python-forum.org/pythonforum/viewtopic.php?f=3&t=31349#p146797[/url] it claimed to be possible to create a list were you can store and recall data using a coordinate system ... [code]SomeList[1][5][2] = 234 [/code] I have been playing around with the code a while, and have ran into a problem. No matter what I … | |
Got inspired to make computer to make moves in English Solitaire, I learned in childhood days to solve by myself consistently, no solving or game play interface at the moment (easy to add though). I added printing of the ready solution from the wikipedia, also maybe of your interest are … | |
Hello, all. I am in the process of writing a peg solitaire solver in Python. It will allow the user to select the shape of the board in the future but for now I'm testing it with a standard 5 row triangle game, like the ones you find in Cracker … | |
Hello eveyone, I want to make an search button with wx.SearchCtrl on wxPython-Sqlite3, and after we select to data on wx.SearchCtrl, the data will automatically open. What should I make first? Can anyone give me an example? Thx for helping. | |
Ok, so. I've programmed, just for fun, a conversion calculator for decimal and binary numbers. Here is the code: [CODE]# -*- coding: cp1252 -*- import sys, os, time #This is where you convert a binary number into a decimal number. def binaryToDecimal(): os.system('cls') while True: print "To go back to … | |
Hello everybody This is all my test code : [CODE]#!/usr/bin/env python #-*- coding:Utf-8 -*- from Tkinter import * import Tkinter as tk import tkFileDialog import os import ttk import tkMessageBox import psycopg2 from PIL import Image, ImageTk import Image import ImageTk import os.path chaine1 = "Bureau" chaine2 = "Téléchargement" listtest … | |
Hi all i am college student and making a project related to file compression in python. I want to creat a listCntl with image and text that will look like image that i attached wih this post. plese help me how will i implement this in wx python. | |
Hello, everyone, I'm new to wxPython I want to write a small program that link the menu in one frame with another frame that I created after. I've tried to use like EVT_BUTTON, but it won't work. How am I supposed to do this? Thx for any help | |
While correcting errors in someone else's code, I decided to completely rewrite the original script, and improve upon it. This is the basic code for making 3D arrays using dictionaries. [code] ar = { (x,y,z):0 # creating the array for x in range(3) for y in range (3) for z … | |
I am working on the Tkinter.......i need progress bar in determinate mode........ can some one please give simple example of it, i m getting confuse in start, stop and step method of the progress bar Thanks a lot....; | |
I need a library for a certain script and I don't know which one to choose, I have the following page on a browser: (Its in a table formation) Date | Value | EDIT Date | Value | EDIT Date | Value | EDIT Date | Value | EDIT Date … | |
Can someone give me a pointer on how to solve this scenario: 1) I have an image of a chessboard (8x8) with black and white squares. I need to analyze the image and create a 8x8 matrix corresponding to the chessboard. 2) Store 0 if the corresponding chessboard cell is … | |
I have a file with bunch of lines and I want add html tag for in every line in file Example: [ICODE] 1. [url]www.google.com[/url] 2. [url]www.facebook.com[/url] .... 107. [url]www.daniweb.com[/url] [/ICODE] and the result I want in the end: [ICODE] <p>1: <a href="www.google.com" target="blank">www.google.com</a></p> [/ICODE] ..so I have 180 lines in … | |
can someone help me make my code more simple. i uploaded the source to my website in a zip file with all the images because i used pygame and if you want to test it you will need the images. you can download everything here [url]http://2nh.co/Tk[/url] or here is the … | |
What is wrong with this code? [CODE]import time import sys print """Welcome to the age finder. This program takes some input (they will be the years) and then adds it to 4 ages. For example, if you give the ages 10, 11, 12 and 13 it will return the age … |
The End.