15,406 Topics
![]() | |
Hi everyone, I am doing a bioinformatics project and I have this code: [code]def three2one(prot): code = {"G" : "6", "A" : "7", "L" : "1", "I" : "4", "R" : "2", "K" : "3", "M" : "5", "C" : "8", "Y" : "9", "T" : "10", "P" : "11", … | |
I need help with my python project. I am supposed to draw something "cool" that includes loops, variables, if-statements, modules, etc. Some ideas given are to draw snails, constellations, a face, daffodils, etc. Anyone help please? | |
Hi my name is maria and live in (the south side) chicago , illinois. I am a senior compu sci major, just working on my own independant projects for school. i am 21 years old love dancing latino music, and absolutely adore waterpolo! I play on a equal opportunity team … | |
In case you are curious, I just posted a new tutorial "Python and Multimedia, Part 1, The amazing Webbrowser Module" on DaniWeb at: [url]http://www.daniweb.com/tutorials/tutorial47392.html[/url] I would love some input from our Linux and Unix friends to see how much cross platform the module is. Post any comments in this thread! | |
In code snippet, there is an example with wx.menu(), but there is only one command in menu. I need moore [code] menu = wx.Menu()#create_menu menu2 =wx.Menu()#menu2 menu2.Append(wx.ID_EXIT, u"Add")#menu2 self.Bind(wx.EVT_MENU, self.a, id=wx.ID_EXIT) #menu2 menu.Append(wx.ID_EXIT, u"PÅ™idat")#menu self.Bind(wx.EVT_MENU, self.Pridat, id=wx.ID_EXIT)#menu menuBar.Append(menu2, "File")#menu2 menuBar.Append(menu, "Soubor")#menu self.SetMenuBar(menuBar) [/code] it doesn't work correct If do i … | |
Is in wxPython event like root.bind('<Double - 1>,function) i need on one wxButton 2 event, normal and double. How to create this? | |
How to create an image to wxButton??? this is my button [code] self.button3 = wx.Button(id=wxID_FRAME1BUTTON2, label=u'Hraj', name='button3', parent=self, pos=wx.Point(35, 925), size=wx.Size(20, 20), style=0) self.button3.Bind(wx.EVT_BUTTON, self.OnButton3Button, id=wxID_FRAME1BUTTON2) [/code] | |
How to activate file typ filter in wxPython file browser I am using wxFileDialog() call for file browsing,I want it to filter all unwanted files in display. | |
I was seeing if I could use python to delete a file upon reboot. I am only able to rename it at reboot, I can't figure out the syntax to set the destination to null. Below is what works to rename the file [code] import win32file import win32api win32file.MoveFileEx("test.txt", "test2.txt" … | |
Is there a way to do math with hexadecimal numbers in Python? | |
Hi guys! sorry if this question has been asked b4. I just wanna know what is the difference between a==b and a is b? Thanks | |
Is possible to display animated image?for example [URL="http://tibia.gamigo.de/images/monster/demon.gif"]this?[/URL] thanks:D | |
;) Hi I have the following problem. I'm building a web side, where user can upload a file, this file then need to be processed be a python scribt, to do this, I use wscribt.sheel run that run an external bat file. This works ok, BUT it look like if … | |
I had that problem a few days ago about running external python programs, which I know know can be done with [code]execfile("filename.py")[/code] But I now have a new problem.... Here is my program I am making for myself: [code]import random from Tkinter import * mainWindow = Tk() strGame="" def dieSimulator(): … | |
I'm having trouble with a module in my program that is supposed to read in the files in a directory and return those with the .xml extension. When I import the module from the command line it works perfectly and will return a different list as soon as I change … | |
Can anybody show me, how can we collapse, expand a pane/window in python? Thanks in advance for the help!!! | |
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] | |
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 … | |
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. | |
Dani, I just put up a tutorial about "Python and Multimedia" [url]http://www.daniweb.com/tutorials/tutorial47392.html[/url] I need to add just a small paragraph at the end, explaining how to play movies. Multimedia is a little incomplete without that. I don't seem to have editing privileges. | |
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 … | |
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. | |
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' … | |
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 … | |
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 … | |
[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 | |
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? | |
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] … | |
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. | |
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 … | |
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 … | |
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 … | |
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: | |
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? | |
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. | |
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 … | |
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] | |
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: | |
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] … | |
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 | |
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 … | |
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???????? | |
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 … | |
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 … | |
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 … | |
How do you loop through an entire year showing each day's date? | |
Hello All, I am developing a GUI application in wxPython on linux. I have to provide help menu describing tool's usage. I am not able to get any modules realated to this.Can anybody know how to develope help in wxPython? Thx, rajashree | |
Help, please, I need to configure IIS to use python I have tried the the microsoft link [URL="http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B276494"]http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B276494[/URL] and the netfirms [URL="http://urbanware.netfirms.com/python/pythonIIS.html"]http://urbanware.netfirms.com/python/pythonIIS.html[/URL]. I am running IIS6 on Windows serfver 2003 The site is [URL="http://gw102.coaps.fsu/httpdocs/example.php"]http://gw102.coaps.fsu/httpdocs/example.php[/URL] any help or thoughts | |
I need to make a high scores list to a game, for class, and it has to be stored using a pickled object. I can only get it to where it stores and prints one score, and then every time you play it the score gets overwritten. How can I … | |
What is the best way to establish a wxPython event handler for a mouse click, button and so on? I have looked at a number of sample codes and the event handlers differ all over the place. |
The End.