15,175 Topics

Member Avatar for
Member Avatar for Jewsy

Hey im new here to excuse the nubneess i wanted to make a family tree thingy and wanted to do it in python i wanted to make a way so that it could read a text file and auto add a new entry called summary which would include the initials,yr …

Member Avatar for nevets04
0
120
Member Avatar for P00dle

Hi, I am reading data from a file. The data is mostly text, but has a small bit of binary in it, as well as a linefeed at the end of every block of text. Can Python read all of it and write it to another file, while not changing …

Member Avatar for P00dle
0
157
Member Avatar for PixelHead777

I swear, those things are like shurikens in these masses... I'm trying to make a loan calculator in python, as part of an assignment. I'm basing it off of two things. 1: [URL="http://www.efunda.com/formulae/finance/loan_calculator.cfm"]This website, which contains 3 different calculators.[/URL] 2: [URL="http://www.efunda.com/math/num_rootfinding/num_rootfinding.cfm#Newton_Raphson"]The link from the second calculator (my current pain)[/URL] I'm …

Member Avatar for woooee
0
228
Member Avatar for efecto

Hi all, I have found some examples on the net but was not able to use the technique.. here is what I would like to do. tst = 2 numOfDigits = 3 # change this to tst2 = 002 Any help is appreciated. Thank you. [QUOTE][url]http://www.webdotdev.com/nvd/content/view/938/99999999/1/2/[/url] >>> print “z is …

Member Avatar for vegaseat
0
143
Member Avatar for jaison2

hi, i want to be able to draw two eyes with are exactly the same in radius and colour etc next to eachother. So when i open the window the pair of eyes are there in the centre. I have managed to get one eye but i dnt have a …

Member Avatar for vegaseat
0
190
Member Avatar for Felicidas

Hi everyone, hope someone can give me some hints about my problem. I write a program that read users input through command line(args). This input i put it as a list. User type number that they want separated with comma [CODE] --number 1,2,3,4 [/CODE] The next process is to read …

Member Avatar for vegaseat
0
195
Member Avatar for i are smart

So I did some research and learn that you use the sys module to set the path for 2.5: import sys sys.path.append('usr/local/lib/python2.5/site-packages/') And that would set the path for 2.5 permanently, but if i do the samething for 2.6 or 3.0, it will not work the next time I open …

Member Avatar for vegaseat
0
686
Member Avatar for jaison2

I need to write a function which has 2 parameters height and width and outputs a rectangle of "#" ssmbol of the appropriate dimensions. so for 93, 4) should result in the output #### #### #### but i dnt unserstand how to use the loop in this. I have only …

Member Avatar for vegaseat
0
95
Member Avatar for python.noob

Hai guys, A very good morning to you.Currently i'm using python3 in linux. In windows tkinter is working fine but in mandriva linux spring 2009 it fails to import. Can you please tell me step-by-step on how to fix this issue? In python3.1 home page the description is not clear …

Member Avatar for python.noob
0
377
Member Avatar for yateenjoshi

