15,179 Topics

Member Avatar for
Member Avatar for teonghan

Hi all, I have been trying to create a Python program to connect to a serial port and read data from it. There will be a circuit sending the data through the port to PC and the Python program suppose to read and process the data. The data is continuous. …

Member Avatar for scru
0
2K
Member Avatar for poeticinsanity

I am attempting to encode using a module called Beautiful Soup. All I need some direction on solving the problem. The encoding maps to <undefined>, so the unicode is not defined within the charmap. The error I get is: UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-34: character maps …

0
61
Member Avatar for SpiritGeek

I'm making a simple wxPython app on win32 that does a number of calls to external binaries. Everything works fine, except the GUI doesn't update well while the external process is running. This makes for an ugly window and non-updated status StaticTexts, so I'd like to fix it. Window . …

Member Avatar for SpiritGeek
0
609
Member Avatar for GlueMan

Hello everybody. I have got a problem installing (or using) clonedigger. 1- I installed setuptools without any problem : Because i am using Python 2.6, I downloaded "setuptools-0.6c9.tar.gz" and "setuptools-0.6c9-py2.6.egg" and I ran "python ez_setup.py setuptools-0.6c9-py2.6.egg". Everything went ok. 2- But when I run "easy_install -U clonedigger", here is what …

Member Avatar for GlueMan
0
252
Member Avatar for suvirj

Hi guys, I have been working with python for some time now and starting to feel quite comfortable with it after a few small projects. Now, I want to make something on the lines of a packet sniffer. It might be able to analyze network activity. My problem is that …

0
49
Member Avatar for SpiritGeek

I'm taking a stab at multiprocessing and I need one process to tell the other to run a given function. On the receiving end, I'm trying to figure out how to interpret the message it gets. I could set up a big nest of if/elif to test for every possible …

Member Avatar for SpiritGeek
0
118
Member Avatar for hughesadam_87

Hey guys, I want to write a program which scans the first line in a data file and sees whether it is delimited by "\t", "," or " ". If it is any of these, I want to keep the line, else, I want to raise some sort of error …

Member Avatar for woooee
0
100
Member Avatar for MONODA

I am making a script which manipulates ID3 tags. I want a certain function to be used on every file in a directory recursively. I have written the script but it is not behaving like I would expect in some cases. If I give it exec perms and put it …

Member Avatar for MONODA
0
86
Member Avatar for clbembry

I can't get MiniFrames to work and I really have no idea how to. I'm a complete noob when it comes to wxPython as I just started learning today. Heres the code for my GUI so far and I want to add a mini frame as a vertical toolbar along …

Member Avatar for lllllIllIlllI
0
257
Member Avatar for dp_neo

Hi, I am trying to schedule a python compiled file to run using windows scheduler. But it does'nt run successfully The script writes to a SQL server database installed on the same machine as python and the script resides on the same machine. The script imports the urllib, sys, threading, …

Member Avatar for dp_neo
0
109
Member Avatar for wotthe2000

Hi, I'm having a bit of a problem outputting to a file. I am trying to output each element of a list into a document on a new line and I can only get it to work when all the items in the list are on the same line. The …

Member Avatar for Ene Uran
0
71
Member Avatar for lblazer05

Hello guys, I am new around here. Anyways, I am having a problem with reading some information from a text file. Sample text file: density = -1.0 number = 2004 Ok so what do I use in order to get the number -1.0 from the text file? Also, what if …

Member Avatar for Ene Uran
0
136
Member Avatar for Darkangelchick

Hey guys, I'm making a platform game similar to Super Mario in Pygame and I want to add platforms i.e. I have a background picture that has platforms drawn on it. I then want to make it so he can only go down as far as the platform, and as …

Member Avatar for shadwickman
0
132
Member Avatar for joe82

Hello everyone, My file has lines like: >9|102396631|genome..... CCACTTTCTCTCCGCGCTGGGTTGAACATGGTACATCAGACTCCCTGAATCTGTCAGATC TCTTGGTTGCTGTTGACAACTAAGACTTCGGAGCCTGGAG_GATTTGTTGAGGGGGAGCA GTTCTGGGTGTCCTCTGCTGTGACTGGGCTCCCGGCCTCTTGATAATGCGCAACAGCTGC GGTAGAACATCTCATTCCCAG >9|102362951|ENSRNOS.... I want to delete blank lines from this file please help me... Thanks

Member Avatar for joe82
0
12K
Member Avatar for Arrorn

How do I import a variable from another function in the same class [code=Python] class W(object): #my class def variable(self): #one of my functions f = 5 def printf(self): #what do i put here to import f from the function variable... #I'm currently working with python 3.1. #I know its …

Member Avatar for Arrorn
0
268
Member Avatar for sharat87

Hello, I have an application written in python and Tk. My application is to be scriptable with python, i.e., the user gives a small piece of code written in python, and that is to be executed by my application in a different interpreter, with different set of local variables. I …

