15,406 Topics

Member Avatar for
Member Avatar for funfullson

Hi dears. I want to send a string as sms in gsm modem witch mixed from english and unicode word. for example: "hello in persian is 'سلام' in arabic is 'السلام'." now, how I can make a pdu format from this string and what change I have to make in …

Member Avatar for funfullson
-2
427
Member Avatar for acrocephalus

Hello! I am trying to edit a csv file. This is my original csv file [CODE]"TINAMIFORMES",,,, ,"Tinamidae",,, ,,"Tinamus",, ,,,"tao","Grey Tinamou" ,,,"solitarius","Solitary Tinamou" ,,,"osgoodi","Black Tinamou" ,,,"major","Great Tinamou" ,,,"guttatus","White-throated Tinamou" ,,"Nothocercus",, ,,,"bonapartei","Highland Tinamou" ,,,"julius","Tawny-breasted Tinamou" ,,,"nigrocapillus","Hooded Tinamou" ,,"Crypturellus",, ,,,"berlepschi","Berlepsch's Tinamou" ,,,"cinereus","Cinereous Tinamou" ,,,"soui","Little Tinamou" ,,,"ptaritepui","Tepui Tinamou" ,,,"obsoletus","Brown Tinamou" ,,,"undulatus","Undulated Tinamou" ,,,"transfasciatus","Pale-browed Tinamou" …

Member Avatar for acrocephalus
0
5K
Member Avatar for gh0st0

Hi Folks, Windows/Python3.1.2 I'm totally at a loss with this one... The code is supposed to open a file (postscript with UNIX LF-only EOL characters), look for and change a line, then write the lines back. It works fine, except for the fact that I can't dissuade Python from writing …

Member Avatar for gh0st0
0
161
Member Avatar for kuchi

We have implemented ConfigParser object to parse the log file and load tested the application, but it was failed after 50 records created due to memory error. we removed ConfigParser's code and re-tested then the transaction was completed successfully, finally we figured out that this object is creating more objects …

0
64
Member Avatar for Xzarik

This one might be a challenge... Okay some of you might have an inkling what i'm trying to do already from the last thread (thanks for helping!) but I figured I should start a new topic for a new problem so that people can search solutions easier. I've got multiple …

Member Avatar for Xzarik
0
8K
Member Avatar for linuxoidoz

Hello, What's the right way to open and close dialog windows multiple times? At the moment I instantiate a dialog window on a clicked button signal, then close it with self.close() but when I open it again Python crashes. So I can open the dialog only once. How can I …

Member Avatar for raptr_dflo
0
16K
Member Avatar for koveras vehcna

Hello everyone, I am trying to process various texts by regex and NLTK of python -which is at [url]http://www.nltk.org/book-[/url]. I am trying to create a random text generator and I am having a slight problem. Firstly, here is my code flow: Step-1)Enter a sentence as input -this is called trigger …

Member Avatar for koveras vehcna
0
186
Member Avatar for bpatt22

What are some alternatives to writing [CODE]len(mylist3 & mylist4)[/CODE] within this code? [CODE] mylist1 = [1,2,3] mylist2 = [4,5,6] mylist3 = set(mylist1) mylist4 = set(mylist2) lenresult = len(mylist3 & mylist4) [/CODE] A module i'm importing is unable to use the count() that gets called with the ' & ' operator.

Member Avatar for bpatt22
0
104
Member Avatar for Xzarik

Hey all, I've been having some problem with python - i'm pretty awful at programming but have been soldiering on with this for some time now! What I need to do is take one list and compare it to another. Both lists are presented in rows, and I need to …

Member Avatar for Xzarik
0
157
Member Avatar for ultimatebuster

Why do people say isinstance is bad? If I have my own class, named Test, and if I want to check an variable to see if it is an instance of Test or Test's child classes, is using instance() bad?

Member Avatar for TrustyTony
0
188
Member Avatar for frankinaround

Hi, im looking for any tips on how to make a program that can move the windows vista mouse icon to different spots + left and right click. So I can tell it to go to this spot and click. can anyone please help

Member Avatar for vegaseat
0
100
Member Avatar for sravan953

