File: adjust_imports.dpatch

package info (click to toggle)
nodebox-web 1.9.2-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,724 kB
  • ctags: 1,254
  • sloc: python: 6,161; sh: 602; xml: 239; makefile: 33
file content (263 lines) | stat: -rw-r--r-- 8,320 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
#! /bin/sh /usr/share/dpatch/dpatch-run
## adjust-imports.dpatch by  <serzan@hellug.gr>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: adjust imports of nodebox-web modules to be consistent with
## DP: python-support's directory naming conventions

@DPATCH@
diff -urNad nodebox-web-1.9.2~/colr.py nodebox-web-1.9.2/colr.py
--- nodebox-web-1.9.2~/colr.py	2007-12-05 20:52:36.000000000 +0000
+++ nodebox-web-1.9.2/colr.py	2008-04-10 21:55:04.000000000 +0100
@@ -1,6 +1,6 @@
-from url import URLAccumulator
+from nodebox_web.web.url import URLAccumulator
 from urllib import quote
-from cache import Cache
+from nodebox_web.web.cache import Cache
 import json
 
 def clear_cache():
@@ -61,7 +61,7 @@
 
     def draw(self, x, y, w=40, h=40):
         
-        try: from web import _ctx
+        try: from nodebox_web.web.web import _ctx
         except: pass
         
         from nodebox.graphics import RGB
@@ -179,4 +179,4 @@
 #size(500, 650)
 #themes = search("office")
 #theme = themes[0]
-#preview(theme)
\ No newline at end of file
+#preview(theme)
diff -urNad nodebox-web-1.9.2~/flickr.py nodebox-web-1.9.2/flickr.py
--- nodebox-web-1.9.2~/flickr.py	2008-01-11 14:46:35.000000000 +0000
+++ nodebox-web-1.9.2/flickr.py	2008-04-10 21:54:13.000000000 +0100
@@ -1,8 +1,8 @@
 from urllib import quote_plus
-from url import URLAccumulator
+from nodebox_web.web.url import URLAccumulator
 from xml.dom.minidom import parseString
 import os
-from cache import Cache
+from nodebox_web.web.cache import Cache
 
 API_KEY = "787081027f43b0412ba41142d4540480"
 
diff -urNad nodebox-web-1.9.2~/mimetex.py nodebox-web-1.9.2/mimetex.py
--- nodebox-web-1.9.2~/mimetex.py	2008-01-11 14:46:35.000000000 +0000
+++ nodebox-web-1.9.2/mimetex.py	2008-04-10 21:57:05.000000000 +0100
@@ -1,6 +1,6 @@
-from url import URLAccumulator
+from nodebox_web.web.url import URLAccumulator
 from urllib import quote
-from cache import Cache
+from nodebox_web.web.cache import Cache
 
 def clear_cache():
     Cache("mimetex").clear()
@@ -26,4 +26,4 @@
     return mimeTeX(eq).image
 
 #eq = "E = hf = \frac{hc}{\lambda} \,\! "
-#image(gif(eq), 10, 10)
\ No newline at end of file
+#image(gif(eq), 10, 10)
diff -urNad nodebox-web-1.9.2~/morguefile.py nodebox-web-1.9.2/morguefile.py
--- nodebox-web-1.9.2~/morguefile.py	2008-01-11 14:46:35.000000000 +0000
+++ nodebox-web-1.9.2/morguefile.py	2008-04-10 21:57:13.000000000 +0100
@@ -1,8 +1,8 @@
 from urllib import quote_plus
-from url import URLAccumulator
+from nodebox_web.web.url import URLAccumulator
 from xml.dom.minidom import parseString
 import os
-from cache import Cache
+from nodebox_web.web.cache import Cache
 
 def clear_cache():
     Cache("morguefile").clear()
@@ -135,4 +135,4 @@
 
 #img = images[0]
 #img.download()
-#image(img.path, 0, 0)
\ No newline at end of file
+#image(img.path, 0, 0)
diff -urNad nodebox-web-1.9.2~/newsfeed.py nodebox-web-1.9.2/newsfeed.py
--- nodebox-web-1.9.2~/newsfeed.py	2008-04-10 21:48:29.000000000 +0100
+++ nodebox-web-1.9.2/newsfeed.py	2008-04-10 21:57:25.000000000 +0100
@@ -1,8 +1,8 @@
 import os
-from url import URLAccumulator
-from cache import Cache
-from feedparser import feedparser
-from html import strip_tags
+from nodebox_web.web.url import URLAccumulator
+from nodebox_web.web.cache import Cache
+import feedparser
+from nodebox_web.web.html import strip_tags
 
 def clear_cache():
     Cache("newsfeed").clear()
@@ -146,4 +146,4 @@
     print "Author:", item.author
     print ">>", item.author_detail.name
     print ">>", item.author_detail.email
-"""
\ No newline at end of file
+"""
diff -urNad nodebox-web-1.9.2~/page.py nodebox-web-1.9.2/page.py
--- nodebox-web-1.9.2~/page.py	2008-01-11 14:46:35.000000000 +0000
+++ nodebox-web-1.9.2/page.py	2008-04-10 21:57:39.000000000 +0100
@@ -1,7 +1,7 @@
-from url import URLAccumulator, URLParser
+from nodebox_web.web.url import URLAccumulator, URLParser
 from BeautifulSoup import BeautifulSoup
