15,181 Topics
| |
Hi all, How can we load contact thumbnail ?? I want to fetch it and preview it on canvas . thanks in advance. | |
Hi all, What tool can i use or what ways can i deploy to allow me to combine c# with python or vice-versa. Please let me know of any tools or way which you all had done it before because i had serch quite alot but i still cannot make … | |
I'm stuck on the fifth stage of my assignment, the question is; 'Add in code to the key-press event handler so that the 'person' is constrained to move within the array and cant' walk through a wall.' I'm not sure how i'm supposed to update the curindex, i really need … | |
Hi! I've searching for python IDE's and I've not found anything like NetBeans for java. I downloaded Dr Python but was too simple, I tried to install PyDev on Eclipse but I got some errors. I saw some screenshots about SPE and I said whoa! that seems good, but I … | |
Alright, making a dice roller...because I need a dice roller. Anywho, in the process of testing it came across an exception that I can't figure out how to remedy. The exception gets thrown at line 33 below: Source code: [CODE]import random #PUT FAILSAFES IN THIS FUNCTION. #gets dice information def … | |
I've been using the Aspects module to trace and patch routines on the fly in my wxPython app. The problem I've run in to occurs when wx binds an event to a function. ie: an event is binded to function <function func at 0x03969A30> after aspects.with_wrap() func now becomes <function … | |
I'm trying to program Tic-tac-toe. When I run my program, the X's and O's pop up in all sorts of strange locations, and they don't "settle" into their proper positions until the very last move of the game. Here is my code: [code]'''Tic-tac-toe. ''' from Tkinter import * SQU_SIZE = … | |
How do I a add a copy and paste function in a Tkinter text widget? | |
Hi, I have a for-loop, and in each iteration I have to open a dos-command. I use the subprocess module for this: [code=python] fid1=open("test.txt", 'w') p=subprocess.Popen(args, stdout=fid1, stderr=subprocess.STDOUT, shell=True) fid1.close() [/code] The output of the dos-command is written to the txt-file, but I still need to terminate the process p. … | |
Hi, i'm searching for a way to know the hostname of a machine connected to my twisted-server. I use to know the host the method self.transport.getPeer().host, and i have the IP in this way. But i need to know the hostname. I'm searching for a way like socket.gethostname(). Waiting your … | |
Recently I have been writing my own Python editor for fun. I have came pretty far but now I have some issues. My editor object is in my notebook but wont go to the bottom of my window. I can get it to expand across the screen but not down. … | |
| Hi all this is my code :- [CODE]import pygame from pygame.locals import * from sys import exit from random import * pygame.init() screen = pygame.display.set_mode((640, 480), 0, 32) while True: for event in pygame.event.get(): if event.type == QUIT: exit() screen.lock() for count in range(10): random_color = (randint(0,255), randint(0,255), randint(0,255)) random_pos … |
Hi guys, i have a problem here i have a situation where i need to save all the images opened using PIL I have no idea how to do without displaying images on screen one by one and saving them Can anyone please help how to save them without switching … | |
What do I need to do to make rules for user input? Say I want the user to choose a number 1-5. If they pick one, I want to go to the next step. If they don't I want to tell them that they have to pick a number between … | |
Hello, I have written this code, deleting those parts which are no needed to reproduce the error: [CODE]#! /usr/bin/env python # TestDialogs.py import wx, MySQLdb, wx.lib.intctrl, wx.grid ID_SPECIES=1 class SearchDlg(wx.Dialog): def __init__(self): wx.Dialog.__init__(self, None, -1, 'Search species', size=(400,400)) panel = wx.Panel(self, -1) vbox = wx.BoxSizer(wx.VERTICAL) hbox1 = wx.BoxSizer(wx.HORIZONTAL) hbox2 = … | |
Hello! I have designed a dialog that shows a wx.Grid with some data (full code at the end). Then, there is a search area. The other buttons are not working now. When you fill any search control with some data shown on the grid, it prints the index where the … | |
Hi I am VERY new to python. I am trying to write a function that returns lines from a text file to a new file. I can't seem to get it right. So far my code looks like this: [CODE]def seperate_atoms(f):#Enter .pdb file in with quotations myfile=open(f,'r') crudepdb=myfile.readlines() cleanpdb=[] for … | |
I'm currently learning Python, and at the moment I'm writing a simple grocery list program. At one point in the program, the user is asked how many items are on their shopping list. What I want to do is take the number that the user inputs (lets say it's 5), … | |
Here's the problem. I'm using pythons re-functions. I'm supposed to make a re-function to check if a string ends with 3 numbers(or more) before the extension.(e.g. 123.txt, 93821.ini) Here's my code that's supposed to do the magic [code] re.search('[0-9][0-9][0-9]\.','1234.txt') [/code] now, this doesn't work out. And I have no clue … | |
Hey I've released the first alpha of a project of me called Minimal-D It's meant to combine at least 3-development aspects: -text-editing -file browsing -ftp uploading/downloading (-sql) I combine these three in a simple,lightweight and small program and I want to know what you think about it... You can see … | |
I'M reading the book "Beginning Game Development with Python and Pygame". The book showed me how to calculate the distance between two points using vectors. It first explained that you just subtract the values in the first point from the second. But just page or two pages later it says … | |
[CODE]class Vector2(object): def __init__(self, x= 0.0, y = 0.0): self.x = x self.y = y def __str__(self): return "(%s, %s)" % (self.x, self.y) @classmethod def from_points(cls, P1, P2): return cls( P2[0] - P1[0], P2[1] - P1[1] ) A = (10.0, 20.0) B = (30.0, 35.0) AB = Vector2.from_points(A, B) print … | |
Hi guys! I'm writing my first small application*. For this I'm using Sqlite as database, Glade as GUI builder and Python as coding. The application is pretty simple: it's a notebook to store names, surnames, adresses, etc.. I've been able to create a first window to store data in Sqlite … | |
using wx python.got black bars instead of unicode characters in gui window. [hint]:My interpreter gives error- [COLOR="Red"]Unsupported characters in input[/COLOR] | |
Scanning from a laser line and usb cam V Python fill up memory to 1.6G and crash the system Smaller Scan works fine is there a better plotting module or a way of getting past V Python memory block? The plot must happen in color xyz rgb. [CODE]import thread import … | |
Here is code which I wrote to experiment how hard it is to get Royal Flush in Poker. | |
Trying to get a program to fine the slope and intercept of a line on a graph.... I've got it all working so far...except the last line. I broke it down into pieces and ran it assigning numbers to the variables, but in the program, it doesn't work. Here is … | |
Best way to parse this webpage private info: [url]https://ee.ekool.eu/index_et.html?r=2#/?screenId=g.user.login&err=1[/url] I found Beautiful soap and PyKhtml. What is the better? | |
I am currently trying to take two columns from a *.csv file... log10 transform them, and then plot them up on a graph. The graph is not the issue, I just need to edit those two columns and plot them. The file does have a header row, there are 8 … |
The End.