15,181 Topics

Member Avatar for
Member Avatar for tony75

Hi Im working with the old exercise in python and I need help please. The goal of this exercise is to extract information and statistical data from a log file. You can use the logfile generated by the linux kernel. You should write a python code which gives the following …

Member Avatar for tony75
0
136
Member Avatar for krystosan

I am trying to remove a column from PyQt4 implementation of table model , however I am not able to figure it out what I am doing wrong def removeColumns(self, position, columns, parent = QtCore.QModelIndex()): self.beginRemoveColumns(parent, position, position + columns - 1) #Do removing here rowCount = len(self.__colors) for i …

0
122
Member Avatar for bogc

given an audio signal x, there are a number of simple effects that can be implemented on such a file. we are to implement base dumps and treble dumps given piecewise functions relating to each

Member Avatar for bogc
0
116
Member Avatar for Fernando_1

http://pastebin.com/4eCJUP8d The comment "zipCode, city and state variables are of type string, declare them to be lists if you want to use the append() method on them. Do not use where which is a reserved word in Python. I don't see a loop in the readRecord() method that iterates through …

Member Avatar for vegaseat
-2
79
Member Avatar for LostStranger

A newb programmer here I have a project involving pedestrian simulation I'm planning to use libpedsim.dll in python with Ctypes but so far I cannot make the functions working Can anyone point out how to make use of this DLL? This is the class documentation: http://pedsim.silmaril.org/documentation/libpedsim/latest/classPed_1_1Tscene.html This is the link …

Member Avatar for vegaseat
0
464
Member Avatar for HoneyBadger

Guys how do I install WxPython in Ubuntu? I tried following the directions here: But to no avail.... [URL="http://wiki.wxpython.org/InstallingOnUbuntuOrDebian"]http://wiki.wxpython.org/InstallingOnUbuntuOrDebian[/URL] Is there an easier way to do this?

Member Avatar for vegaseat
0
330
Member Avatar for gskssit

I wrote the code as below its extracting all tabular data by splitting. Now i want to extract the last column(Values) data by removing Text in the middle of the table. import re f_read = open('filename','r') f_write=open('filename','w') str='CEN/4' for line in f_read: m=re.search(str,line) if m: for line in f_read: # …

Member Avatar for rrashkin
0
134
Member Avatar for giancan

Dear friends, I need again your help for a new challenge ;) I have a number of files with 5 columns of values (comma separated). I would like to find a way to the values in the first 2 columns and compare them with the first 2 columns of the …

Member Avatar for giancan
0
365
Member Avatar for dirtydit27

Hello, I'm currently working on a homework problem that requires me to create a dictionary from a .txt file that contains some of the worst cars ever made. The file looks something like this: 1958 MGA Twin Cam 1958 Zunndapp Janus 1961 Amphicar 1961 Corvair 1966 Peel Trident 1970 AMC …

Member Avatar for snippsat
0
376
Member Avatar for Siberian

Can there be a conflict between two different version of python ? I have a program that needs access to Python 2.6, I have a environment variable setup, so the program that needs access to a subfolder of the Python 2.6 installation is suppose to access via this environment variable; …

Member Avatar for Siberian
0
1K
Member Avatar for clouds_n_things

Quick question on stripping, I'm executing a simple program, but whenever I try and run it in Terminal, it strips all wrong. The error it puts out is below. It iterates [+]Trying: admin/admin for the first line, but wont repeat it for the rest of the lines, as well as …

Member Avatar for clouds_n_things
0
237
Member Avatar for lancevo3

Hi - I am working through learn python the hard way and I am trying to practice using nosetests command with the "game" I created. The problem when I run nosetests it works fine until it is time to test a class that has raw_input in it, then it just …

Member Avatar for TrustyTony
0
274
Member Avatar for debasishgang7

