15,175 Topics

Member Avatar for
Member Avatar for vishy1618

I recently went and compiled my Tkinter application into a standalone app using py2exe. It seems to work when python is installed on the computer but when it is not installed, it shows the error - 'This application is not configured properly. Reinstalling the application may help', I read elsewhere …

Member Avatar for tinchopique
0
444
Member Avatar for Lardmeister

I am having a problem setting the initial value in the new Tkinter tix module. Can anyone help me out? [code]# explore the tix.ComboBox() # the Tix (Tk Interface Extension) module comes with the # Python27 and Python31+ installation try: import Tix as tix # Python27 except ImportError: import tkinter.tix …

Member Avatar for Lardmeister
0
987
Member Avatar for jarograv

I have a code designed to show the different spaces a knight can move to in a standard chess game. It needs to be a function created that outputs the possible spaces in tuples. I can't figure out how to make the output in tuples and I would appreciate it …

Member Avatar for TrustyTony
0
1K
Member Avatar for brixton d

hey i need a to write a program that when given an interger reduces it to prime factors. the interger is guarenteed to be less than 900

Member Avatar for TrustyTony
0
127
Member Avatar for kacieh80

Could someone point me in the right direction of hopefully a library or code examples, any resources on how to take XML and create a PDF using XSL-FO in Python? If I should have to use an XML renderer, then which XML renderer is recommended?

0
69
Member Avatar for debasishgang7

Hi,i want to access the filename of a any file using python.Ex. Suppose a folder contain some files Picture1.jpg,picture2.jpg,mypic.jpg..etx i want to make a program which will print all the file name Picture1.jpg picture2.jpg mypic.jpg of the certain folder.And the folder can have random file name but with .JPG extension. …

Member Avatar for TrustyTony
0
105
Member Avatar for StevoLord

Hi all, I have an image 300x300. What I need to split into 100 regions or boxes. The code im using is below: [CODE]box = (a1,a2,a3,a4) h8 = bill.crop(box)[/CODE] The values of box I had as 0,0,30,30 for the first one. Next box as 30,30,60,60, next one as 60,60,90,90. But …

Member Avatar for TrustyTony
0
175
Member Avatar for levic22