Hello all, I want to make a Python program which will go to a particular site, login with my credentials, and do a specific task, such as in this case: go to WordPress.com, login, navigate to the drafts section, and add a line to a draft. I believe most of …

Member Avatar for ultimatebuster
0
174
Member Avatar for KnifeDarky

Hi everyone, I'm making some kind of game in Python and i need to save random number to text file but i cant. Please help me out. Here is the code: [code]def lvl(): x = random.randint(100,1000) tfile = open("text.txt", 'w') tfile.write(x) input("")[/code] Without x everything is good, but i need …

Member Avatar for snippsat
0
118
Member Avatar for acrocephalus

Hello! As a part of a database project, I need to find a way to send a MySQL table to wxpython and then select some of its records (using a Select/Remove button) to store them in another class of the database. Is there any kind of widget to do this? …

0
62
Member Avatar for donnyv

Hi, I have a content type with a selection field whose value I would like to set programmatically (ie, for all items in a folder). I know this is a vague question but can anyone point me towards something that might help me figure this out? Thanks in advance! Cheers, …

Member Avatar for Beat_Slayer
0
64
Member Avatar for acrocephalus

Hello! I am trying to update a MySQL table using a Python code but I am having some problems. I define the connection and the cursor in the Ornithobase (wx.Frame)class in the OnLof function as [CODE]self.db= MySQLdb.connect(host='localhost', user=self.Username , passwd=self.pwd, db='Ornithobase') self.cursor = self.db.cursor()[/CODE] Then, in the same class but …

Member Avatar for TrustyTony
0
291
Member Avatar for ronparker

Hello all, To begin, I am working with a MySQL database using python. In the database, I am working with 3 columns: REF_ENTRY_TIME, REF_EXIT_TIME, REF_ENTRY_VALUE. My goal is to graph the net value position against time. For the time portion, both REF_ENTRY_TIME and REF_EXIT_TIME are random various times between 9:00 …

Member Avatar for TrustyTony
0
116
Member Avatar for n.utiu

Hi, all! I was wondering if there is any way to check from the server side whether the client has closed a socket connected to one on my side. client side [CODE]import socket s = socket.create_connection ((host, random_port)) s.close () [/CODE] server side [CODE] ... a = lstn.accept () [/CODE] …

Member Avatar for n.utiu
0
5K
Member Avatar for Stefano Mtangoo

When you think of Media player, you need beautiful look n feel. I know GIMP can do alot. But Skin in wxPthon? I don't think it is possible. So I thought and thought then I came with this Idea. Create panel with Image as background and then Load wxBitmaps and …

Member Avatar for Beat_Slayer
0
457
Member Avatar for acejhon

helo guys good day... i have a problem in python programming... im new to this langauage.. im having a bit problem on creating a program in python that would determine if the integer is divisible by 3 or not without using a modulus? im glad if you can help me …

Member Avatar for woooee
0
82
Member Avatar for Joeflims

Hello Everybody. I am Joeflims. I am currently teaching myself Python as my first language. After that I may move on to C,C++,JavaScript, or whatever I feel like. In addition to learning how to program, I am also an avid record collector,p lay the guitar, and make balloon animals. I …

Member Avatar for MooGeek
0
38
Member Avatar for kuchi

Hi, We have a date input come in the format of YYYYMMDD, ex: if the date comes as 19980224, then its good else if the date comes as 19982402, then we need to raise exception we need to validate this date format. can you please guide me how to do …

Member Avatar for kuchi
0
130
Member Avatar for n1220

I am trying to insert text to image, assignment only allows me to use load, save, getpixel, and putpixel. Details about letters, numbers, punctuation is given in Imageproc code which basically are dictionaries. But I am getting this error after running: pix[10+index, 15] = letters[value] SystemError: new style getargs format …

Member Avatar for vegaseat
0
461
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
326
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
285
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
99
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
185
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
193
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
59
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
210
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
254
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
87
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
75
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
131
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
101
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
124
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
252
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
123
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
103
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
90
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
575
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
81
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
139
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
574
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
256
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
378
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
495
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
126
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
109

The End.