• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 14:24
CET 20:24
KST 04:24
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
RSL Revival - 2025 Season Finals Preview8RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12
Community News
ComeBackTV's documentary on Byun's Career !4Weekly Cups (Dec 8-14): MaxPax, Clem, Cure win4Weekly Cups (Dec 1-7): Clem doubles, Solar gets over the hump1Weekly Cups (Nov 24-30): MaxPax, Clem, herO win2BGE Stara Zagora 2026 announced15
StarCraft 2
General
ComeBackTV's documentary on Byun's Career ! When will we find out if there are more tournament Weekly Cups (Dec 8-14): MaxPax, Clem, Cure win Did they add GM to 2v2? RSL Revival - 2025 Season Finals Preview
Tourneys
RSL Offline Finals Info - Dec 13 and 14! Master Swan Open (Global Bronze-Master 2) Winter Warp Gate Amateur Showdown #1: Sparkling Tuna Cup - Weekly Open Tournament $5,000+ WardiTV 2025 Championship
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 504 Retribution Mutation # 503 Fowl Play Mutation # 502 Negative Reinforcement Mutation # 501 Price of Progress
Brood War
General
How Rain Became ProGamer in Just 3 Months FlaSh on: Biggest Problem With SnOw's Playstyle BGH Auto Balance -> http://bghmmr.eu/ [BSL21] RO8 Bracket & Prediction Contest BW General Discussion
Tourneys
[Megathread] Daily Proleagues [BSL21] WB SEMIFINALS - Saturday 21:00 CET [BSL21] RO8 - Day 2 - Sunday 21:00 CET [ASL20] Grand Finals
Strategy
Game Theory for Starcraft Current Meta Simple Questions, Simple Answers Fighting Spirit mining rates
Other Games
General Games
Path of Exile Stormgate/Frost Giant Megathread Nintendo Switch Thread General RTS Discussion Thread Dawn of War IV
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Mafia Game Mode Feedback/Ideas Survivor II: The Amazon Sengoku Mafia TL Mafia Community Thread
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine The Games Industry And ATVI Russo-Ukrainian War Thread YouTube Thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
TL+ Announced Where to ask questions and add stream?
Blogs
The (Hidden) Drug Problem in…
TrAiDoS
I decided to write a webnov…
DjKniteX
James Bond movies ranking - pa…
Topin
Thanks for the RSL
Hildegard
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1808 users

pyreplib - Python library to read .rep files - Page 3

Forum Index > BW General
Post a Reply
Prev 1 2 3 All
gnuvince
Profile Joined June 2007
Canada73 Posts
July 14 2008 15:26 GMT
#41
alien3456: thanks a bunch, let me know what you think.

Also, I mentioned in an earlier announcement that I wasn't accepting patches and contributions yet. I'm comfortable enough with the library design for now that if you find bugs, have feature ideas, optimizations, etc. be sure to send them my way!
prOxi.swAMi
Profile Blog Joined November 2004
Australia3091 Posts
July 14 2008 23:33 GMT
#42
A .NET lib would be sick.

...Not that I have a problem with python. Great job!
Oh no
gnuvince
Profile Joined June 2007
Canada73 Posts
Last Edited: 2008-07-15 00:15:22
July 15 2008 00:14 GMT
#43
On July 15 2008 08:33 prOxi.swAMi wrote:
A .NET lib would be sick.

...Not that I have a problem with python. Great job!


The thing I am working on now is a small command line util to dump a replay file in data formats such as JSON, XML and YAML. If no one is interested in doing the low-level bit-fiddling for .NET, this could be a not-so-bad way to get started; those formats are *way* easier to manipulate and toy around with that binary, that's for sure. I'll keep you informed!
gnuvince
Profile Joined June 2007
Canada73 Posts
July 15 2008 18:45 GMT
#44
As promised, I finished doing a small command-line utility to dump a replay file in different file formats. You can see it here: http://code.google.com/p/pyreplib/source/browse/trunk/bin/repdumper.py

It dumps in JSON, YAML and XML. I don't recommend YAML, the PyYAML library is pretty slow, doing a dump takes about 50 seconds! JSON is the fastest if you have the cjson module installed, JSON dumping with simplejson and XML dumping take approximatively the same time.

Check it out and give me some feedback!
RekcaH
Profile Blog Joined December 2003
United States190 Posts
July 18 2008 23:02 GMT
#45
I'm new to python and I want to try playing around with this but can't get it to work.

