from confman import ConfigSource

options = \
{
    'tags': ['desktop'],
    'hostname': 'test',
}

from sys import argv
from os import path
samples_path = path.join(path.dirname(argv[0]), 'samples')

c = ConfigSource(samples_path, "/tmp/dotfiles-test", None, options)
c.analyze()
c.check()
c.sync()

print
from pprint import pprint
pprint(c)

from confman import ConfigSource

options = \
{
    'tags': ['desktop'],
    'hostname': 'test',
}

from os import path
samples_path = path.join(path.dirname(__file__), 'samples')

c = ConfigSource(samples_path, "/tmp/dotfiles-test", None, options)
c.analyze()
c.check()
c.sync()

print
from pprint import pprint
pprint(c)

Use __file__ instead of argv[0]
Use __file__ instead of argv[0]

  from confman import ConfigSource
  
  options = \
  {
      'tags': ['desktop'],
      'hostname': 'test',
  }
  
- from sys import argv
  from os import path
- samples_path = path.join(path.dirname(argv[0]), 'samples')
+ samples_path = path.join(path.dirname(__file__), 'samples')
  
  c = ConfigSource(samples_path, "/tmp/dotfiles-test", None, options)
  c.analyze()
  c.check()
  c.sync()
  
  print
  from pprint import pprint
  pprint(c)
  
Use __file__ instead of argv[0]
## Code Before:
from confman import ConfigSource

options = \
{
    'tags': ['desktop'],
    'hostname': 'test',
}

from sys import argv
from os import path
samples_path = path.join(path.dirname(argv[0]), 'samples')

c = ConfigSource(samples_path, "/tmp/dotfiles-test", None, options)
c.analyze()
c.check()
c.sync()

print
from pprint import pprint
pprint(c)

## Instruction:
Use __file__ instead of argv[0]
## Code After:
from confman import ConfigSource

options = \
{
    'tags': ['desktop'],
    'hostname': 'test',
}

from os import path
samples_path = path.join(path.dirname(__file__), 'samples')

c = ConfigSource(samples_path, "/tmp/dotfiles-test", None, options)
c.analyze()
c.check()
c.sync()

print
from pprint import pprint
pprint(c)
