15,192 Topics

Member Avatar for
Member Avatar for Cupidvogel

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 …

Member Avatar for Cupidvogel
0
108
Member Avatar for pwolf

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 …

Member Avatar for pwolf
0
209
Member Avatar for Shockbox

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 …

Member Avatar for smantscheff
0
56
Member Avatar for Pythonbeginner!

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 …

Member Avatar for TrustyTony
0
167
Member Avatar for scsi

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 …

Member Avatar for TrustyTony
0
150
Member Avatar for lrh9

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 …

Member Avatar for TrustyTony
0
204
Member Avatar for amir1990

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!!!

Member Avatar for amir1990
0
96
Member Avatar for sun_2588

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 …

Member Avatar for TrustyTony
0
307
Member Avatar for natehome

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 …

Member Avatar for natehome
0
1K
Member Avatar for surakesh

<< 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” …

Member Avatar for thines01
0
330
Member Avatar for natehome

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, …

0
88
Member Avatar for amir1990

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??

Member Avatar for amir1990
0
79
Member Avatar for chris99

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 …

Member Avatar for inuasha
0
264
Member Avatar for inuasha

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]

Member Avatar for inuasha
0
244
Member Avatar for Cap.Alvez

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! :)

Member Avatar for M.S.
0
194
Member Avatar for RLS0812

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 …

Member Avatar for TrustyTony
0
206
Member Avatar for TrustyTony

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 …

0
345
Member Avatar for zekish

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 …

Member Avatar for zekish
0
1K
Member Avatar for der caiser

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.

0
38
Member Avatar for Kippstah

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 …

Member Avatar for Beat_Slayer
-2
237
Member Avatar for Ismatus3

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 …

Member Avatar for Ismatus3
0
2K
Member Avatar for Lalit Chattar

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.

0
105
Member Avatar for bildersturmer

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

Member Avatar for vegaseat
0
102
Member Avatar for RLS0812

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 …

Member Avatar for vegaseat
0
266
Member Avatar for sun_2588

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....;

Member Avatar for Ismatus3
0
4K
Member Avatar for iPanda

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 …

Member Avatar for woooee
0
139
Member Avatar for mishabi

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 …

Member Avatar for TrustyTony
0
115
Member Avatar for Natsu

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 …

Member Avatar for TrustyTony
0
169
Member Avatar for natehome

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 …

Member Avatar for natehome
0
292
Member Avatar for jackbauer24

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 …

Member Avatar for Gribouillis
0
332

The End.