52 Discussion / Question Topics
Remove Filter Does anybody have a good example of a Functor in Python? | |
In my journey to find a new programing language to learn, I found Nimrod. According to the spiel on its web page: "Nimrod combines Lisp's power with Python's readability and C's performance." Just curious to know if anbody here has used it? Nimrod's home is at: http://nimrod-code.org/ | |
I was trying to come up with a dictionary of functions, but get it not to work. | |
There seems to be many ways to create a dictionary, which one do you prefer? | |
The 45th annual edition of the Super Bowl in American football will be played on Sunday February 6, 2011, at the Cowboys Stadium in Arlington, Texas. It will pit the AFC champion Pittsburgh Steelers against the NFC champion Green Bay Packers to decide the NFL champion for the 2010 season. … ![]() | |
Just curious how you got started. For me it was science class that used Python as the main tool. | |
[code]#Blast workbench using biopython from Bio.Blast import NCBIWWW ##result_handle = NCBIWWW.qblast("blastn", "nr", "8332116") fasta_string = "AATTCAGTGGCAAAAAAAAAACTCAAATTTTAGGGAAGGCCCTAATATTATCAAATAATTAGAGGGGGGG" result_handle = NCBIWWW.qblast("blastn", "nt", fasta_string) save_file = open("my_blast.xml", "w") save_file.write(result_handle.read()) save_file.close() result_handle.close() result_handle = open("my_blast.xml") from Bio.Blast import NCBIXML for record in NCBIXML.parse(open("my_blast.xml")) : #We want to ignore any queries with no search results: … | |
I am starting to play around with IronPython, but I can't figure out how to convert any code to executable file that will run on Windows. There has got to be some kind of batch file. | |
Many new computers come with Windows7(64bit) OS. You will be tempted to install something like Python 3.1.1 64bit version. However, many packages like PyQT and PyGame don't offer 64bit versions yet and will not work! | |
What is more efficient? 1) import math 2) from math import * 3) from math import sin, cos | |
Is there a good way to access browser like IE and run an HTML file from within Python code? | |
Out of the corner of my tearful eye I noticed that I made my post #1000! I am elated, exhilarated, jubilant, overjoyed, ecstatic and happy! Time to get that 12 year old wine out of the cellar. | |
| |
Here is your chance to post some silly law you know of. I found some gems: The Royal York Hotel in downtown Toronto is required by law to stable your horse. In England mince pies cannot be eaten on Christmas Day. In Britain a pregnant woman can legally relieve herself … | |
Is there a way to limit size of a list in Python, so it does not use all memory? | |
How do I best get a full display screen window using wxPython? | |
Decided to start my own thread rather than hijack thread "Sorting" I followed ghostdog74 advice and used module re to extract numeric strings: [php]import re data_raw = """[20] [ 35+ ] age = 40 (84) 100kg $245 """ # use regex module re to extract numeric string data_list = re.findall(r"\d+",data_raw) … | |
I read in the news that Python in going from version 2.4 to version 2.5 fixed 450 bugs. That seems to be lots of bugs! I used Python a lot and never found a single one of those bugs. What is your experience? | |
I wrote this little code to test a 2 dimensional array. Given the array array[row][col] I can find total_columns, but I am at loss to figure out total_rows. [code]// 2 D array #include <iostream> using namespace std; int main() { int row, col, total_columns; // two dimensional array in the … | |
Why is there a tuple and list in Python. They seemed to perform similar things. | |
I need to know how many times my function has been accessed in my program. Any suggestions other than global variable? | |
This small program is neat: [CODE]import calendar calendar.prmonth(2006, 3) """ March 2006 Mo Tu We Th Fr Sa Su 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 … | |
I am making progress learning Python. and English. I understands tuples, lists and dictionaries, but sets don't make muchly sense. Why use a set? What is a set good for? | |
I am trying things with wxStaticText (a label). I can chnage background colour, but not the text colour: [code]import wx class MyPanel(wx.Panel): def __init__(self, parent, id): wx.Panel.__init__(self, parent, id) str1 = "Camembert cheese is the best!" self.label1 = wx.StaticText(self, -1, str1 , wx.Point(15, 30)) self.label2 = wx.StaticText(self, -1, str1 , … | |
The Internet has many animated GIF files, they are funny to watch. Does Python have a way to play those? I am asking to much? | |
A somewhat strange find in the Pyton Code Snippets here on this site. Is the BOO language very much like Python? It seems nice that one can compile and interpret the same language. Will it be worth to translate Python code to BOO just to get a nice small exe … | |
I did find the Python code snippet on PMIDI module here. It works fine and I have made some interesting sounds with it. Is there way to save this as sound file? | |
Is there a function in wxPython or anything that can creat a variable frequency sounds? | |
I want to creat file with each line having date + time + data so I can append more data as need be and know when it was added. What date+time function would be best? | |
I have run the slider demo that come with wxPython docs. It is rather stupid, as it puts slider on a panel using many unexplained numbers, never tells how to get position of slider or what to do next if the slider is moved. I am much lost, does anyone … | |
I can not figure out the order of dictionary keys, they seemed not to be sorted. Any insight? | |
Okay I have copy and pasted the code from the tutorial on the jpg image [url]http://daniweb.com/techtalkforums/thread33791.html[/url] onto my IDE editor. This time no problem with indents! Now I need to know how to instal required wxPython. I have Windows XP, also Python 2.4. Where do I best get free wxPython … | |
I have read the tutorial about Python and JPEG here, but there si no mention about showing the actual picture! | |
Is there a good way to invert dictionary so key:value gets to be value:key? | |
Is there a ways to merge two similar dictionaries, and what happens if the key words clash? | |
Does Python have something like peek(memory) and poke(memory) of other languages that read and write to memory addresses directly? | |
What are the ways to find substring in string in Python? Which way is most effiecient? | |
What is the best way to sort a list of words with the case insensitive? | |
I hear a lot about PyGame for writing games and that I understand is SDL in a Python coat. Is DirectX used in a similar fashon? Any examples? | |
Is const void* p the same as a null pointer? Why would i use it? | |
I need to write about a half one page instruction string for one of my C++ programs. How do I do this best, so I can read it in the code and easly update it later. I have tried concatinating, but that makes corrections tough on the wrapping edge. | |
I am just starting to look at writing class in Python. Can a class that I write inherit Python calendar? | |
Does anyone have a meaningfull example of the use of the Profiler included in Python? | |
I know that lambda is some kind of function in Python. What does it do? Why would one use it? | |
I hope the spelling isn't too far off, but what is list comprehension statement and why would one use it? | |
Is there a way one can interrupt the sleep() function with a key press in Python? | |
Python is relatively new to me. I have mostly programmed in C and C++. I read that Python has a good build-in debugger, but I can not understand the information in the reference manual. Can anybody please give an actual commented example how this works. | |
I have read vegaseat's "Projects for the Beginner" sticky and got really interrested in the eqaution solver for physics or mathematics problem. I just need a little Python hint how to get this started. | |
I know Python has adopted Java's decorator, but I can not make much sense from the reference manual example. It would be nice if soemone could give a good example of the implimentation of a Python function decorator. | |
Can I wrote an object to files and later on retrieves it with its integrety intact? Is there a ready made function or do I have to write one? I am new to Java, is this what one calls serialization? |
The End.