Posts
 
Reputation
Joined
Last Seen
Ranked #354
Strength to Increase Rep
+8
Strength to Decrease Rep
-2
100% Quality Score
Upvotes Received
16
Posts with Upvotes
16
Upvoting Members
11
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
9 Commented Posts
0 Endorsements
Ranked #363
~154.84K People Reached
Favorite Forums
Favorite Tags
Member Avatar for daviddoria

Is there a library that has a function that will take (theta,phi) and return (x,y,z)? Thanks, Dave

Member Avatar for Ratan_2
0
6K
Member Avatar for lapo3399

I'm new to Python, and as I was coding for Project Euler to develop my skills in this language, I needed a function for converting between two bases. I know that int() can convert anything to base 10, but before I looked for a Python module concerning this math, I …

Member Avatar for vegaseat
0
2K
Member Avatar for eplymale3043

Write a program that can read the students records from the file “scores.dat”. This program will find the maximum and the minimum student scores. The first line in the file is a header. Each line (starting from the second line) contains the records of one student separated by spaces. These …

Member Avatar for vegaseat
0
2K
Member Avatar for ndoe

how to compare string in file e.g i have file with name data.txt with file like this 123456 abcdef 456897 asdffg 789654 gfdsah the question how to compare that file and i now that string with content alphabet or number and i want make make new file data2.txt from data.txt …

Member Avatar for munna03
0
2K
Member Avatar for Yoink

I have to write a program that will decode a Ceasar cypher with any possible rotation length on a long string that will be imported into the program. I'm trying to figure out some pseudo coding on how I want to tackle this problem but there is one key thing …

Member Avatar for TrustyTony
0
347
Member Avatar for Lucaci Andrew

So, what is my deal... I'm working on a script, which, at some point will require the user to insert his or hers username and a password. My question is, how can I make that when the user will write in the password box/line whatever, instead of its characters, to …

Member Avatar for Lucaci Andrew
0
173
Member Avatar for unigrad101

I am trying to create a function which would take a list and be able to count the number of ints floats and str in that list. output should be: list = ['v', 3.0,1, 'etc'] freq = countDataTypes(list) print(freq) [2,1,1] any help would be greatly appreciated so far: [CODE] >>> …

Member Avatar for bumsfeld
0
133
Member Avatar for VinceW

#Guess my number #The computer picks a random number between 1 and 100 #the player tries to guess it an dhte computer lets #the player know if the guess is too hight, too low #or right on the money import random print "\tWelcome to 'Guess My Number'!" print "\nI'm thinking …

Member Avatar for themoviegeek
0
325
Member Avatar for halien

Hi all, I am trying to write a list of complex numbers to a csv file. The list looks like: [QUOTE] cpl1 = [(-6.4703169037894082e-12-2.7429131015110908e-12j), (-9.0688415110840026e-11+1.7513018812920222e-11j), (-1.8522787470498514e-10+1.3074128585310874e-11j), (-5.8563154325952382e-10-6.4430377699764563e-10j), (2.1451734832922398e-10-9.987741744765799e-10j), (2.9095870157647141e-10-6.3227384439201728e-10j), (1.9448214150230569e-09+5.1612969453884716e-10j)] [/QUOTE] The complex numbers are to be written to file to look like: [QUOTE] real, imaginary, real, imaginary, real, imaginary, …

Member Avatar for bvdet
0
270
Member Avatar for PascalNouma

Hi everyone, Does anyone know how to remove a particular attribute in XML by using Python? [CODE] <country> <city capital="Paris">Paris</city> ............ ............ </country> <country> <city capital="Helsinki">Helsinki</city> ............ ............ </country> <country> <city capital="Bogota">Bogota</city> ............ ............ </country> [/CODE] I just wanna delete or remove Paris and Helsinki here by using SAX or …

Member Avatar for bvdet
0
319
Member Avatar for kumar_k

Hi, I want to convert a string to numbers ... i tried a lot of codes.. iam a beginner... Kindly help... Ex: a=1 b=2 c=3 d=4 e=5 f=6 g=7 h=8 i=9 j=10 input value -->abc output value --> 123 input value -->abcj output value -->12310 I mean i want to …