-from html import replace_entities, plain
-from cache import Cache
+from nodebox_web.web.html import replace_entities, plain
+from nodebox_web.web.cache import Cache
 
 def clear_cache():
     Cache("html").clear()
@@ -151,4 +151,4 @@
 
 # .div returns a list of Tags
 print page.body.div(id="content")[0].p
-"""
\ No newline at end of file
+"""
diff -urNad nodebox-web-1.9.2~/urbandictionary.py nodebox-web-1.9.2/urbandictionary.py
--- nodebox-web-1.9.2~/urbandictionary.py	2008-04-10 21:48:29.000000000 +0100
+++ nodebox-web-1.9.2/urbandictionary.py	2008-04-10 21:51:46.000000000 +0100
@@ -1,7 +1,7 @@
-import url
-import soap
+from nodebox_web.web import url
+import SOAPpy
 import re
-from cache import Cache
+from nodebox_web.web.cache import Cache
 import pickle
 
 def clear_cache():
@@ -48,7 +48,7 @@
         # or queries we do not have in cache.
         cache = Cache("urbandictionary", ".pickle")
         if not cached or not cache.exists(q):
-            server = soap.SOAPProxy(url)
+            server = SOAPpy.SOAPProxy(url)
             definitions = server.lookup(key, q)
             data = []
             for item in definitions:
@@ -74,4 +74,4 @@
                 self.append(ubd)
             
 def search(q, cached=True):
-    return UrbanDictionary(q, cached)
\ No newline at end of file
+    return UrbanDictionary(q, cached)
diff -urNad nodebox-web-1.9.2~/url.py nodebox-web-1.9.2/url.py
--- nodebox-web-1.9.2~/url.py	2007-12-05 20:30:31.000000000 +0000
+++ nodebox-web-1.9.2/url.py	2008-04-10 21:58:29.000000000 +0100
@@ -3,7 +3,7 @@
 import thread, time
 from warnings import warn
 
-from cache import Cache
+from nodebox_web.web.cache import Cache
 
 ### SETTINGS #########################################################################################
 
@@ -439,4 +439,4 @@
 
 
 
-# XXX - should or should we not do quote_plus() somewhere in here?
\ No newline at end of file
+# XXX - should or should we not do quote_plus() somewhere in here?
diff -urNad nodebox-web-1.9.2~/wikipedia.py nodebox-web-1.9.2/wikipedia.py
--- nodebox-web-1.9.2~/wikipedia.py	2008-04-10 21:48:29.000000000 +0100
+++ nodebox-web-1.9.2/wikipedia.py	2008-04-10 21:59:44.000000000 +0100
@@ -1,12 +1,12 @@
 # coding: utf-8
 
 from urllib import quote
-from url import URLAccumulator
+from nodebox_web.web.url import URLAccumulator
 from xml.dom import minidom
 import re
-from html import replace_entities, strip_tags
-import mimetex
-from cache import Cache
+from nodebox_web.web.html import replace_entities, strip_tags
+import nodebox_web.web.mimetex
+from nodebox_web.web.cache import Cache
 
 def clear_cache():
     Cache("wikipedia").clear()
@@ -1346,7 +1346,7 @@
     """ Uses mimetex to generate a GIF-image from the LaTeX equation.
     """
     
-    try: from web import _ctx
+    try: from nodebox_web.web import _ctx
     except: pass
     
     str = re.sub("</{0,1}math>", "", str.strip())
@@ -1360,7 +1360,7 @@
     """textwidth() reports incorrectly when lineheight() is smaller than 1.0
     """
     
-    try: from web import _ctx
+    try: from nodebox_web.web import _ctx
     except: pass
     
     l = _ctx.lineheight()
@@ -1380,7 +1380,7 @@
     
     """
     
-    try: from web import _ctx
+    try: from nodebox_web.web import _ctx
     except: pass
 
     i = 1
@@ -1414,7 +1414,7 @@
     """ This is a very poor algorithm to draw Wikipedia tables in NodeBox.
     """
     
-    try: from web import _ctx
+    try: from nodebox_web.web import _ctx
     except: pass
     
     f = _ctx.fill()
diff -urNad nodebox-web-1.9.2~/yahoo.py nodebox-web-1.9.2/yahoo.py
--- nodebox-web-1.9.2~/yahoo.py	2008-01-11 14:46:35.000000000 +0000
+++ nodebox-web-1.9.2/yahoo.py	2008-04-10 21:52:41.000000000 +0100
@@ -2,10 +2,10 @@
 # Copyright (c) 2007 by Frederik De Bleser, Tom De Smedt.
 
 import urllib
-from url import URLAccumulator, HTTP403Forbidden
+from nodebox_web.web.url import URLAccumulator, HTTP403Forbidden
 import xml.dom.minidom
-from html import replace_entities
-from cache import Cache
+from nodebox_web.web.html import replace_entities
+from nodebox_web.web.cache import Cache
 
 def clear_cache():
     Cache("yahoo").clear()
@@ -318,4 +318,4 @@
 #r = search("apple", cached=False, start=1, context=ctx)
 #print r.total
 #for item in r:
-#    print item.title
\ No newline at end of file
+#    print item.title