7 Reusable Code Snippet Topics

Remove Filter
Member Avatar for
Member Avatar for vegaseat

You can put an image and text on a Tkinter button widget. This small code shows you how. The GIF image file you want to use for the button should be in the working directory, or you have to give it the full path. Incorporate the Python Image Library (PIL) …

Member Avatar for neon_3
1
23K
Member Avatar for ddanbe

Some time ago, I needed to know the pathname of my running application, in order to create a temporary file. As it seems ther are alot more options than I thought. So I applied all I could find in this little snippet. I also used the full names to make …

Member Avatar for Teme64
1
2K
Member Avatar for vegaseat

This AVI file player has some nice features like adjusting size and speed. The program uses the standard MSvfw32.lib (called libmsvfw32.a in the DevCPP lib directory). Another example of using BCX to translate to C code and modify to something Dev-C++ can handle. Enjoy!!!

Member Avatar for triumphost
0
4K
Member Avatar for vegaseat
Member Avatar for kostas89
2
12K
Member Avatar for jwenting

Similarly, you can add more fields to an enum and simply provide accessor methods to retrieve them. For example you could change it to have an extra field indicating an output directory to write specific types of data to, and a getter method to return that directory.

Member Avatar for jwenting
0
243
Member Avatar for TrustyTony

I made this program during forum discussion for accessing configuration relative to module directory, not main program's position (which can be accessed by sys.argv[0]'s directoryname). As the thread is closed I post my proves as code snippet.

0
990
Member Avatar for TrustyTony

This problem came up in one thread and here is my finalised version to follow changes of files in list of paths given.

0
714

The End.