wie der Titel schon sagt, würde ich gerne wissen, wie man eine .py Datei unter Windows 7 patched.
Ich gehe mal davon aus, dass es nicht reicht, den Inhalt der patch Datei ans Ende der .py Datei zu schreiben
Ich habe z.B. eine Datei axes.py.patch mit folgendem Inhalt:
Code: Alles auswählen
--- lib/matplotlib/axes.py.ori 2013-08-09 13:46:16.000000000 +0200
+++ lib/matplotlib/axes.py 2013-08-09 13:46:44.000000000 +0200
@@ -4424,7 +4424,7 @@
for handle in self._get_legend_handles(legend_handler_map):
label = handle.get_label()
#if (label is not None and label != '' and not label.startswith('_')):
- if label and not label.startswith('_'):
+ if label and label[0] != '_':
handles.append(handle)
labels.append(label)
@@ -8135,7 +8135,7 @@
patches = []
- if histtype.startswith('bar'):
+ if histtype[:3] == 'bar':
totwidth = np.diff(bins)
if rwidth is not None:
@@ -8183,7 +8183,7 @@
bottom[:] = m
boffset += dw
- elif histtype.startswith('step'):
+ elif histtype[:4] == 'step':
# these define the perimeter of the polygon
x = np.zeros( 4*len(bins)-3, np.float )
y = np.zeros( 4*len(bins)-3, np.float )
Mit freundlichen Grüßen
Felopy