Last active
August 29, 2015 14:01
-
-
Save alexandre/a276175745d2b731b264 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#_*_ coding: utf-8 _*_ | |
''' | |
teste simples levando em conta arquivo.txt = | |
hardwareisa => x86_64 | |
hardwaremodel => x86_64 | |
hostname => lost | |
id => gustavo | |
interfaces => eth0,lo,wlan0 | |
ipaddress => 10.0.8.60 | |
ipaddress_eth0 => 10.0.8.60 | |
''' | |
#versao 1 | |
conteudo = dict() | |
[conteudo.update({x.strip():y.strip()}) for x,y in [x.split(' => ') for x in open("arquivo.txt",'r').readlines()]] | |
# | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment