14,947 Topics

Member Avatar for
Member Avatar for joe82

Hello everyone, My file had 12 columns, I want those lines in my file where numbers in columns 9 and 10 includes digit "101". For example : i am giving 3 lines of my file: ( columns to focus are colored green). NM013123 14-74726235 100.00 18 0 0 11 28 …

Member Avatar for joe82
0
105
Member Avatar for dp_neo

Hi, I have a script that pulls data off the web based on data in a text file. The text file and script are in the same directory. The values from the script are read into a list. The list is then used in some conditional statements. The text file …

Member Avatar for dp_neo
0
87
Member Avatar for vodkalove

OVERVIEW: I am running a script on one machine that connects to a MySQL database on another machine that is outside of our university's domain. According to the administrator, network policies do not allow the compute nodes to access machines outside of our university's domain. COMPUTERS: A = compute node …

Member Avatar for jlm699
0
90
Member Avatar for hurricanezj

I've written a socket server in Matlab and also a client program in Python.Both can be run properly respectively.The purpose is to send signals from Matlab to Python.But the problem is that they can never be connected to each other even though I use the same the host and port …

Member Avatar for woooee
0
229
Member Avatar for SpiritGeek

I'm trying to write my first validator for wxPython. I want to check the TextCtrl value and change its background color based on whether or not it's numeric. It kind of works, except the event triggers before the current character is actually put in, so the validation is always one …

Member Avatar for jlm699
0
2K
Member Avatar for joananon

Hi everybody! I don't know if this is possible to do, but here goes: Hi have a program where I have several lists. Let's call them l1, l2, l3, l4. Often in the code, I need to delete a certain item from 2 of the lists I have. I thought …

Member Avatar for joananon
0
133
Member Avatar for Heftiger

I'm in the process of writing my first python program with a GUI just as practice. I have two listboxes that are packed in the same frame so they are side by side. I have one scroll bar and would like that one scrollbar to move both listboxes simultaneously since …

Member Avatar for Ene Uran
0
2K
Member Avatar for adam291086

i currently have this nested list [[u'Alice Mee', 3], [u'Alice Mee', 4], [u'adam plowman', 1], [u'james pirret', 2]] I need to remove the last number from each list so i have something like [[u'Alice Mee'], [u'Alice Mee'], [u'adam plowman'], [u'james pirret']] the list is populated dynamically and will always change …

Member Avatar for adam291086
0
113
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
60
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
605
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
48
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
99
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
253
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
132
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
130
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
192
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
159
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
142
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
104
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
216
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

The End.