14,951 Topics

Member Avatar for
Member Avatar for kumarantechie

hi, I want to run an application that is compiled in python 2.5 in fedora 13 but fedora 13 comes with python 2.6.4 so i manually install python 2.5 to run the application but it is saying that no module named gtk .. how to set path for gtk for …

Member Avatar for woooee
0
144
Member Avatar for TrustyTony

Here is my practise with [URL="http://www.boggled.org/"]boggle [/URL]letter square non-overlapping word finder after some drastic debugging and cleaning. I think it is reasonable speed also. Comments wellcome.

Member Avatar for TrustyTony
0
1K
Member Avatar for personx1212

hi there, i have some binary data (zip files, music, etc..)stored in a database, how can i start those files in memory without saving them to HDD..or even to temp files folder... thanks.

Member Avatar for personx1212
0
74
Member Avatar for acrocephalus

Hello! I am trying to run the code provided in the texttable module documentation ([URL="http://jefke.free.fr/coding/python/texttable/"]http://jefke.free.fr/coding/python/texttable/[/URL]) as shown in the code, but it returns a name error which tells that Texttable is not defined. [CODE]import texttable table = Texttable() table.set_cols_align(["l", "r", "c"]) table.set_cols_valign(["t", "m", "b"]) table.add_rows([ ["Name", "Age", "Nickname"], ["Mr\nXavier\nHuon", 32, …

Member Avatar for Gribouillis
0
2K
Member Avatar for fingerpainting

[B]Background: [/B] I'm extracting values from a file which is sometimes an xls and sometimes an xlsx file. An xls is easily read with xlrd, but xlrd nor any other Python library (as far as I could find) supports xlsx, so instead I'm using[URL="http://github.com/dilshod/xlsx2csv"] xlsx2csv[/URL] to convert to csv and …

Member Avatar for fingerpainting
0
9K
Member Avatar for spockGirl

Hi! I'm trying to figure out if it's possible to graph a piecewise mathematical function using Python where the limits of the function are dependent on another variable (i.e., if a > b, graph f(x); if b > a, graph g(x)). I've been trying to google stuff about graphing, but …

Member Avatar for Gribouillis
0
130
Member Avatar for wolfeater017
Member Avatar for tbone2sk
0
152
Member Avatar for buddyalexander

I have just started to learn python (Learning Python), and I am trying to move some files to another folder that are over a week old. I keep getting an error about the files not existing. import shutil, sys, time, os src = 'c:/users/wca36050/temp1' dst = 'c:/users/wca36050/temp2' now = time.time() …

Member Avatar for TrustyTony
0
239
Member Avatar for onthego

I can't seem to get a comma embedded string (i.e. an LDIF DN value) to save as a key in an associative list without the value being interpreted as a list itself. I can't find a method that will cause the value of the string variable to be interpreted intact …

Member Avatar for onthego
0
235
Member Avatar for abhijat

Hi guys, I'm new to the forum and to progamming. I've started following a set of online video lectures as an introduction to programming using python. One of the problem they asked to solve is to create a simple program that computes and prints the 1000th prime number. I got …

Member Avatar for TrustyTony
0
1K
Member Avatar for wolfeater017

is it possible to link modules together and freeze them into an executable using cx_freeze? and how can you do it

0
113
Member Avatar for nickles

I'm trying to decrypt some data from gpg files that I've downloaded. Downloading the files to a directory is no problem, but I'm having trouble actually decrypting them. Here's what I'm doing right now: [CODE]def extractGPGs(gpglist,path,gpgPath="\"C:\\Program Files\\GNU\\GnuPG\\gpg.exe\""): os.chdir(path) if not os.path.isdir("GPGFiles"): os.mkdir("GPGFiles") if not os.path.isdir("OtherFiles"): os.mkdir("OtherFiles") if gpglist == None: …

0
66
Member Avatar for jonnyflash

I'm writing an app that requires a list from Python to be read into an array in C++. The problem I'm having is that I can't get my code to work under any version of Python after 2.4, and I don't think I'm using any deprecated functions. It runs fine …

Member Avatar for Gribouillis
0
1K
Member Avatar for tiddster

I am using regular expressions to look for certain keyword sin a string. At the moment I have got: import re thisText = "<meta http-equiv='content-type' content='text/html; cHarSet=gBk' />" n = re.compile(r'\b\s*charset=gbk[a-z]*', re.IGNORECASE|re.VERBOSE) print n.findall(thisText) this allows me to get the string, ignoring the case of the text. I also want …

Member Avatar for snippsat
0
107
Member Avatar for aint

When I write a code, I put time related codes in the beginning and at the end to see how many seconds it takes. Is it possible to write it as a module, and refer to it when i write a code just with a single line of code? [CODE]import …

Member Avatar for snippsat
0
109
Member Avatar for sachinpkale

Hi, I am trying to export http_proxy using following python script Though, it prints 'Successful', it is not setting proxy correctly. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ import os command = r"export http_proxy=http://my_username:my_password@proxy_server_address:3128" if os.system(command) == 0 : print("Successful") else : print("Unsuccessful") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ What will be the possible problem

0
20
Member Avatar for gishi

hi! does anyone know how to convert excel file (xls and xlsx)(or even just xls) into csv preferably using xlrd and csv modules. i need to convert a specific excel sheet to csv. i need to create a csv file instead of using comma but semicolon. i am still not …

Member Avatar for gishi
0
618
Member Avatar for faby

hello everyone! I wanted to create a priority queue in which there would be different dictionaries with their priority numbers. The major problem I'm experiencing is that the queue just prints the dictionaries without regard for their priority. Please what do I have to do so that the queue prints …

Member Avatar for TrustyTony
0
2K
Member Avatar for cleve23

Is there a module in python that i can use to parse javascript??? I finding a module that parse out the error message like what the cssutils do when checking on css script. Thanks

0
53
Member Avatar for lewashby

In the following program I don't understand why 'mixer' is given as an argument to the function 'create_gui'. Please explain. File 1 [CODE]# imports from Tkinter import * from sound_panel import * import pygame.mixer # create gui app = Tk() app.title("Head First Mix") # create mixder mixer = pygame.mixer mixer.init() …

Member Avatar for vegaseat
0
133
Member Avatar for wolfeater017

how do you get it in pygame so that when you click on a rect it will reset the window but only when you click on that certain rect

Member Avatar for wolfeater017
0
113
Member Avatar for hamstes

Hi. Im new to Python and I need help upgrading the python version 2.6.5 to version 3.1.2. I'm running x64 Ubuntu. After I download and install the 3 version it does not overwrite or default itself as the new thing. I can't uninstall the 2 version because of dependencies on …

Member Avatar for redyugi
0
126
Member Avatar for SgtMe

I want to make an array (using the built-in array module), to create an array made up of classes. All the objects in the array will be the same class, but I want to be able to append new classes on the end and read the values. Thanks in advance.

Member Avatar for SgtMe
0
171
Member Avatar for timrichardson

Hi. I'm getting the hang of tkinter now, thanks for help in my first thread on this. Now, I've happily using the simpledialog module, but it's not using the themed widgets (ttk). I think it's a good exercise for me as a python beginner to fix this myself, but I …

Member Avatar for vegaseat
0
305
Member Avatar for murjam

Hello This is my first post on this forum. I have found that this place seems to have lot of knowledgeable people when it comes to Python. Anyway I'm quite new to GUI programming and I'm not exactly having a huge problem but I'm more interested about how to make …

Member Avatar for TrustyTony
0
153
Member Avatar for KirkK

I can't seem to understand why I cannot run this. Please explain. Thank you in advance. [code] #07/22/2010 #Write a program that will calculate a 20% tip and a 6% #sales tax on a meal price. The user will enter the meal price #and the program will calculate tip, tax, …

Member Avatar for TrustyTony
0
159
Member Avatar for aniyishay

Hey guys, Im trying to learn python and i decided to try and make a text based tic tac toe game. I dont have the matching up yet (where the rows say there are 3 in a row they win). But I have this so far and as you can …

Member Avatar for aniyishay
0
2K
Member Avatar for kate2mba

Wirte a regular expression pattern to match all words ending in s. This is what I got but seems like im thinking to hard on it, plus of course its not working lol Please help! :) [CODE]import re str = "Subs are everwhere" print (str) matchObj = re.match(".*?s ",str,re.L|re.I) if …

Member Avatar for kate2mba
0
147
Member Avatar for abcdr

I need to write a function that takes a string as an argument and outputs the letters backward, one per line.so far I have this: [code] def wordReverse(word): acum = "" for ch in word: acum = ch + acum return acum [/code] I tried adding \n to acum but …

Member Avatar for TrustyTony
0
161
Member Avatar for kate2mba

Hi all its me needing help again :P My exercise says: Write a function wordPop that accepts a text and a length N and returns the list of all the words that are N letters long, sorted by their length. okay so what I have is 2 fuctions first: [CODE]def …

Member Avatar for kate2mba
0
184

The End.