Hello, I would like to know hot to pass address reference to ‘c’ function through python. I am using swig for ‘c’ anf python interfacing Interface file : stud.i *************************************************** %module stud %header%{ #include "stud.h" %} %include "stud.h" %array_functions(char *,charp ); %inline %{ extern int parse1(char *,char *,char **); %} …

Member Avatar for yateenjoshi
0
402
Member Avatar for math743

For whatever reason, Python on OS X sets the default file directory to the "~/Documents/ " folder. It's a bit annoying because it makes my documents folder massively cluttered with python files as well as files from my computer. I'd like to change it simply by adding a "Python" folder …

Member Avatar for Gribouillis
0
158
Member Avatar for AutoPython

Okay, the encryption algorithm idea was stupid. But I still made an encryption program. I got the absolute most possible frustrating situation. The program doesn't work in the console window. It spits out a giant error (probably recursion judging how many errors it got), but it DOES work in IDLE. …

Member Avatar for jlm699
0
174
Member Avatar for nevets04

[code] #Credits: #Nevets04 #Fallen #Uber1337 #Farout import os List = [] z = int(raw_input("How many words in your list?: ")) os.system("clear") for x in xrange(z): List.append(raw_input("")) List.sort(),os.system("clear") print "\n".join(List) [/code]

Member Avatar for vegaseat
0
110
Member Avatar for gangster88

I want to be able to output the area of the circle and the cirumference of the circle to the user. so the output is to be "the area of the circle is... and the circumference of the circle is..." and it has to be to 2dp. the question says …

Member Avatar for snippsat
0
141
Member Avatar for laxter17

I am totally new to programming and could use some help. I am trying to write a while loop in python that could execute this equation but in a while loop type function. the equation is n * (n + 1) / 2 any ideas?

Member Avatar for ShadyTyrant
0
164
Member Avatar for tdeck

Ideally I'd like to do it with a list comprehension. Something like this [CODE]result = [(key, value)for key in dict.keys(), value in dict.values()][/CODE] but clearly that isn't the right format. Any suggestions? EDIT: This seems like what I want to do, but it doesn't work: [CODE]result = [(dict.keys[i], dict.values[i]) for …

Member Avatar for jlm699
0
324
Member Avatar for logon84

i am a beginner. i have no idea how i can make Tic Tac Toe game. please help me. Question #1 Extend program To use arrays For a 5*5 Tic Tac Toe game. (wins are 5 Horizontal, 5 Vertical, 5 Diagonal) Question #2 Extend to 4*4 array (But wins are …

Member Avatar for manathisbest
-2
169
Member Avatar for chavanak

Hi, I am comparing 2000 files with one other file. I want the program to go through each line in both files and compare. If the line is present, then it has to write to another file. What I tried was to open both the files and use readlines() to …

Member Avatar for chavanak
0
398
Member Avatar for newportking

I am interested in learning python and picked up a friends textbook to try and work through it. I have no cs experience so am pretty clueless. I am having difficulty with one of the problems in the first chapter lol. i am trying to make the program spit out …

Member Avatar for newportking
0
115
Member Avatar for P00dle

Hi, I have stumbled on an interesting problem. I have thought 'n' thought, but haven't come up with any good ideas of how to handle this. I have a text file that contains many records, but without the records being seperated. I need to figure out how to seperate these …

Member Avatar for jlm699
0
281
Member Avatar for nerdagent

How would I limit mouse movement in python? For example I have a 480x480 grid where each block is 30. If I click on a block I would like to only be able to click in an area of one block around the block that I placed.

Member Avatar for ov3rcl0ck
0
78
Member Avatar for python.noob

Hello friends, I've tried to install wxwidgets in my mandriva 2009 spring for GUI interaction with python. In the installation instruction it said that i need gtk+ library. So i downloaded GTK+. When i configured GTK+ i got the message checking for BASE_DEPENDENCIES... configure: error: Package requirements (glib-2.0 >= 2.21.3 …

Member Avatar for Gribouillis
0
192
Member Avatar for SMIFMD

Greetings! I am in need of some techincal assistance. My problem is as follows: In my Programming class, we are starting to use the graphics package in Python. We are using a module called graphics.py In order to use this module, we have to save it to the desktop and …

Member Avatar for Gribouillis
0
2K
Member Avatar for sravan953

Hey All, I have been asked to do a project on Java at school. We are still learning it at an elementary level... Many decided to do the project on things like ticket booking, banking and stuff... whereas I wanted to do something innovative and so decided that my topic …

Member Avatar for BestJewSinceJC
-2
322
Member Avatar for Norua

I'm having trouble with my lab for a computer class. The problem is as stated: Design a program that generates 100 random numbers, and keeps a count of how many of those random numbers are even and how many are odd. Can someone please help me out with this?

Member Avatar for snippsat
0
140
Member Avatar for P00dle

Hi. First, I'll explain my task: I have 4 text files. 3 of the files contain xml tags and content. The 4th is empty. I need to read the 3 files, and write them to the 4th file. The reason for having 3 files is that the first and the …

Member Avatar for GreenDay2001
0
140
Member Avatar for kisan
Member Avatar for Gribouillis
-1
190
Member Avatar for Kolz

Is there a method that, say, for example... you open a file, and usually the cursor would be at the end right? Is there a function or method that would set the cursor back to the beginning of the file? Thanks!

Member Avatar for vegaseat
0
204
Member Avatar for krishna_sicsr

Hi, Below is my output: FF 0 CMA: 0 IPMI port DE 15E0 TTA: 1 Generic Com port DD 15D0 TTB: 2 Generic Com port DC 15C0 SEA: 3 ACPI System Event FF 0 1 MFPCI DB 15B0 DQA: 2 CMD 649 IDE/ATA Controller DA 15A0 EIA: 3 Intel 82557 …

Member Avatar for stephendoyle75
0
161
Member Avatar for P00dle

Hi, I need to read input from 2 different files, take text from both, combine it, then print it to a third file. That part is easy. What I have a problem with is that some of the text I read in have special characters that need to be escaped. …

Member Avatar for P00dle
0
131

The End.