69 Archived Topics

Remove Filter
Member Avatar for sneekula

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.

Member Avatar for Vineetha_1
0
4K
Member Avatar for sneekula

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 …

Member Avatar for henri2398
1
653
Member Avatar for sneekula

You can accesss the clipboard simply by using the Tkinter GUI toolkit that comes with your Python installation.

Member Avatar for TrustyTony
1
14K
Member Avatar for sneekula

I have a Toshiba Satellite notebook with Windows7 OS. How would I go about it to replace Windows7 with Kubuntu?

Member Avatar for RobertHDD
0
166
Member Avatar for sneekula

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?

Member Avatar for RobertHDD
0
256
Member Avatar for sneekula

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.

Member Avatar for vegaseat
0
394
Member Avatar for sneekula

Draw a group of shapes on the Tkinter GUI toolkit canvas and animate the group using the common tag names.

1
5K
Member Avatar for sneekula

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 …

Member Avatar for vegaseat
0
2K
Member Avatar for sneekula

There used to be a Python module called pyglet that allowed graphics and sound. I can't find it anywhere.

Member Avatar for sneekula
0
256
Member Avatar for sneekula

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] …

Member Avatar for sneekula
0
260
Member Avatar for sneekula

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 …

Member Avatar for entropicII
0
45K
Member Avatar for sneekula

I need a function that returns True or False if an integer n is a prime. Any 'high speed' thoughts?

Member Avatar for wallars
0
1K
Member Avatar for sneekula
Member Avatar for sneekula

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?

Member Avatar for halamas
0
20K
Member Avatar for sneekula
Member Avatar for TrustyTony
0
6K
Member Avatar for sneekula

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.

Member Avatar for twekberg
0
325
Member Avatar for sneekula

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]

Member Avatar for Stefano Mtangoo
0
562
Member Avatar for sneekula

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, …

Member Avatar for Mathhax0r
0
1K
Member Avatar for sneekula

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.

Member Avatar for pdxwebdev
0
1K
Member Avatar for sneekula

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.

0
234
Member Avatar for sneekula

Does anyone know a good internet site where I can 'park' my Python code? Easy download, upload, and search.

Member Avatar for zachabesh
0
203
Member Avatar for sneekula

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 …

Member Avatar for Xlphos
0
184
Member Avatar for sneekula

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 …

Member Avatar for MaxVK
0
332
Member Avatar for sneekula

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 …

Member Avatar for sneekula
0
151
Member Avatar for sneekula
Member Avatar for Ancient Dragon
0
104
Member Avatar for sneekula

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': …

Member Avatar for jrcagle
1
245
Member Avatar for sneekula

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 …

Member Avatar for sneekula
0
118
Member Avatar for sneekula

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 …

Member Avatar for chris5126
0
154
Member Avatar for sneekula
Member Avatar for sharma_vivek82
0
196
Member Avatar for sneekula

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 …

Member Avatar for sneekula
0
758
Member Avatar for sneekula
Member Avatar for aot
0
3K
Member Avatar for sneekula
Member Avatar for vegaseat
0
118
Member Avatar for sneekula

I know that you can do integer calculation in Python with astronomically large numbers. What is the precision limit when using floats?

Member Avatar for vegaseat
0
165
Member Avatar for sneekula

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?

Member Avatar for sneekula
0
161
Member Avatar for sneekula
Member Avatar for sneekula

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. …

Member Avatar for jbennet
0
212
Member Avatar for sneekula

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?

Member Avatar for sneekula
0
1K
Member Avatar for sneekula

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?

Member Avatar for sneekula
0
1K
Member Avatar for sneekula

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?

Member Avatar for vegaseat
0
114
Member Avatar for sneekula

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?

Member Avatar for vegaseat
0
136
Member Avatar for sneekula

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, …

Member Avatar for jrcagle
0
230
Member Avatar for sneekula

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 …

Member Avatar for vegaseat
0
3K
Member Avatar for sneekula

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 …

Member Avatar for vegaseat
0
106
Member Avatar for sneekula

I want to make a Tkinter button respond to a left and right mouse click differently. How can I do this?

Member Avatar for vegaseat
0
8K
Member Avatar for sneekula
Member Avatar for sneekula
Member Avatar for sneekula
0
12K
Member Avatar for sneekula
Member Avatar for Ene Uran
0
13K
Member Avatar for sneekula

I like to create a database of common chemicals with Python. How would I go about that? Any help welcome!

Member Avatar for Ene Uran
0
119
Member Avatar for sneekula

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.

Member Avatar for vegaseat
0
19K
Member Avatar for sneekula

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?

Member Avatar for sneekula
0
195

The End.