Member Avatar for shadwickman
0
106
Member Avatar for dinilkarun

Hi All, I am using the below code to write into a text file [CODE] # Write into log file inp=file(Doc\Log.txt, 'w') inp.write('Log file start') inp.close()[/CODE] The text file 'Log.txt' is present in 'Doc' folder inside the application folder. Now I want to create a text file with a time …

Member Avatar for baki100
0
160
Member Avatar for ihatehippies

If I wanted to save the binary information of an executable as a string object in a .py file what would be the easiest way to go about that without receiving null byte and EOF errors.. I've messed around with converting each char to its ordinal and then separating them …

Member Avatar for vegaseat
0
144
Member Avatar for iliketacos

this script give me a memory error in parse()...what is a memory error and how can i fix it? [code] import cgi class COM: def __init__(self): f=open('C:/site/commentlog.txt', 'r') self.lines=f.readlines() f.close() def writecom(self, post): f=open('C:/site/commentlog.txt', 'a') f.write(post) f.close() def getcom(self): try: form=cgi.FieldStorage() q=form.getvalue("posts") if q: writecom(q) return q except: return 0 …

Member Avatar for vegaseat
0
107
Member Avatar for jlm699

I feel like I'm losing my mind... I uninstalled wxPython this morning and was going to reinstall with the latest version as I'm having peculiar problems with UliPad that I just downloaded yesterday. Well after uninstalling the wx package and docs & demos I went to the wxPython page and …

Member Avatar for vegaseat
0
219
Member Avatar for gianniszaf

Hi there, I have the following string which is tab seperated [code]dasj dhsahdwe dhasdhajks ewqhehwq dsajkdhas edward das dsaw das daswf fjdk ewf jken dsajkw dskdw hklt ewq vn1 daskcn daskw[/code] How can I format it in python in order to make each column to have the width of the …

Member Avatar for vegaseat
0
551
Member Avatar for Zetlin

Ok so for the last couple of days I have been struggling with file handling. Here is my problem I create a new file and write some text into it. Then I open it again to add more text to it but somehow the new text is being written in …

Member Avatar for Zetlin
0
247
Member Avatar for Jonx

So after some scrambling around trying to find a good beginner programming language, i have found python, and with my ultimate goal being game development, also pygame. I have just started learning some basics, and I was going through a tutorial when i ran into an error that im not …

Member Avatar for vegaseat
0
2K
Member Avatar for kes_ee

What is the difference between these two methods; [CODE=python]# Solution 1 list1 = ['a', 'b', 'c', 'd'] temp_list1 = list1 for i in range(len(list1)): temp_list1[i] = "1" print list1; # ['1', '1', '1', '1'] print temp_list1; # ['1', '1', '1', '1'] # Solution 2 list2 = ['a', 'b', 'c', 'd'] …

Member Avatar for vegaseat
0
127
Member Avatar for siddhant3s

[U][B]Guidelines to OPs:[/B][/U] [U]Before you start a thread:[/U] Starting a thread is a critical task. It is so because it demands time and attention of other forum members. A thread should only be started when you have done enough drill to find your answer else where. You should always be …

2
468
Member Avatar for rockyman12

Can anyone give me a qick review about Python Why its good ? Why its not ? What is the most suitable type of project for it ?? (application) And so one Thanks for your help

Member Avatar for Ene Uran
0
122
Member Avatar for joe82

Hello everyone, My file has text like: gnl|dbSNP|rs13484118 gi|62750812|ref|NC_005111.2|NC_005111 95 20 1 0 68 87 31017559 31017578 4.4 32.3 gnl|dbSNP|rs13484118 gi|62750812|ref|NC_005111.2|NC_005111 91.67 24 2 0 63 86 35247737 35247714 4.4 32.3 gnl|dbSNP|rs13484118 gi|62750812|ref|NC_005111.2|NC_005111 91.67 24 2 0 64 87 40549054 40549031 4.4 32.3 gnl|dbSNP|rs13484118 gi|62750812|ref|NC_005111.2|NC_005111 92 24 2 0 63 …

Member Avatar for joe82
0
4K
Member Avatar for mikejamesuk

[url]http://www.i-programmer.info/tinyURL.php?id=189[/url] Is a review and discussion of using Python as a first language. mikej

0
49
Member Avatar for sebcbien

Hello, I'm currently working on a little soft to plot some data from CSV files. I've got two problems. The first one is on CSV opening in procFile method. When I try to open a file with a path which own "é" characters for example, it raises an error. I've …

Member Avatar for sebcbien
0
152
Member Avatar for Mclovin

Hi! I'm creating metadata to a bunch of files and have problems figuring out how to do this. The python script should be able to create one xml document for each file in the directory. The problem is not to walk through the files but to create additional metadata to …

0
43

The End.