15,181 Topics
| |
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 = … | |
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" … | |
1. .......Algorithm to find the first n Hardy-Ramanujan numbers.... since 1729 is the least ..... I request to post the solution for this............ | |
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 … | |
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. | |
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 … | |
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. … | |
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): … | |
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 … | |
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. |
The End.