15,190 Topics

Member Avatar for
Member Avatar for nishu..

can anyone give simple example of storing data in datastore in google apps engine using python . thnx

Member Avatar for hughesadam_87
0
175
Member Avatar for hughesadam_87

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 …

Member Avatar for hughesadam_87
0
4K
Member Avatar for floatingshed

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, …

0
62
Member Avatar for Tortura

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 …

Member Avatar for Tortura
0
4K
Member Avatar for dan.nitschke

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), …

Member Avatar for M.S.
0
139
Member Avatar for ceck30s

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 , …

Member Avatar for hughesadam_87
0
336
Member Avatar for python1956

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') …

Member Avatar for Lardmeister
0
4K
Member Avatar for Frensi

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)

Member Avatar for vegaseat
0
124
Member Avatar for ccandillo

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 …

0
82
Member Avatar for rexmorgan

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 …

Member Avatar for rexmorgan
0
1K
Member Avatar for rexmorgan

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 …

0
344
Member Avatar for keyoh

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): …

Member Avatar for The Geek Scope
0
5K
Member Avatar for wootburgers

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 …

Member Avatar for TrustyTony
0
262
Member Avatar for wootburgers

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 …

Member Avatar for wootburgers
0
258
Member Avatar for kuchi

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?

0
51
Member Avatar for TrustyTony

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.

Member Avatar for hughesadam_87
0
557
Member Avatar for M.S.

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 …

Member Avatar for vegaseat
2
270
Member Avatar for python1956

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 …

Member Avatar for vegaseat
0
540
Member Avatar for ryantroop

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 …

Member Avatar for hughesadam_87
0
180
Member Avatar for neriahfred

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 …

Member Avatar for hughesadam_87
0
192
Member Avatar for imixkumuku

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, …

Member Avatar for hughesadam_87
0
1K
Member Avatar for depy

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 …

Member Avatar for vegaseat
0
609
Member Avatar for BobTheLob

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 …

Member Avatar for Ene Uran
0
6K
Member Avatar for theadmiral99

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 …

Member Avatar for TrustyTony
0
187
Member Avatar for ProNewb

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. …

Member Avatar for ProNewb
0
175
Member Avatar for blaine.rogers.14

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 …

Member Avatar for blaine.rogers.14
0
259
Member Avatar for Jacklittle01

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?

Member Avatar for Alice25
0
3K
Member Avatar for duyencaothi

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!

Member Avatar for Max00355
0
177
Member Avatar for apaulogy

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 …

Member Avatar for Max00355
0
208
Member Avatar for beela16

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, …

Member Avatar for Lardmeister
0
282

The End.