15,185 Topics

Member Avatar for
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
232
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
135
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
114
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
610
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
253
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
137
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
271
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

The End.