69 Archived Topics
Remove Filter In the last couple of threads people have used the Python class, but really don't seem to know how to use them properly, or why to use them. Hence my question: "Why would you use a class in Python?" I though only Java forces you to use OOP. | |
I got infected right after a Java and Adobe update on my Windows7 machine. folder \jnihmpibahpjjmcodbopcpdaelkbpjnc is most likely a random generated folder. Note on malware **PriceLess** (pops up as Chrome extension, highlights strings for ads): PriceLess is in folders: C:\Users\HomeGroupUser$\AppData\Local\Chromatic Browser\User Data\Default\Extensions\jnihmpibahpjjmcodbopcpdaelkbpjnc\5.2 C:\Users\HomeGroupUser$\AppData\Local\Comodo\Dragon\User Data\Default\Extensions\jnihmpibahpjjmcodbopcpdaelkbpjnc\5.2 C:\Users\HomeGroupUser$\AppData\Local\Google\Chrome\User Data\Default\Extensions\jnihmpibahpjjmcodbopcpdaelkbpjnc\5.2 C:\Users\HomeGroupUser$\AppData\Local\Google\Chrome SxS\User Data\Default\Extensions\jnihmpibahpjjmcodbopcpdaelkbpjnc\5.2 … | |
You can accesss the clipboard simply by using the Tkinter GUI toolkit that comes with your Python installation. | |
I have a Toshiba Satellite notebook with Windows7 OS. How would I go about it to replace Windows7 with Kubuntu? | |
On Windows7 I am trying to read file C:\programdata\microsoft\application virtualization client\SoftGrid Client\sftfs.fsd using a Python program, but I get a PermissionError. How do I get permission? Why does folder programdata not show in the Microsoft file manager/explorer? | |
On my Raspberry Pi computer I did a search for PIL and matplotlib with apt-cache search python but could not find anything close in the list. Is PIL/Pillow and matplotlib available for Linux and what is it called? The Raspberry Pi has Python27 and Python32 installed. | |
Draw a group of shapes on the Tkinter GUI toolkit canvas and animate the group using the common tag names. | |
I have a tkinter program like the one below (for example) and want to create an executable file using module cx_freeze. I am using Python33 and Windows7. # Tk_circle2.py # draw a circle with given center (x,y) and radius # tkinter normally needs a specified square try: # Python2 import … | |
There used to be a Python module called pyglet that allowed graphics and sound. I can't find it anywhere. | |
I would like to break up a list into sublists of 3 elements each. I have this code, but it will give an index error when the length of the list is not divisible by 3. mylist = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] … | |
I asked that in another thread, but it got lost: [QUOTE]When do you use root.quit() and when do you use root.destroy() to exit a Tkinter program?[/QUOTE] Also, can you intercept an exit when you use the little x in the title bar, just to affirm that you really want to … | |
I need a function that returns True or False if an integer n is a prime. Any 'high speed' thoughts? | |
Is there a way to read Adobe PDF files with Python? | |
I need to read in a text file, replace selected words and write the changed text back out to a file. Is there an easy way with Python? | |
Is there a reliable way to 'pluralize' english words with Python? | |
I have a text I want to search for all it's upper case letters, then present these letters unique and sorted. I welcome any suggestions. | |
How would you make a simple bar graph from a list of data? [code]data = [20, 15, 10, 7, 5, 4, 3, 2, 1, 1, 0] [/code] | |
I was trying to create a 3x3 list of lists, and came up with this surprising behaviour: [code]# creating a 2D list with an overloaded * operator mlist3 = [[0]*3]*3 print mlist3 # [[0, 0, 0], [0, 0, 0], [0, 0, 0]] mlist3[0][0] = 1 print mlist3 # [[1, 0, … | |
I am still rather new to the Linux OS and need some detailed advice on the installation of Python3.1 on my Ubuntu machine. Python3.1 is not in the Ubuntu package repository yet. | |
If you own a stopwatch, here is your chance to benchmark the various versions of Python on recursion performance. The Ackermann function gives the old computer quite a workout. | |
Does anyone know a good internet site where I can 'park' my Python code? Easy download, upload, and search. | |
I have an HP DV9000 notebook with Vista, and created a Knoppix 6.1 live Linux Flashcard. I can boot it up and select Linux, but the 'wirless' switch will not activate, even so physically it is in the on position. It almost looks like there is a software( HP Wireless … | |
I just bought an inexpensive used Dell notebook that has Ubuntu/Linux as an operating system. Compared to Vista this is sweet. It came with Python25 installed, but it was easy to use the Add/Remove application feature to get open source software from the Ubuntu site. I downloaded/installed Stani's Python Editor … | |
Every now and then Vista comes up with a "Program Compatability Assistant" popup window (see image) when you want to run a .exe file. If you make the mistake, like I did, and agree with the Administrator option, then from hence foreward everytime you want to run this particular executable … | |
What's the preferred way to pass a string to and from a function? | |
I have a dictionary of chemical symbols and names, to look up the symbol and get the name is easy, but to find the symbol of a given chemical name seems to be more akward. Am I missing something here? [code=python]# small dictionary of chemical symbols symbol_dic = { 'C': … | |
I want to make a small Molecular Weight calculator. If the user for instance enters the molecular formula for dichloro-benzoic acid as "C6H3Cl2COOH", I would like to split it into a list like ['C6', 'H3', 'Cl2', 'C', 'O', 'O', 'H'] so I can then combine all the carbons, chlorines, oxygens … | |
I have an HP notebook with Windows Vista. I slowly got used to the childishness of Vista, but I cannot get used to the surprise upgrades. You are in the middle of something on the internet, then all of a sudden the program shuts down, the screen goes gray, after … | |
I want to see if a certain word is in a text file, how do I go about that? | |
The last time I posted a question here, I got a rather nasty response, so please just constructive stuff! I want to make a scrollable entrybox for Tkinter GUI, the scrollbar shows up and works, but text does not move. Am I missing something? [code=python] import Tkinter as tk root … | |
How can I let the Tkinter Button command do more than one function? | |
How can I best find out how many times a word appears in a text? | |
I know that you can do integer calculation in Python with astronomically large numbers. What is the precision limit when using floats? | |
I know you can get the present time this way: [code]import time now = time.asctime(time.localtime()) print now # Mon Feb 19 10:41:32 2007 [/code]How can I make sure that 'now' does not fall on our lunchtime break, let's say 11:30AM to 12:45PM? | |
How would one create a simple spreadsheet with Tkinter? | |
This could be a cooking recipe, but in my case it is a chemical recipe. Here is a typical generic chemical recipe: 23 g chemicalA is dissolved in 250 ml methanol. The solution is cooled to 0 - 5 degC and 18 ml compoundB is added dropwise over 60 minutes. … | |
Is there a way to preselect/highlight a listbox item with the Tkinter GUI toolkit at the startup of the program without clicking the mouse on it? | |
I keep reading threads here, some use the Tkinter GUI toolkit and others use the wxPython GUI toolkit. Why would one use one or the other? | |
The department's computer has Python 2.4 and on my home computer (really my dad's computer) I installed Python 2.5. Is it possible to have Python 2.4 and Python 2.5 on the same computer? | |
Since there is so much discussion on one of the threads on zipping/unzipping files and all the associated incompatibilities, is there a way to do this with Python and cut out the middleman? | |
I know that one has to be careful with mutable arguments like lists applied to function calls, so that things like this won't accidentally happen: [php]def add_item(list2): list2.append(99) return list2 list1 = [1, 2, 3] list3 = add_item(list1) print list1 # [1, 2, 3, 99] oops! print list3 # [1, … | |
I took a mixed type list and set out to find the min and max values. The results are very surprising to me: [php]mixed_list = [11, 'Dick', 12, 'Mary', 7, 'Zoe', 9, 700, 777, 'Paul', 13456789] mn = min(mixed_list) mx = max(mixed_list) print mn, type(mn) # 7 <type 'int'> print … | |
I was experimenting with the nested list example in thread: [URL]http://www.daniweb.com/techtalkforums/post246791-72.html[/URL] and was trying to search a nested list like that: [code]nested_list = [1 ,'Dick', 2, ['Mary', 7, 9, [700, 777, 'Paul']], 13] if 'Paul' in nested_list: print 'found Paul' else: print 'Paul not found' [/code]It always tells me that … | |
I want to make a Tkinter button respond to a left and right mouse click differently. How can I do this? | |
How do you best swap the key:value pair of a dictionary? | |
How can I make a Tkinter window take up all my display screen area? | |
How can I best center a Tkinter window on my display screen? | |
I like to create a database of common chemicals with Python. How would I go about that? Any help welcome! | |
This came up on Chris99's bus ticket program thread. Would like to see any simple examples on how to pass variables between classes without using global variables. | |
As you can see, I am playing around with the Tkinter GUI toolkit. How can I keep a number of widgets fixed in a location even when the user expands the window? |
The End.