HI im having some trouble to create new GUI using python Tkinter module. [CODE] from Tkinter import * import Tkinter as tk import tkMessageBox import tkFont class GUIFramework(Frame): """This is the GUI""" def __init__(self,master=None): Frame.__init__(self,master) self.pack(padx=100,pady=100) self.master.title("Lab Management Hosts") self.costumFont = tkFont.Font( family = "Helvetica", size=30, weight="bold") label = tk.Label(master, …

Member Avatar for vegaseat
0
833
Member Avatar for Bevosnz

I want to create a system to filtering a URL in python hungryforwork.co.nz/company/job/ eg hungryforwork.co.nz/telecom/5/ I want to put out the telecom and lookup this company and then 5 for a reference to a listed job Putting a folder for each company would be a mission. An error 404 might …

Member Avatar for e-papa
0
143
Member Avatar for parijat24

[CODE]hi there is an interesting problem , as i have almost 500 file in directory ~/work/whole_proteome/analysis_xenopus_takifugu_tetradon/split_result/filtered_domain/big_cluster_fasta_format/, now i want to run a perl script which is present in ~/work/whole_proteome/analysis_xenopus_takifugu_tetradon/split_result/filtered_domain/ORTHOMCLV1.4/ the problem is using os.system(command as it does not take the command properly) [/CODE] [CODE]from sys import * import os import …

Member Avatar for richieking
0
178
Member Avatar for blacknred

Hi, I have this cvs file comprising of hex values. But my objective is to have them all converted to normal base 10 Dec format. myfile.csv [QUOTE]0x0000004d,0x00005275,0x37106800,0x000008a2,0x000009a2 0x0000004d,0x00005275,0x370d4e00,0x000008a2,0x000009a2 0x0000004d,0x00005275,0x37106800,0x000008a2,0x000009a2 0x0000004d,0x00005275,0x370d4e00,0x000008a2,0x000009a2[/QUOTE] I tried [CODE]for line in open('myfile.csv'): for word in line: word = int(word,16)[/CODE] word = int(word,16) ValueError: invalid literal for …

Member Avatar for e-papa
0
181
Member Avatar for blacknred

Hi, I'm trying to 'grep' the string which comprises of all non-zero values [B]0x0000000a[/B] in this case. [CODE]>>> match = re.search('0x0000000[1-9,a-z]', "My values are value=0x00000000 0x00000000 0x0000000a 0x00000000 0x00000000 0x00000000")[/CODE] This works but in this case, but not over any string as in if example is: [QUOTE]"My values are value=0x00000000 …

Member Avatar for blacknred
0
85
Member Avatar for South

Note: I am fairly new to this but can't figure this problem out. I want to find the age of people as a question and for them to enter it themselves. The problem is, is when I want to subtract c - b it says error, because both of them …

Member Avatar for South
0
130
Member Avatar for jkrueger

Hi Am trying to get my head around using with in some code which is putting 2 files together using random.choice. How do I prevent repeats with random.choice? [CODE]with open(name, "r") as f1: beginnings = [word.rstrip(" \n") for word in f1] with open("conjunct.txt", "r") as f2: endings = [word.rstrip(" \n") …

Member Avatar for jkrueger
0
241
Member Avatar for WigglesMcMuffin

Hey, I have trying to build a large hierarchical tree of all sorts of creatures in Python by using class inheritance. However I seem to have been halted before I can even get anywhere. I created my first base class: [CODE=python] class Creature(object): def __init__(self): self.hitPoints = 100 self.legs = …

Member Avatar for WigglesMcMuffin
0
185
Member Avatar for Swift2

Currently I have this code: [CODE]if any(w in itemname for w in ("Password","User","Server")): entry.setvalue(myutils.password_recover(itemvalue)) [/CODE] And I want "E-mail To" to also be a string next to "Server" .. However, if I add "To" then it picks up EVERYTHING that has the letters 'to' . If I add "E-mail To" …

Member Avatar for Swift2
0
81
Member Avatar for ram.patil

1. .......Algorithm to find the first n Hardy-Ramanujan numbers.... since 1729 is the least ..... I request to post the solution for this............

Member Avatar for TrustyTony
0
2K
Member Avatar for kacieh80

My boss says we are going to be creating "some cross platform windows type apps that will be used for utilities and some user things" and he is interested in using Python. I have used Python and love it, but only with a web framework and low level scripting. I …

Member Avatar for e-papa
0
403
Member Avatar for e-papa

Hi there guys, i'm just learning python and have been finding it interesting, but i've been finding it hard to understand classes and objects. Please is there a very explanatory tutorial or can you be of help, looking forward to your replies.

Member Avatar for e-papa
0
319
Member Avatar for stan_l

This is my first post and my first experience with Python. My environment is Windows XP/Win7. I have installed ActivePython 2.7, extensions and other packages and run many test scripts. I was especially interested that a .py file could include code to self-register as a COM object, and according to …

Member Avatar for stan_l
0
274
Member Avatar for dare599z

Hello all, I'm taking a intro computer science course, yet somehow I'm much better at c++ than python. My professor is essentially useless. Can anyone show me how to let these variables persist into global scope? I assumed declaring them globally would make them persist, yet it appears to not. …

Member Avatar for dare599z
0
184
Member Avatar for Emred_Skye

Hello, I have a python script that deletes a line of a text file when the number in the second column is greater than or equal to 5. So my input file is three columns: [CODE]1 3 aaa 2 3 aaa 3 6 aaaaaa 4 2 aaa[/CODE] [CODE]def filter(in_file, output): …

Member Avatar for Emred_Skye
0
187
Member Avatar for Zaffron

Alright, so I'm trying to make a text rpg for proof of concept purposes, and I've hit a wall. My problem, which may be deeper than I hope, lies within class instance referencing. I have a chest class where it fills the chest with a random amount of items. This …

Member Avatar for woooee
0
454
Member Avatar for e-papa

HI everyone, I'm a month old python programmer that really loves anything sound, and will like to know how i can use python to create Audio software. What are the tools needed, the platform, the pros, the cons. Thanks in advance.

Member Avatar for e-papa
0
163
Member Avatar for adam80

Hi Experts, I am working on the project that is going to be complate in some days. I want to limit trial usage of program for 1 month. I am succeded to do it. If trial period expired the program doesnt work and prints warning messages. I want to add …

Member Avatar for adam80
0
2K
Member Avatar for avinash_545

Dear All, I am working on an assignment. I am using graphics.py to draw polygons and so on. My problem is that I have to get the pixel color under getMouse() or just get that pixel color. Can you all please help me with it.

Member Avatar for TrustyTony
0
100
Member Avatar for vegaseat

The tkSnack sound module was developed at KTH in Stockholm, Sweden. A great module to generate sound, play and analyze sound files and speech. It was written using Tkinter and its native TCL language. Alas, the latest release is from 2005. However, the important file tkSnack.py can be converted to …

Member Avatar for vegaseat
2
4K
Member Avatar for Rockpile

Hello, is this a bug? I get different results when I run this from command prompt and IDLE. [CODE] name = input('Hello what is your name: ') print('Hello ' + name + '.') [/CODE] From IDLE, it works correctly. The result shows as Hello Bob. If I run the program …

Member Avatar for vegaseat
2
443
Member Avatar for Daima

hello everyone (: I am learing python about now for 1 months and i am busy to make a autologing script with a post function. But i am stuck ): the login part is working but i cant get the post function to work.. Can someone look to my script? …

0
37
Member Avatar for rssk

Hi all... I am trying to upload 4 files on a local disk, onto a remote ftp server. All of them are in the same folder(in local machine). I am using the storbinary function of ftplib. Following are the file sizes: 1-- 70 KB 2-- 60 KB 3-- 73 KB …

Member Avatar for rssk
0
870

The End.