15,175 Topics
| |
Implementing Save algorithm Postby Apostle on Fri Sep 04, 2009 4:48 pm Hello All, I have a project of allowing user to save guests in Guest Book. I use Python/wxPython/SQLite for that. I Have implement basic database operation as well as GUI. I can save to DB as well as … | |
Hi, I have written a simple chat server and a client that can connect to it. To make it more secure, I would like to add SSL to the connection process. How would I go about doing this? Thanks in advance. | |
I am trying to create a sudoku checker as my second project. Its not going well :D. So far i've got it to check for rows that are 9 digits in length - i'm not sure if that's correct.. [code]puzzle = [] row = raw_input() while row: puzzle.append(row) row = … | |
| Can anyone help me. I am trying to create a audio frequency analyzer, that will look for specific frequencies in a wav file. TIA |
I'm very new to python, as you will discover with my newb question, I am trying to create a project that prints out Ascii Banners EG _________ _________ _______ _______ _______ |\ /|\__ __/ \__ __/|\ /|( ____ \( ____ )( ____ \ | ) ( | ) ( ) … | |
I want to copy a file to the clipboard. So if the user of my program goes into a directory or want to send the file attached in an email, they can just paste the file into the directory or email. I understand how to copy the file to another … | |
How do I pass an instance of a class to the __init__ method of another class so that I can access it's variables? eg: [CODE] class my_class: variable=0 variabletwo=9 a=myclass()[/CODE] How do I access the "variable" field of "a" from another class? I could write something like a.variable but that … | |
I understand that python provides a value for self when methods are called on the instance of a class. However, I don't understand how self works when assigning value to a variable of instance. [CODE] class snake: def __init__(self,name): self.name=name#this is the bit I don't understand. How is self.name #interpreted … | |
Hi All, I am trying to build an ISO for a python project on a Fedora environment. I want to make my iso secure by not including source file code in it. Is there any way to generate a rpm for my source code that do not contain any .py … | |
Are there any Python modules that convert strings to binary? (like [url=http://www.nickciske.com/tools/binary.php]this[/url] site) I googled 'python ascii to binary' and I found binascii but I can't figure out how to use it, well I don't think it's what I'm looking for. My plan is to write a script that takes … | |
If you’re a Ruby or Python developer building AJAX applications, you’ve got to learn JavaScript. Even if you’re converting Ruby code to client-side JavaScript with a tool like [URL= http://www.scribd.com/doc/220397/RJShow-it-works] RJS[/URL], it can still be helpful to know the AJAX component for adding features and debugging. Now Microsoft is promoting … | |
Marc Andreessen may not have actually been knighted for his contributions towards making the web what it is today, but if he were British then I am sure Helen Mirren would have bestowed that honor upon him alongside Sir Tim Berners-Lee. Not that a lack of a knighthood is stopping … | |
| The user enters the full location of a file and the program determines whether the file is a sound file or an application and opens it after a user specified time. Example: Location: C:\Where ever\file.mp3 OR C:\Another Where Ever\prog.exe TIme(in mins): 10 |
| A program which accepts a sentence from a user, and uses a [I]'for loop'[/I] and determines the longest word in the sentence entered. |
| A code snippet which accepts a word or a sentence from a user, and then sorts it, and displays the sorted list. |
| The user enters their first, middle and last names and the program prints their full name. |
| this is code that thanks to vegaseat helped me convert my programs into python30 |
This is a simple program and all it does is fiddle with the registry and set the value of the desktop background to be the bmp file that you supply in the function. There are other things you can do with the windows registry, this is just one of the … | |
A brute force method. Finds the FIRST and SHORTEST periodicity in the input list. | |
This snippet defines a cachedProperty decorator. A cached property differs from a property in that it's value is only computed the first time that the property is accessed and then stored in the object's dict for later use. If the object's attribute is explicitely deleted, it will be computed again … | |
This snippet defines a function [icode]patfilter(pattern, rule, sequence)[/icode] which implements filtering a sequence of strings according to various criteria. The output is either a subsequence of strings, or a sequence of match objects. | |
Many threads in daniweb's python forum deal with menu based programs which run in a terminal. This snippet defines a handy class, MenuCrawler, to help writing such programs. Subclassing from this base classes and adding methods corresponding to a given set of menus allows one to build the menu-based application. … | |
This snippet defines a class which can group a collection of strings according to a given set of prefixes. Each string goes in the group of the longest prefix it contains. | |
This snippet allows your code to use the Mendeleiev's periodic table of elements. It defines a single function [icode]mendeleiev_table()[/icode] which returns the table as a python list of lists. | |
If you're not used to work with the standard module logging, this snippet will allow you to incorporate a logger in your application without effort. It gives you a starting point before you try to use more sophisticated features of the logging module. | |
Here is an example how to write a program to convert between units of distance, area, volume, weight, pressure, and energy. The wxPython GUI toolkit's wx.NoteBook() widget is used to make good use of the limited frame/window space available. | |
This is a command line utility which lists the names of all functions defined in a python source file with a [icode]def <name>[/icode] statement | |
A variation of the previous bouncing ball code. This time the upper left corner of the image rectangle simply follows the position of each mouse click. Use an image you have, in my case I used a small red ball in a black background. A simple code to experiment with. | |
Hey guys. I originally wrote this program as a University assignment. It's basically a simulated game of 'tanks' roaming around a grid blowing eachother up. It isn't intended to be the most exciting game in the universe, infact when you look at the programs' output there will just be a … | |
Returns the power set of the elements of a given list (even if some of those elements are also lists). |
The End.