14,952 Topics

Member Avatar for
Member Avatar for monstercameron

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

Member Avatar for Rashakil Fol
0
324
Member Avatar for acejhon

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

Member Avatar for TrustyTony
-2
283
Member Avatar for rmsagar

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 …

Member Avatar for rmsagar
0
95
Member Avatar for ultimatebuster

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.

Member Avatar for TrustyTony
0
183
Member Avatar for acrocephalus

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

Member Avatar for acrocephalus
0
188
Member Avatar for Aneeshia

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

Member Avatar for Beat_Slayer
0
57
Member Avatar for insanely_sane

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

Member Avatar for insanely_sane
0
197
Member Avatar for fingerpainting

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

Member Avatar for fingerpainting
0
251
Member Avatar for Axelro

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 …

Member Avatar for Axelro
0
86
Member Avatar for acrocephalus

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 …

Member Avatar for acrocephalus
0
73
Member Avatar for molhokwai

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 …

0
125
Member Avatar for Archenemie

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 …

Member Avatar for Archenemie
0
96
Member Avatar for nezbo

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 …

Member Avatar for snippsat
0
120
Member Avatar for radc

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 …

Member Avatar for radc
0
246
Member Avatar for Tech B

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

Member Avatar for Beat_Slayer
0
117
Member Avatar for seldridge

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 …

0
101
Member Avatar for acrocephalus

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 …

Member Avatar for Beat_Slayer
0
88
Member Avatar for PythonNewbie2

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 …

Member Avatar for D33wakar
0
3K
Member Avatar for Pinchanzee

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 …

Member Avatar for Pinchanzee
0
528
Member Avatar for ronparker

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 …

0
79
Member Avatar for locomotive

how do i print the 3 most common word that begins with capitals? also how do i count how many times they appear?

Member Avatar for snippsat
0
137
Member Avatar for JDuch

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

Member Avatar for JDuch
0
570
Member Avatar for koveras vehcna

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 …

Member Avatar for griswolf
0
241
Member Avatar for JDuch

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 …

Member Avatar for JDuch
0
374
Member Avatar for dlannetts

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

Member Avatar for dlannetts
0
489
Member Avatar for mst440

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.

Member Avatar for snippsat
0
121
Member Avatar for rehber344

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

Member Avatar for griswolf
0
106
Member Avatar for acrocephalus

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 …

Member Avatar for acrocephalus
0
165
Member Avatar for vegaseat

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 …

Member Avatar for bvdet
1
1K
Member Avatar for acrocephalus

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 …

Member Avatar for griswolf
0
205

The End.