Hi Guys, I am trying to modify an xml string on the fly. I will enter a sample XML string and the code should generate modified xml.I have exploied it later. xml = xml = '''<FixedPage xmlns="http://schemas.microsoft.com/xps/2005/06" xmlns:x="http://schemas.microsoft.com/xps/2005/06/resourcedictionary-key" xml:lang="en-us" Width="793.92" Height="1122.24"><FixedPage.Resources><ResourceDictionary><LinearGradientBrush x:Key="b0" StartPoint="0,0" EndPoint="0,1122.24" ColorInterpolationMode="SRgbLinearInterpolation" MappingMode="Absolute" SpreadMethod="Pad"><LinearGradientBrush.GradientStops><GradientStop Color="#FFFFFFFF" Offset="0" /><GradientStop …

Member Avatar for TrustyTony
0
309
Member Avatar for TLSK

Did anyone have an idea about block a connection to a specific website.I want to choose www.examle.com page to block and the program to block me to get in this site?I thougth first to detect in what website i visit and i don't have any idea how to make ot …

0
62
Member Avatar for Gubbei

I have a project due for my programming class on Friday and im hopelessly stuck on this problem if anyone could help me please, it would be great >The question is: Write a function that takes 4 arguments (integer, integer, picture, string). This function should be able to be used …

Member Avatar for bumsfeld
0
226
Member Avatar for rwe0

Using Ubuntu 12.10 have been using python 2.7 and python 3.2 successfully. 2.7 is my default interpreter. Now, after installing python 3.3 it looks like the python3.3 version of "/usr/include/python3.3" was not installed (as it is for "usr/include/python3.2" . I have already done "sudo apt-get install python-dev" . I discovered …

Member Avatar for rwe0
0
648
Member Avatar for clouds_n_things

I'm looking for fellow programmers that write in python, and maybe have skills in HTML/CSS to bounce some ideas off of, and generally just form a little python programming group. Let me know! :D

0
70
Member Avatar for clouds_n_things

So, I have a quick question about a small password cracking program that I wrote. The syntax seems to be fine, but when run at the command terminal (I'm on a mac), the program doesn't really DO anything. I'll click "run in terminal" or I'll already have the terminal window …

Member Avatar for clouds_n_things
0
248
Member Avatar for Zingb

I am new to python and will like to solve ordinary differential equation in Python. How do I differentitae the following equation(1st order and 2nd order). I wish to differentiate C wrt Q C = (Q**3)-15*(Q**2)+(93*Q)+100

Member Avatar for Gribouillis
0
195
Member Avatar for tony75

Hi I wonder if somthing wrong with this script? I get this resuly in my linux ./accessdll.py : No such file or directory #!/usr/bin/env python from subprocess import Popen, PIPE from re import split from sys import stdout class Proc(object): ''' Data structure for a processes . The class properties …

Member Avatar for tony75
0
195
Member Avatar for asaidi

Hi i have linux mint os i have instaled python..and also wxpython and now i cannot run my application fron anywhere how i can add a path that i can run my python scripts from anywhere in my pc..

Member Avatar for asaidi
0
60
Member Avatar for krimgo

Hi, I've just started out with Python and I've been stuck on this problem for a few hours now trying to parse a file into a certain format.. I am trying to create a list in a list out of a list. I currently have this list; ['MPNRRRCKLSTAISTVATLAIASPCAYFLVYEPTASAKPAAKHYEFKQAASIADLPGEVLDAISQGLSQFGINL', 'MQLVDRVRGAVTGMSRRLVVGAVGAALVSGLVGAVGGTATAGAFSRPGLPVEYLQVPSPSMGRSELPGWLQA', 'etc'] …

Member Avatar for krimgo
0
343
Member Avatar for krystosan

I am using Python 2.6 with ide and i created a list with names `names = 'mark', 'raymond', 'rachel', 'matthew', 'roger', 'judith', 'charlie', 'melissa', 'betty']` and then set `names = nmls` so even if I update names, nmls gets updated... however if I do `names = deque(['raymond', 'rachel', 'matthew', 'roger', …

Member Avatar for Lardmeister
0
207
Member Avatar for josh.culley.31

I'm stuck writing some code for an intro programming class. I'm pretty sure the mistake is probably that I mixed integers with strings trying to get a result, but I'm just not sure which code I need to replace after messing with it all day and getting many different traceback …

Member Avatar for woooee
0
6K
Member Avatar for alice.cooper.18659

I am currently trying to pull high,low, and closing stock data from Yahoo finance, and graph it using Turtle. I was able to pull the data from the url into a list but I can't figure out how to graph it. I know the dates have to be the x-axis, …

Member Avatar for alice.cooper.18659
0
198
Member Avatar for johans22

import logging ... log1 = logging.getLogger() How can I find out what is the file name + path used for logging?. Like to find that out from anywhere the logging is accomplished. also, for plotting, plot.xticks(), I like to create a range to force beginning tick, the ending tick and …

Member Avatar for johans22
0
150
Member Avatar for flebber

Hi I was doing an exercise in the Real Python book. It gave a task of simulating a coin toss "I keep flipping a fair coin until I've seen it land on both heads and tails at least once each – in other words, after I flip the coin the …

Member Avatar for flebber
0
2K
Member Avatar for in_xx

Hi, My project requires me to read in multiple ascii files and process them. So I am going to go through the data and using conditional statements store the result in lists. After this, I need to store this data and plot some of it using matlab and display the …

Member Avatar for vegaseat
0
477
Member Avatar for krystosan

in the code from mox example on their page [[http://code.google.com/p/pymox/wiki/MoxDocumentation](http://code.google.com/p/pymox/wiki/MoxDocumentation)] where does PersonDao comes from ? import unittest import mox class DaoUnitTest(unittest.TestCase): def setUp(self): # Create an instance of Mox self.person_mocker = mox.Mox() def testUsingMox(self): # Create a mock PersonDao dao = self.person_mocker.CreateMock(PersonDao) # Return a value when this method …

Member Avatar for krystosan
0
238
Member Avatar for asaidi

HI i m new in linux and i have on my pc linux mint,now i just installed python 3 in my linux.. how i can use the gui to write some scripts i m learning python..and in the tuto he shows the gui in windows very easy to write how …

Member Avatar for asaidi
0
96

The End.