14,946 Topics

Member Avatar for
Member Avatar for Taral

Can anybody show me, how can we collapse, expand a pane/window in python? Thanks in advance for the help!!!

Member Avatar for bumsfeld
0
141
Member Avatar for hotteaboi

hi i got this program how do i sort this....thanx alot [URL="http://www.ee.umanitoba.ca/~pcard/371/assignment1.py"]http://www.ee.umanitoba.ca/~pcard/371/assignment1.py[/URL]

Member Avatar for Dani
0
145
Member Avatar for a1eio

I'm trying to use the google/python api, but i keep getting this error thrown at me: HTTPError: HTTP Error 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied. I also get this error when trying to use …

Member Avatar for a1eio
0
132
Member Avatar for Matt Tacular

Hey guys, I was wondering if there is a way to include other python programs in your python program. Sorry if there is another thread about this I looked and was unable to find one.

Member Avatar for a1eio
0
194
Member Avatar for girish_sahani

I want to generate all substrings of size k-1 from a string of size k. e.g 'abcd' should give me ['abc','abd','bcd','acd'] Order of these strings in the list doesnt matter. Also order doesnt matter inside the string e.g 'abc' or 'bca' or 'bac' is the same. The following code doesnt …

Member Avatar for a1eio
0
210
Member Avatar for katharnakh

how to read spread sheet in python. I have a package XLW to generate a spread sheet, but i din't find method to read. How to read spread sheet? Please help me. Thanks, kath.

Member Avatar for vegaseat
0
197
Member Avatar for girish_sahani

I have a list of strings all of length k. For every pair of k length strings which have k-1 characters in common, i want to generate a k+1 length string(the k-1 common characters + 2 not common characters). e.g i want to join 'abcd' with bcde' to get 'abcde' …

0
87
Member Avatar for Taral

I am new to this group. Hello to everyone! I am trying kill a thread by setting up traces in the python code. The thread code is given below: ###################################### class KThread(threading.Thread): """A subclass of threading.Thread, with a kill() method.""" def __init__(self, *args, **keywords): threading.Thread.__init__(self, *args, **keywords) self.killed = False …

Member Avatar for Taral
0
376
Member Avatar for girish_sahani

I wrote the following code to concatenate every 2 keys of a dictionary and their corresponding values. e.g if i have tiDict1 = tiDict1 = {'a':[1,2],'b':[3,4,5]} i should get tiDict2={'ab':[1,2][3,4,5]} and similarly for dicts with larger no. of features. Now i want to check each pair to see if they …

Member Avatar for a1eio
0
105
Member Avatar for Blujacker

[code] from Tkinter import* okno=Tk() okno.title('Pomoc please') platno=Canvas() platno.pack() def volana_funkce(event): print event.widget oval1=platno.create_oval(10,20,30,40,fill='red',tags='klik') oval2=platno.create_oval(50,70,80,90,fill='blue',tags='klik') platno.tag_bind('klik','<1>',volana_funkce) mainloop() [/code] how to get a name of widget if click on them?e.g i klik on oval1 and function volana_funkce will return oval1.. thanks

Member Avatar for bumsfeld
0
216
Member Avatar for skanker

I want to use wxpython, but when I installed it python didn't recognise the module. I've looked everywhere for help but gotten nowhere so could someone help me out?

Member Avatar for vegaseat
0
141
Member Avatar for girish_sahani

I want to generate all size 2 strings from a list of size 1 string e.g featureList = ['a','b','c','d'] gives ['ab','ac' etc] I wrote this code [code] def genC(featureList): for i in range(0,len(featureList) - 1,1): for k in range(1,len(featureList) - 1,1): if i+k <= len(featureList)-1: colocn = featureList[i] + featureList[i+k] …

Member Avatar for girish_sahani
0
68
Member Avatar for rubiton

Can someone please write the script for connecting to MySQLdb Also if anyone knows a good tutorial form transfering info from a python module into a MySQL table. Thanks in advance.

Member Avatar for rubiton
0
167
Member Avatar for girish_sahani

I want to generate 'substrings' from a string as follows: for each substring j of string,generate the 2 lists [j,string - j] and [string -j,j] e.g If i have a string 'abc' i want to generate the list [['a','bc'],['bc','a'],['c':'ab'],['ab','c'],['b':ac],['ac':b]] Now i tried the following but its not giving me the …

Member Avatar for girish_sahani
0
203
Member Avatar for ber

Hi, I'm very new to programming and Python. I need to process two separate files, one containing words, the other frquencies of these words. What is the best way to process these files and obtain a new file with frequencies*words in there? Btw i'm afraid the files cannot be read …

