15,190 Topics
![]() | |
I have read that OO supplies it's own python and uno.py [for 3.3 under ..\basis\program] - but there are ways to incorporate it into your current version such that a script can issue [COLOR="Green"]import uno[/COLOR] w/out issue. I have tried scripts that supposedly permit this and tried to work through … | |
Guys I've been reading on PEP 8 and I see that one should use it especially to make sure that programs are standard. Please can anybody help as to how i can install it with my python 3.2 and how to use. Thanks in advance. | |
I was doing some work in python and I typed in ^ instead off ** without thinking and found some confusion as to what ^ does I did a bit of testing to find: 10^2 = 8 0^2 = 2 -5^2 = -7 11^2 = 9 9^2 = 11 -10^2 … | |
I'm attempting to create a one line Caesar cipher decryption program in python and i'm afraid i've come to the end of my knowledge and well past it. this is the closest working code i've got: [code]def test3(): print("The decrypted text is: "+"".join(map(lambda x: chr(ord(x)+y),x)))[/code] as you can see it … | |
Hello. I don't know if somebody has asked this before, but is there any python equivalent to the Java .jar files? I have read about py2exe, freeze, and module distribution, but it's not what I'm looking for. I need a file that can contain everything in my program (and modules … | |
I am new to JES and I wanted to know how to draw a ball going around in a circle. I already know how use the make movie function. I am just confused on how to make a ball go around in a complete circle. Can anyone please help? | |
I was wondering if it's possible for me to create a Digital Sound Processing (DSP) program using Python. Basically, I don't know anything about how I would do this and I would like somebody to point me in the right direction. I don't want somebody to write code, but I … | |
hey what program when given 3 numbers outputs true if the numbers form a pythagorean triplet | |
Hi. I'm new to python, and also have a poor english so...excuse me!:icon_question: Ok, I want to generate a dictionary like this one: [CODE]di={'word1':['tra1','A brief definition.'],'word2':['tra2','Another definition.']} [/CODE] from a txt file containing the word, its translation (tra#) and a definition of the word: [ICODE]word1 trad1 'A brief definition.' word2 … | |
hi, my problem is that i have written script which read a file , take line by line split it and then store it into dictionary. and i am writing the values of dictionary on other file, the problem is that at the end of file , it doesnt print … | |
I've got a small bit of code I need to convert to C#. However my experience with C# is very very limited and a simple python program like the one I'm trying to convert is beyond my experience in C#. If anyone knows of any converters or is willing to … | |
hey i would like a program to help me schedule my lectures and activities for dds. I would like to enter a date and an activity description and get as my output a text string e.g Input 03/13 work on dds assignment Output march the 13th: work on dds assignment | |
Here version of TicTacToe demo [URL="http://www.daniweb.com/software-development/python/threads/357974/1526474#post1526474"]code by wooeee[/URL] with packing style, which is more familiar for me. Also fixed indents and made it run also with Python 3. | |
Hi All, I am trying to start writing a wiki-ish CMS I've been contemplating for a while now. the content will include pics, html content, and should be stored in a database (the current pick is postgres) A few questions for the more experienced folk 'round here: 1. how do … | |
The program I was attempting to make was going to be 1.open notepad 2.fill 1 - 2 pages with text 3.save the file (named "1") 4.loop with a different saved name each time (IE named 1, then named 2, then 3, etc etc) I can open notepad, and loop that, … | |
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 … | |
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 … | |
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 … | |
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 | |
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? | |
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. … | |
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 … | |
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, … | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
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") … | |
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 = … |
The End.