How to connect two pads with a track in KiCad using Python?
To connect two pads with a track in KiCad using Python, you can use the pcbnew module. Here's a script:

```python
import pcbnew

# Load the current board
board = pcbnew.GetBoard()

# Find the first pad
pad1 = board.FindFootprintByReference('R1').FindPadByNumber('1')
# Find the second pad
pad2 = board.FindFootprintByReference('R2').FindPadByNumber('1')

# Create a new track
track = pcbnew.TRACK(board)
track.SetStart(pad1.GetPosition())
track.SetEnd(pad2.GetPosition())
track.SetLayer(pcbnew.F_Cu)
track.SetWidth(1000000) # Track width in nanometers

# Add the track to the board
board.Add(track)
board.Save('path/to/save/your/pcb.kicad_pcb')
```

This script connects two pads with a track on the current PCB.