>>> from pyreplib import replay
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pyreplib/replay.py", line 5, in <module>
from pyreplib import _unpack
ImportError: cannot import name _unpack

What do I have to do to get it to work? Do I have to run setup.py first?
gnuvince
Profile Joined June 2007
Canada73 Posts
July 20 2008 22:49 GMT
#46
RekcaH: Indeed, you need to run setup.py first:

$ sudo python setup.py install

You will need a C compiler, because the unpacker is written in C.
RekcaH
Profile Blog Joined December 2003
United States190 Posts
July 21 2008 05:54 GMT
#47
Oh thanks I was just running

sudo python setup.py
zdd
Profile Blog Joined October 2004
1463 Posts
Last Edited: 2008-07-21 07:16:29
July 21 2008 07:15 GMT
#48
Hahah I had this exact same idea to write a bwchart-like thing in python a few months ago. Been busy though, so didn't get much done. Anyway, if you want some help reading replay files, try this code: http://bwchart.teamliquid.net/bin/bwreplib100e-withsource.zip it's from the bwchart rep library, and pretty much describes how to read every action. It may be kind of outdated though, because it's only compatible with bwchart 1.02V.
All you need in life is a strong will to succeed and unrelenting determination. If you meet these prerequisites, you can become anything you want with absolutely no luck, fortune or natural ability.
gnuvince
Profile Joined June 2007
Canada73 Posts
July 22 2008 04:14 GMT
#49
zdd: the source for bwreplib is actually included in the Subversion repository It's not necessary to get pyreplib working, however it's damn useful to check some things that aren't clear from replay_format.txt (or not mentioned at all.)
Prev 1 2 3 All
Please log in or register to reply.
Live Events Refresh
WardiTV 2025
13:00
Playoffs
Nice vs CreatorLIVE!
WardiTV1645
TaKeTV 420
IndyStarCraft 248
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
IndyStarCraft 248
UpATreeSC 100
BRAT_OK 78
JuggernautJason48
MindelVK 21
StarCraft: Brood War
Britney 17720
Calm 1891
EffOrt 382
Dewaltoss 126
actioN 98
Hyun 57
ggaemo 30
Aegong 18
soO 16
Sacsri 9
[ Show more ]
Mong 4
Dota 2
Gorgc5948
qojqva3220
singsing3052
Counter-Strike
fl0m1061
chrisJcsgo83
Other Games
FrodaN1992
Beastyqt843
ceh9419
DeMusliM130
KnowMe119
C9.Mang0118
RotterdaM111
QueenE99
Trikslyr73
Mew2King37
nookyyy 26
OptimusSC22
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 18 non-featured ]
StarCraft 2
• StrangeGG 54
• Reevou 15
• IndyKCrew
• Migwel
• AfreecaTV YouTube
• sooper7s
• intothetv
• Kozan
• LaughNgamezSOOP
StarCraft: Brood War
• HerbMon 32
• Michael_bg 2
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• WagamamaTV685
League of Legends
• TFBlade989
Other Games
• imaqtpie1386
• Shiphtur243
Upcoming Events
WardiTV 2025
15h 36m
ByuN vs TBD
Clem vs TBD
OSC
18h 36m
CranKy Ducklings
1d 14h
WardiTV 2025
1d 15h
SC Evo League
1d 17h
Ladder Legends
1d 23h
BSL 21
2 days
Sziky vs Dewalt
eOnzErG vs Cross
Sparkling Tuna Cup
2 days
Ladder Legends
2 days
BSL 21
3 days
StRyKeR vs TBD
Bonyth vs TBD
[ Show More ]
Replay Cast
3 days
Wardi Open
3 days
Monday Night Weeklies
3 days
WardiTV Invitational
5 days
Replay Cast
6 days
WardiTV Invitational
6 days
ByuN vs Solar
Clem vs Classic
Cure vs herO
Reynor vs MaxPax
Liquipedia Results

Completed

Acropolis #4 - TS3
RSL Offline Finals
Kuram Kup

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
Slon Tour Season 2
CSL Season 19: Qualifier 1
WardiTV 2025
META Madness #9
eXTREMESLAND 2025
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22

Upcoming

CSL Season 19: Qualifier 2
CSL 2025 WINTER (S19)
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
Big Gabe Cup #3
OSC Championship Season 13
ESL Pro League Season 23
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.