15,175 Topics

Member Avatar for
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
357
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
307
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
636
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
Member Avatar for fonzali

hi , I have found vegaseats codes and tutorials helpful for biginners , how can I collect them in the pdf format?

Member Avatar for fonzali
0
156
Member Avatar for jeremywduncan

Hi again all, I have been tussling with this program all day. I can't seem to get pickle.dumps (or f.write..tried that earlier) to save without saving over itself. If I do a deposit(option 1) and then a withdraw(option 2), and then history(option 3), it only shows the last option ran …

Member Avatar for woooee
0
267
Member Avatar for tony75

Hi I would like to write the script that produces at least 6 encrypted password using crypt module and save them in a file called password.txt but I get error? and How can I add more than 6 encrypted password ? import crypt import random, string password = input("Please ender …

Member Avatar for tony75
0
660
Member Avatar for krystosan

I wrote this function earlier to set the priority if the items in listwidget, however what I think would be more pythonic is to write get and set priority method... how should i proceed with writing the method in a pythonic way ? def changePriority(self,direction): """ Reorder the items in …

Member Avatar for woooee
0
238
Member Avatar for 4evrmrepylrning

I'm trying to extract some metadata from a m4v file. I'm looking for the duration, height, width, etc. I do all my programming on a Raspberry Pi and was looking at gexiv2 but could not get it going. I got exiftool working though. My script looks like this: import exiftool …

Member Avatar for 4evrmrepylrning
0
3K
Member Avatar for tizzqman

I am trying to make a simple cryptography program using a simple subsitution method. If any one could help that would be nice. I need to be able to encode it as well as decode it. but im just a little confused on how to go about doing that. here …

Member Avatar for Lucaci Andrew
0
178

The End.