Member Avatar for vegaseat
0
94
Member Avatar for flybob

I have developed software a long time, but am new to GUI. For the last 6 weeks, I have been developing a database in MySQL, with mysqldb and controlling it with wxPython GUI code developed in Boa Constructor. Now that I have stuff IN the database, and screens to view …

0
55
Member Avatar for Confucius

Ive looked many places but the answer to this question has eluded me, once a script is executed how can you make it so that it re-starts. Oh, and what is the meaning of life?:cheesy:

Member Avatar for Confucius
0
101
Member Avatar for Ene Uran

I read somewhere that you should avoid using a leading underline in a variable name. It is supposed to have a special meaning in Python. I can't find anything more detailed. Does anybody know?

Member Avatar for vegaseat
0
197
Member Avatar for Ene Uran

Does Python have a static variable like C has? I like to avoid a global variable for the usual reasons. Note: A static variable in a C function will retain its last value.

Member Avatar for vegaseat
0
144
Member Avatar for girish_sahani

I need to map one list onto another.l1 is a list of lists of lists and l2 is a list of numbers.I want elements of l1 to be the keys and elements of l2 as the values.I tried to convert l1 into a tuple and then mapping but it doesnt …

Member Avatar for girish_sahani
0
231
Member Avatar for Blujacker

I have an problem with Python, i am trying to create a game. I did mapeditor for this game. I create map by creating a lot of pictures, like 2000 or more. But if i want to create moore i get an RunTimeError:( [IMG]http://blujacker.wz.cz/omg!.PNG[/IMG]

Member Avatar for Blujacker
0
119
Member Avatar for girish_sahani

When i tried the following in python interpreter,i got a syntax error: [code] d = {[[['a': 1,'b': 2],['a': 4,'b': 3]][['a': 2,'c': 2],['a': 1,'c': 3]]] : 0.4} [/code] Pleeeez help :sad:

Member Avatar for bumsfeld
0
77
Member Avatar for gbs

I was trying to write a simple python script to enable web users to upload files. Here is html [code] <HTML> <HEAD></HEAD> <BODY> <FORM ACTION="[URL="http://some-server.com/test.cgi"]http://some-server.com/test.cgi[/URL]" METHOD="POST" enctype="multipart/form-data"> <INPUT TYPE="text" NAME="words" SIZE=30><br> <INPUT TYPE="file" NAME="infile" SIZE=30><br> <INPUT TYPE="submit" NAME="Submit" VALUE="Submit Form"> </FORM> </BODY> </HTML> [/code] Here is the python script [code] …

0
78
Member Avatar for ejai

I am working on an assignment that involves simulating a volley ball game and I have NO idea. Can anyone help. Here is the question Thanks

Member Avatar for ejai
0
108
Member Avatar for girish_sahani

If i have a list (or list of lists) with elements of size k and i want to generate all higher level elements (of size k + 1) from it,what should i do??Any pointers would be of a great help I tried the following for lists...for list of lists i …

Member Avatar for girish_sahani
0
207
Member Avatar for girish_sahani

this doesnt work when the file is in the same directory as the .py file. [code] def get_colocations(filename): sentences = open(filename).read().split("\n") colocations = [] for sent in sentences: colocations.append(sent) return colocations def main(): get_colocations("colocations.txt") print "Colocations are",colocations [/code] Can anyone help????????

Member Avatar for girish_sahani
0
124
Member Avatar for gbs

Hi, I am having the problem of running ps2pdf from a python script. From the command line, ps2pdf works just fine. However, when I tried the following code: os.chdir("/tmp/test") # file.ps resides in this dir os.system("ps2pdf file.ps file.pdf") The script generated an empty file.pdf with no pages. Does anyone know …

Member Avatar for G-Do
0
2K
Member Avatar for madloch

Hi All I'm new to Python and have created the below little program but would like to be able to print the loop final count (eg. 8 years) rather than every loop. Any hints on how to do this? def main(): print "This program calculates how long it takes for …

Member Avatar for madloch
0
3K
Member Avatar for NumNut

Hello, I am using fedora 5 and installed wxpython in an effort to program in python/wxpython (installed wxPython-2.6.3.2-1.fc5.i386.rpm, wxGTK-2.6.3-2.6.3.2.1.fc5.i386.rpm and wxGTK-gl-2.6.3-2.6.3.2.1.fc5.i386.rpm). When I run my test script to create a frame, a notebook and an image on one of the pages of the notebook, I get a GDK error when …

Member Avatar for NumNut
0
216
Member Avatar for Ene Uran
Member Avatar for bumsfeld
0
5K

The End.