Re: image in db to string to actual image
no not ascii art, just an application as described. thank you very much ! Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ Mauritius On Fri, 3 Aug 2018, 07:45 Gilmeh Serda, wrote: > On Thu, 02 Aug 2018 20:35:01 +0400, Abdur-Rahmaan Janhangeer wrote: > > > ah those can be used, thanks, and to write the actual image? > > pseudo code: > > store_to_whatever(path2bin): > my_storage.store(uuencode(path2bin)) > > get_image_from_storage(path2uue): > return uudecode(my_storage.read(path2uue)) > > RTM on uue and its siblings. > > Nb with uue you have to make about 30-40% more room for storage, yEnc is > the smallest, only adds about 5-10% to the output. I believe Mime/Base64 > is somewhere in between. > > Just thought of something: you didn't mean to interpret the image as > ASCII art, did you? UUE and stuff, are not for that. > > In that case, look into the software Jave (Java based). I think it might > be open source. > > -- > Gilmeh > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list
Re: Problems with wxPython _core_.pyd on windows98
On 02/08/18 18:02, Wanderer wrote: I have a laptop with windows 98 I use to connect to the OBD2 port on my car. I'm trying to install pyobd. I have a build for Python 2.7 for Windows98 that works but I'm having trouble with running wxPython. I get the following error. I'm sure you have your reasons, but of course Windows 98 hasn't been supported, by Python, Microsoft, or anybody else, for many years. Are you sure it wouldn't be easier to use a newer laptop or install Linux? Support for Windows 98 was dropped in Python 2.6. C:\pyobd>python pyobd.py Traceback (most recent call last): File "pyobd.py", line 28, in import wx File "C:\Python27\lib\site-packages\wx-3.0-msw\wx\__init__.py", line 45, in from wx_core import * File "C:\Python27\lib\site-packages\wx-3.0-msw\wx\_core.py", line4, in import _core_ Import Error: DLL load failed: A device attached to the system is not functioning. So what is going on? Do these pyd files need to be compiled specifically for win98? If so how do I do that? Does python compile these dlls or do I need a C compiler? If you want to compile extension modules, you need to C compiler Python was compiled with. I expect this is Visual C++ 6.0 for the last Win9x releases. Is there an old version of wxPython that will work on windows 98? -- https://mail.python.org/mailman/listinfo/python-list
Re: image in db to string to actual image
And what is your database? Maybe there is an API for the blob field On 08/02, Abdur-Rahmaan Janhangeer wrote: storing images in db is easy but to retrieve them natively how to? (ignore db type, using orm). meaning without PIL / Pillow. type : png like i'd like to have it as string, any idea ? Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ Mauritius -- https://mail.python.org/mailman/listinfo/python-list -- Stéphane Wirtel - https://wirtel.be - @matrixise -- https://mail.python.org/mailman/listinfo/python-list
Re: Dealing with errors in interactive subprocess running python interpreter that freeze the process
On 2 August 2018 at 20:54, wrote: > >> As others have mentioned, separate threads for the individual pipes >> may help, or if you need to go that far there are specialised >> libraries, I believe (pexpect is one, but from what I know it's fairly >> Unix-specific, so I'm not very familiar with it). > > I'm on Linux so pexpect is a possibility. > >> Sorry, but there's no "simple" answer here for you (although you may >> well be able to get something that works well enough for your specific >> needs - but it's not obvious from your snippet of code what you're >> trying to achieve). > > To send and receive text from a subprocess..even when there are exceptions. You can do this without threads on Linux using select (or similar): https://docs.python.org/3.7/library/select.html#select.select -- Oscar -- https://mail.python.org/mailman/listinfo/python-list
Re: Dealing with errors in interactive subprocess running python interpreter that freeze the process
On Sat, Aug 4, 2018 at 12:03 AM, Oscar Benjamin wrote: > On 2 August 2018 at 20:54, wrote: >> >>> As others have mentioned, separate threads for the individual pipes >>> may help, or if you need to go that far there are specialised >>> libraries, I believe (pexpect is one, but from what I know it's fairly >>> Unix-specific, so I'm not very familiar with it). >> >> I'm on Linux so pexpect is a possibility. >> >>> Sorry, but there's no "simple" answer here for you (although you may >>> well be able to get something that works well enough for your specific >>> needs - but it's not obvious from your snippet of code what you're >>> trying to achieve). >> >> To send and receive text from a subprocess..even when there are exceptions. > > You can do this without threads on Linux using select (or similar): > https://docs.python.org/3.7/library/select.html#select.select > Yes, but threads are simpler unless you already know how to use select. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: asyncio: Warning message when waiting for an Event set by AbstractLoop.add_reader
Thanks for the answer, but the problem is that this is happening in the built-in Event of the asyncio package; which is actually a coroutine. I don't expect the built-in to have this kind of behavior. I guess I'll have to dig on the source code of the asyncio default loop to actually understand how all the thing is behaving in the shadows. Maybe I'm simply doing something wrong. But it would mean that the documentation is lacking some details, or maybe that I'm just really stupid on this one. On 03/08/2018 07:05, dieter wrote: > Léo El Amri via Python-list writes: >> ... >> WARNING:asyncio:Executing took 1.000 seconds >> ... >> But there is still this warning... > > At your place, I would look at the code responsible for the warning. > I assume that it is produced because the waiting time is rather > high -- but this is just a guess. > -- https://mail.python.org/mailman/listinfo/python-list