There isn't. But if your weights are non-negative you can use
Dijkstra's algorithm: use shortest_path(G,source).
Aric
You probably have an older version of NetworkX.
You can find the version with
print networkx.__version__
Aric
I just added the Bellman-Ford algorithm to the development trunk of NetworkX. You can check it out right now or wait until NetworkX 1.3 is released.
For your specific problem, suppose you have a graph G with some arbitrary weights (positive or negative). Build another graph H as such
H = nx.Graph(G)
for u, v in H.edges():
H[u][v]['weight'] *= -1
Then run the Bellman-Ford algorithm on H. It will return a shortest path on H which corresponds to a longest simple path on G. This works for DiGraph as well.
If you graph G has a cycle with positive weight, i.e., if you sum the sum the weights of all the edges while going around the cycle and get a positive result, you'll have a negative weight cycle in H. Bellman-Ford will raise an exception indicating the presence of that negative weight cycle. This means that your graph G does not have a longest path, more precisely, you can find a path of length arbitrary long if you go around the cycle again and again.
Hope this helps,
Loïc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)
iEYEARECAAYFAkxXEVoACgkQLKWiTxa2C80T2wCgrgXr4nlKOIhPVPBeGcJvUqzx
wZ4AoLcF6l8SVvGwNXWSMPI41X6LiOj+
=PUYe
-----END PGP SIGNATURE-----