Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

~21.5K People Reached
Member Avatar for 4evrmrepylrning

I'n trying to convert a dbf file to a csv file(or anything else really). I found this on the interwebs but I get an error import csv from dbfpy import dbf import sys dbf_fn = 'in.dbf' csv_fn = 'out.csv' in_db = dbf.Dbf(dbf_fn) out_csv = csv.writer(open(csv_fn, 'wb')) names = [] for …

Member Avatar for Nisar222
0
13K
Member Avatar for awesomelemonade

here is how it goes, I played it on tnbforum.com ask a stupid question, get a stupid answer for example, why do dinosaurs lay eggs cause they are permanent why don't you lay eggs ...and so on I'll start why is the sky blue?

Member Avatar for Slavi
1
2K
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 elyos

Hi guys! I start using Python few days ago, for a game server ( it'a an online game ). I made a server for that game, I start it on my pc, and for do this I need to start Server.py too, or, it wouldn't connect to the server. I …

Member Avatar for elyos
0
291
Member Avatar for 4evrmrepylrning

I have this: import re subs = [] def subcons(data): match = re.search(r'(<[a-z]{3})', data) if match: subs.append(match.group(0)) data = data.replace(match.group(0), '') subcons(data) else: print data return data, subs input = 'ABC <uvw <xyz some random data' e, f = subcons(input) print e print f The print statement in the else …

Member Avatar for TrustyTony
0
209
Member Avatar for 4evrmrepylrning

Hi I am trying my hand at GUI using Python and Tkinter. I know there are probably better options out there but I only have access to Tkinter here at work. My question is this. I have written this: #!/usr/local/bin/python2.6 from Tkinter import * import os root = Tk() root.title("EIMA …

Member Avatar for 4evrmrepylrning
0
1K
Member Avatar for 4evrmrepylrning

I'm working with some really ugly files at the moment When I get them they can look like any of these: All data on one line delimited by ┌ `data1|data2|data3|┌data1|data2|data3|┌data1|data2|data3|┌data1|data2|data3|┌data1|data2|data3|┌` Nice data. All the bits I'm interrested already one one line per bit of information: `data1|data2|data3|` `data1|data2|data3|` Mixed: `data1|data2|data3|┌data1|data2|data3|┌data1|data2|data3|┌` `data1|data2|data3|` …

Member Avatar for Gribouillis
0
201
Member Avatar for 4evrmrepylrning

My brain is freezing up again. I have a string that looks something like this `1 apple--1 pear--1 peach--2 onion--2 carrot--3 <bee mince--3 <por chops--4 <oth salad:--potato--4 <oth bread:--garlic` Then I have a few dictionaries: dic1 = {'1': 'fruit', '2': 'vegetable', '3': 'meat', '4': 'other'} dic2 = {'bee': 'beef, 'por': …

Member Avatar for 4evrmrepylrning
0
216
Member Avatar for 4evrmrepylrning

A while ago I created a PHP application that looks at xml files. I have now been tasked with converting this to Python or Django or Turbo gears(anything as long as it's Python something). I am new at Python and while I have played with Django a bit I have …

0
146
Member Avatar for 4evrmrepylrning

So I have been told by various people on numerous occasions that you cannot parse XML by using regular expressions or any means other than a parser. So, here at work, I have LXML and that is what I have to use. At the moment I am trying to remove …

Member Avatar for 4evrmrepylrning
0
267
Member Avatar for 4evrmrepylrning

Help needed please. Desperate. I have a 3.somethingGB file that contains records that looks like this: [ICODE]<tag> <number>1</number> <info>blah blah</info> <more>Lorem Ipsum</more> <anothertag>The quick brown fox...</anothertag> <id>32444</id> <yetmore>blah blah</yetmore> </tag> <tag> <number>2</number> <info>qwerty</info> <more>yada yada qwerty</more> <anothertag>yada yada qwerty</anothertag> <id>32344</id> <yetmore>yada yada qwerty</yetmore> </tag> <tag> <number>3</number> <info>yada yada qwerty</info> <more>yada …

Member Avatar for Gribouillis
0
271
Member Avatar for 4evrmrepylrning

Hi I have a file with duplicate records they look something like this: [ICODE]<record> <dateadd>012012</dateadd> <nid>R04607295</nid> <reflink></reflink> <FPI>YES</FPI><TPG>NO</TPG><FT>YES</FT> <num>631</num> <author>Anon</author> <title>ON THE WED</title> </record> <record> <dateadd>012012</dateadd> <idref>R04607297</idref> <reflink></reflink> <type>Article</type> <FPI>YES</FPI><TPG>NO</TPG><FT>YES</FT> <num>651</num> <author>Bent, E</author> <title>ENTRANCES AND EXITS</title> </record> <record> <dateadd>012012</dateadd> <nid>R04607295</nid> <reflink></reflink> <FPI>YES</FPI><TPG>NO</TPG><FT>YES</FT> <num>631</num> <author>Anon</author> <title>ON THE WED</title> </record> <record> <dateadd>012012</dateadd> …

Member Avatar for JeoSaurus
0
166
Member Avatar for 4evrmrepylrning

Hi all. My new job involves writing scripts for people in other departments. I'm pretty much on my own with this and I'm still a beginner with Python(I think my brain is still in PHP mode and I'm still struggling with this object oriented approach). Here is what I have: …

Member Avatar for Gribouillis
0
144
Member Avatar for roe1and

I'm just going to put this out there. I was asked to create a spreadsheet with data extracted from MARC records. I have looked at pymarc and cannot get this to work. To be honest I'd rather do this myself and lean something in the process. I have another similar …

Member Avatar for woooee
0
296
Member Avatar for 4evrmrepylrning

I have been asked to look into getting a web framework up and running here at work. I come from a PHP background and have developed a few tools various people use around the office. I have recently become part of a small team of developers who only use Python, …

0
109