15,181 Topics
| |
what are your thoughts and is it original? [CODE]using ratios to retrieve relevant pixel data (note would be good for greyscale) 255,255,255 ... 255+255+255=765 ... 765333 = 765 / 3 = 255 ... program know it means 255,255,255 123,245,32 ... 123+245+32=400 ... 400-3.25,1.63.12.5(<--- problem) |400-(3.25)-(1.63)-(12.5) = 400 / 3.25=123.08 -- … | |
hi to everyone, im having trouble with python programming... i have these 3 problems.... 1. remove a duplicates in a sorted integer 2. a python program that will detect if a number is divisible by 3 if you have solutions for my problems, can you help me pls... | |
Hi, I have a file which contains lines in a unformatted way, from that file I would like to take the value of ID=xxxx which can be in the beginning of the line or at the end or in the middle sometimes inside the brackets and repeated multiple times in … | |
This script is something i wrote during work, as I often need to do this (concatenate strings via multiple lines so it's clearer). Hopefully you guys like it. | |
Hello! I have been playing around with python and mysql, and I have started thinking about creating a database to record my bird sights. For connection purposes, I have programmed this class [CODE]class LoginDlg(wx.Dialog): def __init__(self): wx.Dialog.__init__(self, None, -1, 'Login to Ornithobase 1.0b', size=(250,150)) def comboLogin(): import MySQLdb db= MySQLdb.connect(host='localhost', … | |
hey, i'm doing my project in python..our task is to extract keywords using lda and ctm model...i know the general extraction methods..but no idea using these two models..can u pls help me out... | |
Ok.. so I just started python (just = 3 hours ago). I have basic input and output set. Hell I even understand slicing and stuff (OMG SUBSTRINGS SO MUCH EASIER ON PYTHON :O ) but Im finding it not so easy to understand how to use for loops (silly me. … | |
[B]Context[/B] I'm retrieving data from Google Analytics (via the python-googleanalytics library, as Google's API is way too complex for me right now) and putting that data into a table using an HTML library. Python experience: very low. [B]Problem[/B] I have this: [u'string', u'string'] [integer] [u'string', u'string'] [integer] [u'string', u'string'] [integer] … | |
Hi. I want to sort the keys of my dictionary. The keys are consisted of list of 3 different numbers, for instance - (0, 5, 0) So I want to sort them first over key[2], then over key[1] and then over key[0] Then to print the value accorfing to the … | |
Hello! I have defined a function to create a combo box to log into a database [CODE]def comboLogin(): import MySQLdb db= MySQLdb.connect(host='localhost', user='root' , passwd='acrsci00', db='Ornithobase') self.cursor = db.cursor() sql = '''select Username from Users''' self.cursor.execute(sql) result = self.cursor.fetchall() result2 = [] x = 0 for record in result: for … | |
Looking for 'unqualified exec is not allowed in function' lead here... This is a collaborative thing... so here's all of the code (some parts just description of eventual 'future' implementation) for a [I]universal code parser[/I] (biiig name for a smaaaall thing, that is not working at all yet, and is … | |
im trying to make it so that the discount box will only accept numeric input to 2dp, and i know the code is roughly solid, but when i run the code, it says CashTransaction has no attribute discount input, and i have been tinkering with this code for the better … | |
Hello daniweb I am currently trying to convert one of my finished python games to a working executable file for windows, which proves harder than expected even though the py2exe side-package is avalable. The program i'm trying to convert is [URL="http://dl.dropbox.com/u/2905284/The_Pirate_Game_v1.1.2.rar"]The Pirate Game[/URL]. I create the standard file for using … | |
Hello Python community :) This is my first post so don`t judge strictly. I need the user's client to start, so that the user may edit the message and decide himself whether he clicks on the Send button to really send it. I have searched on google and most code … | |
Been a while since I posted anything here, so I decided to post what I've currently been working on. I use ImageChops to get a difference between two consecutive frames from my webcam. I would like to replace the pixel values > rgb 50, 50, 50 with 255, 0, 0. … | |
Been banging at this all day HELP! I had to go back to Python 2.5 from 2.6 and now everytime I try and run my setup.py py2exe it gives me the error that it cannot find the python26.dll. I have uninstalled and reinstalled and even went into the registry and … | |
Hello! I have this function that prompts a wx.MessageDialog [CODE]def DelUserDlg(self, event): dlg = wx.MessageDialog(None, 'Are you sure you want to delete your user?', 'Question', wx.OK | wx.CANCEL | wx.NO_DEFAULT | wx.ICON_QUESTION) dlg.ShowModal()[/CODE] I would like to assign an event to delete a mysql database user. How can I assign … | |
Hey guys, I posted earlier about py2exe not working in general. Now I got it to actually run, but the .exe produced does not work... Any help would be appreciated. Thanks. Info: I've tried various things to solve this issue, but no luck. When I run my setup.bat file, which … | |
Using py2exe I've made an exe file which processes a file then creates a new file which details the errors found in the original file. However, at the moment I have to change the file allocation in the code each time I want to do it on a different file … | |
First of all, thank you for taking the time to read my question. With the following code, what I have done is make a database in MySQL and created a table using python. I then imported an excel document with three columns. These three colums are: 1. POS_TYPE which is … | |
how do i print the 3 most common word that begins with capitals? also how do i count how many times they appear? | |
>>> import g4 >>> g4.systs() Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'systs' Why is that ? The code works ok from shell >>> import time >>> def systs(): return str(time.localtime()[5]) >>> systs() '18' g4.py ------- [CODE] import os import … | |
Hello everyone, I am currently working on a code and I got stuck in a part. My algorithm is a text generator that operates on project Gutenberg and its flow is like this: Enter a sentence as input 1-Pick longest word of input sentence 2-Search the longest word of the … | |
After importing the script below as g4.py as >>import g4 followed by >>> pad ="ram:t/list.lha" >>> g4.extract(pad,"path") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "g4.py", line 52, in extract return takeaction.get(itemnw,errhandler)(fromvar) TypeError: errhandler() takes no arguments (1 given) This error does not appear when i … | |
Hi, i have downloaded 3d blender and Python 2.5 and tried to run Python with blender for the use of importing models, but when i tried to import the model a message came up in the command prompt saying : [CODE]module use of python25.dll conflicts with this version of python[/CODE] … | |
I'm new to python and programming in general but I'm looking into off site backup programs. I'm wondering how to code differential backups, any help would be greatly appreciated. | |
hello for exapmle cam sees people.and ıt should detect dıstance between people how can we calculate ıt does anyone any ıdea about ıt? ı couldnt fıgure out the algorıthm:) thanks | |
Hello! I have designed an initial frame for a database app using this code [CODE]#! /usr/bin/env python # OrnithobaseGUI.py import wx, MySQLdb, wx.lib.intctrl ID_HELP = 1 ID_ABOUT = 2 ID_LOG=3 class Ornithobase(wx.Frame): def __init__(self, parent, id, title): wx.Frame.__init__(self, parent, id, title, size=(750,225)) #Define menus menubar = wx.MenuBar() #Define file menu … | |
If you bind a Tkinter widget to an event, normally only the event information is passed to the function responding to the specific event like a mouse click. Python allows you to expand the event handler to include any number of values to be passed on. Here is a typical … | |
Hello! I have written this dialog to connect to a MySQL database. It asks for the Username and Password, and it should use this data to connect to the database. [CODE]#! /usr/bin/env python # pwd.py import wx, MySQLdb class LoginDlg(wx.Dialog): def __init__(self): wx.Dialog.__init__(self, None, -1, 'Login', size=(250,150)) # widgets userLbl … |
The End.