PrEditor 0.2.0__py2.py3-none-any.whl → 0.3.0__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of PrEditor might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PrEditor
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: A python REPL and Editor and console based on Qt.
5
5
  Home-page: https://github.com/blurstudio/PrEditor.git
6
6
  Author: Blur Studio
@@ -11,7 +11,7 @@ preditor/plugins.py,sha256=W3DfdDEE5DtEXOXioEyIe4tuIVV1V-RLcV8LoZJWpWU,1916
11
11
  preditor/prefs.py,sha256=BPtSsdv2yuiRpIaqEml9fxlVYKHNfqQ77hp5YIQRDBg,2172
12
12
  preditor/settings.py,sha256=DV9_DbJorEnhdIvW15E7h7PswlQUsy0UlA8bXUYN0og,2206
13
13
  preditor/streamhandler_helper.py,sha256=kiU6T9WqJ3JKTTKCa7IUU8brwK7zO5UUpEzLhEfKe44,1788
14
- preditor/version.py,sha256=g0RU_Fiae76hPEUjU6lGnapa9IZoqGcB4oFcTnsoMbM,142
14
+ preditor/version.py,sha256=YNd1dEdZGzG2MvXfaTQdmMYCLOQm-rV09_xmC5Hxu5Y,142
15
15
  preditor/weakref.py,sha256=b--KomFAHcMWr3DEAIN2j3XxRhjDWKw0WABXyn1nxDg,12177
16
16
  preditor/cores/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  preditor/cores/core.py,sha256=ZXB4bts05DMQtc-dtkk81chIWNqYXImMuWCYuUHwLdA,2389
@@ -140,15 +140,15 @@ preditor/scintilla/lexers/mulexer.py,sha256=Y2FVp6ZJ9CgLIuIvItOzXMMRemuToID66dpB
140
140
  preditor/scintilla/lexers/pythonlexer.py,sha256=WgL74RQGvGgsdAL-l2ioOMybqRw7M0GG-SxmzXsW4xw,1682
141
141
  preditor/scintilla/ui/finddialog.ui,sha256=CEXouVKqVCDOfMBciK-89OmsGe2Kr6XdMbSPiffp0PA,4048
142
142
  preditor/stream/__init__.py,sha256=SxILA3U3W8aNfVBd_oJ4-WXkA214cl1zGLSCelFx5QU,2682
143
- preditor/stream/director.py,sha256=ymay-JYrw96MwLiR7DoFJ9af3BhTODJSoEPNnkivOuE,1915
143
+ preditor/stream/director.py,sha256=Gklbl6jwTmB0BtyR6MZxRytdlufaz5MoiW9Le9WFTmo,2733
144
144
  preditor/stream/manager.py,sha256=NP4lf6hd5L_Ui-9Ws66gVEk6ZL8YqF7BxOzUsdrh3v0,2811
145
145
  preditor/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
146
146
  preditor/utils/cute.py,sha256=LfF8gXMAkkQAdo4mm6J9aVkDLwWZbE6prQ0moDbtCys,1045
147
147
  preditor/utils/stylesheets.py,sha256=EVWZNq3WnaRiyUPoYMKQo_dLEwbRyKu26b03I1JDA-s,1622
148
148
  preditor/utils/text_search.py,sha256=21kuSDTpLIPUcriB81WP1kWfzuDBuP13ZtHUtypP5jE,14218
149
- PrEditor-0.2.0.dist-info/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
150
- PrEditor-0.2.0.dist-info/METADATA,sha256=3XtyKNBXmKiZ5nbUBpSZgT_RzSmyMollevrf_fp6GxU,9277
151
- PrEditor-0.2.0.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
152
- PrEditor-0.2.0.dist-info/entry_points.txt,sha256=mpe0HFD_oIEBNPTJNyUEbmMV6Ivrp4EuYyZ34C5d_PU,519
153
- PrEditor-0.2.0.dist-info/top_level.txt,sha256=iX1_mrUOky_BQr2oG0l_MbEUYF6idyjiWSzu9z3irIw,9
154
- PrEditor-0.2.0.dist-info/RECORD,,
149
+ PrEditor-0.3.0.dist-info/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
150
+ PrEditor-0.3.0.dist-info/METADATA,sha256=wl3HFhDCOPwPoRizXgfCytrF8KIK8T9ov7lYFXm51FI,9277
151
+ PrEditor-0.3.0.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
152
+ PrEditor-0.3.0.dist-info/entry_points.txt,sha256=mpe0HFD_oIEBNPTJNyUEbmMV6Ivrp4EuYyZ34C5d_PU,519
153
+ PrEditor-0.3.0.dist-info/top_level.txt,sha256=iX1_mrUOky_BQr2oG0l_MbEUYF6idyjiWSzu9z3irIw,9
154
+ PrEditor-0.3.0.dist-info/RECORD,,
@@ -28,17 +28,34 @@ class Director(io.TextIOBase):
28
28
  self.manager = manager
29
29
  self.state = state
30
30
 
31
+ # Keep track of whether we wrapped a std stream
32
+ # that way we don't .close() any streams that we don't control
33
+ self.std_stream_wrapped = False
34
+
31
35
  if old_stream is False:
32
36
  old_stream = None
33
37
  elif old_stream is None:
34
38
  if state == STDOUT:
35
- old_stream = sys.stdout
39
+ # On Windows if we're in pythonw.exe, then sys.stdout is named "nul"
40
+ # And it uses cp1252 encoding (which breaks with unicode)
41
+ # So if we find this nul TextIOWrapper, it's safe to just skip it
42
+ if getattr(sys.stdout, 'name', '') != 'nul':
43
+ self.std_stream_wrapped = True
44
+ old_stream = sys.stdout
36
45
  elif state == STDERR:
37
- old_stream = sys.stderr
46
+ if getattr(sys.stderr, 'name', '') != 'nul':
47
+ self.std_stream_wrapped = True
48
+ old_stream = sys.stderr
49
+
38
50
  self.old_stream = old_stream
39
51
 
40
52
  def close(self):
41
- if self.old_stream:
53
+ if (
54
+ self.old_stream
55
+ and not self.std_stream_wrapped
56
+ and self.old_stream is not sys.__stdout__
57
+ and self.old_stream is not sys.__stderr__
58
+ ):
42
59
  self.old_stream.close()
43
60
 
44
61
  super(Director, self).close()
preditor/version.py CHANGED
@@ -1,5 +1,5 @@
1
1
  # coding: utf-8
2
2
  # file generated by setuptools_scm
3
3
  # don't change, don't track in version control
4
- version = '0.2.0'
5
- version_tuple = (0, 2, 0)
4
+ version = '0.3.0'
5
+ version_tuple = (0, 3, 0)