Member Avatar for kumar_k
0
87
Member Avatar for vegaseat

If you bind a Tkinter widget to an event, normally only the event information is passed to the function responding to the specific event like a mouse click. Python allows you to expand the event handler to include any number of values to be passed on. Here is a typical …

Member Avatar for bvdet
1
1K
Member Avatar for leegeorg07

Hi again i have programmed a thing that asks for 2 numbers and does a series of things to it.But i want to round the square-rooted numbers to about 6 digits e.g. 5.12345. How can this be done? Here is my code: [ICODE]from math import sqrt running = 'Y' while …

Member Avatar for vegaseat
0
488
Member Avatar for smithy40000

Im trying to get this menu to be inside my of my canvas but so far ive only had 2 windows open and now all im getting is an error, any help is greatly appreciated Im using Tkinter as my GUI [CODE] from Tkinter import * def startMenu(): top_tk = …

Member Avatar for SgtMe
-1
210
Member Avatar for gangemia

I have a CSV file where fields are delimited with a comma. The fields of this CSV file contains the attributes of Permanent Survey Marks and I’ve created a GIS python script to convert it to a table that is stored it in our Enterprise GIS Spatial Database (SQL Server). …

Member Avatar for gangemia
0
196
Member Avatar for pythonNerd159

Does anyone know the code to click a button widget and get the value of that button to show up on an entry screen. I'll show you my code. [CODE]class Application(Frame): def __init__(self, master=None): Frame.__init__(self, master) self.grid() self.createEdit() self.createView() self.createHelp() self.createQuit() self.createOnOff() self.createDelete() self.createClear() self.createSeven() self.createEight() self.createNine() self.createDivide() self.createFour() self.createFive() …

Member Avatar for pythonNerd159
0
121
Member Avatar for pythonNerd159

hey guys, girls, others. i have a pop down widget and one of the options in the pop down screen is "Exit" which means quit. I want to know the code for clicking that "Exit" option and then it Quiting the whole program. here is my code for the pop …

Member Avatar for bvdet
0
114
Member Avatar for smithy40000

I am doing my major work for SDD and i am making checkers, i have searched and tried many differnt solutions but nothing has worked, i am trying to make the window size set to 800x800 and have "Checkers" as a title and 4 buttons down the bottom, i would …

Member Avatar for jimothy
-1
222
Member Avatar for wtzolt

Hi, What I'm trying to do is to write a script which would open an application only in process list. Meaning it would be "hidden". I don't even know if its possible in python. If not, there has to be a function would allow for a program to be opened …

Member Avatar for vegaseat
0
6K
Member Avatar for cnuzzo

I am using python 2.6 and am new to using Tkinter. I am trying to create a basic template GUI for a Toplevel Frame with multiple frames inside of it. I ran into an issue where I am not able to clear my frames properly. I think I have an …

Member Avatar for cnuzzo
0
1K
Member Avatar for Stubaan

Hi folks - I think I'm almost there... I have files with data in this format: ID1 ID2 Dist 1 a 50 2 b 20 3 c 10 2 c 100 4 c 80 4 a 70 1 a 90 2 a 34 3 b 5 2 b 6 1 …

Member Avatar for Stubaan
0
180
Member Avatar for txwooley

I am trying to put a terminal into my tk gui program as a widget. I figured out how to have the output of a command sent to a text widget: [CODE] root = Tkinter.Tk() tfield = Tkinter.Text(root) tfield.pack() for line in os.popen("run_command", 'r'): tfield.insert("end", line) root.mainloop() [/CODE] But how …

Member Avatar for txwooley
0
11K
Member Avatar for Tops

I have a python assignment that has to do with character occurrence. I have to extract all the characters (letters to be precise) in a poem and count how many of each letters there are. For an example: Bobby goes to school blahhhh blahhh blahhh To: B---6 o---5 y---1 ...etc …

Member Avatar for bvdet
0
102
Member Avatar for gridder

Hi, Wonder if anyone here can help with this: I'm trying to split each line of data from a text file into a list or tuple. The lines contain a mixture of ints, floats, and strings (with spaces). I can do it easily enough using split() twice - once by …

