15,190 Topics
![]() | |
can anyone give simple example of storing data in datastore in google apps engine using python . thnx | |
Hi, I am trying to create the most general function possible to test if an object passed into it has mutability or not. With some prior help from pytony, it seemed that the best way to do this is to try to set and attribute. If the attribute can be … | |
This is probably going to be beyond my knowledge/experience but I thought I'd ask... I work on a radio station in the UK. I have a friend in Canada who wants to listen but he is 5 hours behind us. I'd like to be able to capture our shoutcast stream, … | |
Hi, I want to execute a tcl command with a python method. I don't really know how this works. This is my tcl command: <object> config -<parameter> Now I want a python method, that should look like this: def config(config_obj, parameter): #code which executes the tcl command Do you know … | |
Hello, I am doing a school project and need assistance on validating raw input, this is very simple stuff, but can someone answer this for me? The statement is: ordertype = str(input("Is the order pickup or delivery?")) Only two values could be entered: P or D (or p or d), … | |
I have a text file that contains something like this: # Comment # Comment # Comment # Comment # Comment Comment # Comment #Raw SIFs at Crack Propagation Step: 0 # Vertex, X, Y, Z, K_I, K_II, K_III, 0 , 2.100000e+00 , 2.000000e+00 , -1.000000e-04 , 0.000000e+00 , 0.000000e+00 , … | |
I am trying to sort by key, but it's not working because I don't think that the thing that I'm trying to sort on counts as a list (in fact I think it is an ndarray?): y = np.genfromtxt("1400list.txt", dtype=[('filename','S20'),('freq','S20')]) gives me y as something in the form: [('a070918_215953.SFTC', '1369.000') … | |
I'm trying to open a txt file in python, but I'm having trouble. It seems to be working, but I cannot get the text anywhere. Here is the code, does anyone know how I can get the text from the hello.txt file? f = open("c:/users/verzo/desktop/hello.txt") print(f) | |
I am new to flask and new to git so hopefully someone can help me. This is my git repo: https://github.com/ccandillo/ma-inventory.git I am trying to create a web based spreadsheet. I am storing my data in a sqlite3 database. On my edit page, I would like to be able to … | |
I could reallly use some help. I am a complete newbie in python. What I would like to do is import a csv file (originally an excel file). Have the user pick a beginning month and an ending month and add the columns of the months between. For example I … | |
This is working code. You will of course have to replace the directories used in this code with your own that will be unique to your particular situation. You also must have ArcGIS, and the newest version is 10 which will only work with python 2.6. There is plenty of … | |
I'm working on a cleanup script for tv shows that I download. Right now I'm just looking for a file greater than 50mb, but there should be a better way. [CODE] import os import shutil dir = "C:\Users\Bobe\Downloads\TV\\" for folder in os.listdir(dir): if os.path.isdir(os.path.join(dir,folder)): for file in os.listdir(dir + folder): … | |
numbers = [] line = int(raw_input('Enter number: ')) while line != '': numbers.append(line) line = raw_input('Enter number: ') print "Size:" + " " + str(len(numbers)) Hey guys, once again I need some help with a challege. http://pokit.org/get/img/c00a1897d52de5b36329564861fadb1b.jpg For your homework, you are given a set of integer data readings, and … | |
I want to make a program that cross checks strings. Here is an example : **Enter line: AAGGAA This sequence can make a hairpin** **Enter line: UGAG This sequence cannot make a hairpin** **Enter line: GUGCCACGGCACCGUG This sequence can make a hairpin** **Enter line: GUACCACGGCACCGUG This sequence cannot make a … | |
xmlrpclib api throwing an error <ProtocolError for host:port/: 500 Internal error> when calling api with the data (contains non-ascii characters), after replaced that non-ascii characters its working. What would be the problem ? what is the resolutions on this? | |
Here is slow brute force way to find the largest palindromic product of three digit integers. You could do loop and break out of it if you go under the smaller number (the second one) of best solution found so far to be more efficient etc. | |
How the following code can be rewritten in a better way? #!/usr/bin/env python """Simple program for finding popular names over last 100 years, in response to vegaseat's last post in Projects for Beginners(9/1/2012). It first lists the popular names and then search for entered name by user""" oldnames = """Mary,Helen,Margaret,Anna,Ruth … | |
Hi guys, With Python, I am using genfromtxt (from numpy) to read in a text file into an array: `y = np.genfromtxt("1400list.txt", dtype=[('mystring','S20'),('myfloat','float')])` Which works okay, except it doesn't seem to read my 2 columns into a 2D array. I am getting: [('string001', 123.0),('string002', 456.0),('string002', 789.0)] But I think would … | |
So, maybe this is a concept out of the domain of programming... but I think not. Lets say we have a 400MB video file that we want to either send somewhere, or stream. Can we use python to break it into binary, break the binary into chunks, and then send … | |
Hi, I'm new to Python. Can someone please guide me in writing a Python script that bulk processes audio files and image files to create an audiovisual or movie out of them. Say we have 20 images and 20 audio files and want to create 20 video files out of … | |
I'm trying to open a tex file from within python, tell the tex editor to run (manually you would press ctrl + T) and finally close the program. So far I can only figure out how to open and close the program. this is what I have so far... os.spawnv(os.P_WAIT, … | |
Hello! I was trying to display/print elements of a list, suppose a = [1,2,3,4,5], using functions. But the code i wrote prints only the first element of the list whereas i needed all the elements of the list to be printed( as in 1 2 3 4 5 but all … | |
![]() | Hello, I am having some trouble in importing a CSV file into an array. The CSV file has multiple columns, and what i really wanted to end up doing is getting the element inside each block of the CSV file. So far i've only been able to get a row … |
I am currently doing a python challenge in which I have to create certain codes. I am stuck on a particularly hard question and would appreciate some help. The problem is: In 1989, a journalist asked Paul Boutin, an engineer at the Massachusetts Institue of Technology, "What do you think … | |
So far, I think I'm doing it right however it doesn't seem to generate the results I wanted. def occurrence(e,List): for item in List: s = 0 if item == e: s += 1 return s Basically I want my function to count how many times e occurs in List. … | |
I'm trying to make a simple random name generator by pulling first and last names from text files. The problem I'm having is that sometimes the names are chopped off and incomplete with the output and sometimes the names are on two different lines. I would also like to be … | |
I developed a program I think has potential, but don't want the end user to a) have to download python and b) steal my code. How would I turn it the .py of my script into a .bat or .exe so my end user can run it? | |
I'm looking for the web online course for my learn Python Where are the best to learn python? Who know tell me, please. Thanks! | |
Modify the guess My Number program given below. Modify it so that now the player has only five guesses. If the player runs out of guesses, the program should end the game and display an appropriately chastising message. # Guess My Number # The computer picks a random number between … | |
Python & binary tree help PLEASE?!?????????please please please help me in anyway :'(? Write a Python program that : a: Takes in as input a list of numbers (Note that you have to type in these numbers using the keyboard) using: def insert(tree, key): if len(tree) == 0: return [key, … |
The End.