Member Avatar for gridder
0
118
Member Avatar for kadvar

Hi, I'm trying to match patterns of the types sentence1 = "keywords=walter&keywords=scott" sentence2 = "keywords=john&" sentence3 = "keywords=james&keywords=john&keywords=brian&" so basically the keywords=somestring& part can be repeated once or multiple times. I am trying to extract the string(s) between '=' and '&'. I have come up with the following so far. …

Member Avatar for woooee
0
86
Member Avatar for voolvif

Hi, I'm trying to use regular expressions on a log file and am trying to extract search terms. Each line in the file is of the form: [CODE]mystring = "00:00:11 192.168.21.44 GET /images/help.gif - 200 Mozilla/4.0+(compatible;+MSIE+5.0;+Windows+98;+DigExt) ASPSESSIONIDGGGGGQEG=CLDIHIJBJAPFAGBFIOMCFGGA;+PRO%5FOnline=SEARCHQUERY=%09%3Cinput+type%3Dhidden+name%3D%27HrowColumns%27+ID%3D%27HrowColumns%27++value%3D%271%3B6%27%3E%0D%0A%09%3Cinput+type%3Dhidden+name%3D%27txtScopeData10%27+ID%3D%27txtScopeData10%27++value%3D%27[COLOR="Red"]catherine[/COLOR]%27%3E%0D%0A%09%3Cinput+type%3Dhidden+name%3D%27txtScopeData30%27+ID%3D%27txtScopeData30%27++value%3D%27[COLOR="Red"]porter[/COLOR]%27%3E%0D%0A%09%3Cinput+type%3Dhidden+name%3D%27txtScopeData50%27+ID%3D%27txtScopeData50%27++value%3D%27%27%3E%0D%0A%09%3Cinput+type%3Dhidden+name%3D%27txtScopeData11%27+ID%3D%27txtScopeData11%27++value%3D%27%27%3E%0D%0A%09%3Cinput+type%3Dhidden+name%3D%27txtScopeData31%27+ID%3D%27txtScopeData31%27++value%3D%27%27%3E%0D%0A%09%3Cinput+type%3Dhidden+name%3D%27txtScopeData51%27+ID%3D%27txtScopeData51%27++value%3D%27%27%3E%0D%0A%09%3Cinput+type%3Dhidden+name%3D%27HCollection%5Fid%27+ID%3D%27HCollection%5Fid%27++value%3D%271%27%3E%0D%0A%09%3Cinput+type%3Dhidden+name%3D%27Submit1%2Ex%27+ID%3D%27Submit1%2Ex%27++value%3D%2736%27%3E%0D%0A%09%3Cinput+type%3Dhidden+name%3D%27Submit1%2Ey%27+ID%3D%27Submit1%2Ey%27++value%3D%2718%27%3E%0D%0A http://www.foo-bar.com/SearchResult.asp"[/CODE] I have put the search terms that I'm trying to extract above …

Member Avatar for bvdet
0
185
Member Avatar for DGXI

i have created lines in graphwin but i did it the long way is there a simpler way using loops ? cheers

Member Avatar for vegaseat
0
179
Member Avatar for Gribouillis

Does anyone know how I can test if an object's type is a builtin type or a user defined type ?

Member Avatar for Gribouillis
0
163
Member Avatar for liz517

[code=python]from random import randrange import math def main(): print "This program will simulate the probability of rolling " print " a 5 of a knid in one throw." pos = randrange(1,7) dice = [0] *5 value = dice [ : ] for pos in [0,1,2,3,4]: dice[pos] = randrange(1,7) roll = …

Member Avatar for anatashinu
0
174
Member Avatar for Darkangelchick

Hi im writing a program that returns whether an inputted number is prime or not, but Im kind of stuck... [CODE]import math def listfactors(n): # defining the function l = [] for i in range (1, int(math.sqrt(n))+1): if float(n)/float(i) == int(float(n)/float(i)): l.append(i) l.append(n/i) return l primeNum = int(raw_input("Enter number here:")) …

Member Avatar for Progressivism
0
137