Re: The following modules appear to be missing ['_sysconfigdata']

2019-01-11 Thread dude . jimbo
Really, no-one?

OK, more purging then. I ~think~ I need said missing component because the 
script gets the system date (to run once on a Friday, in automatic mode). But 
I've never used it in automatic mode (since I came to my senses about having an 
infinite looping script in my autoexec.bat, doing nothing, except executing 
once on a friday, and wasting resources).

So, if I scrap the automatic mode, I guess I might finally have something that 
'works'.

Still disappointed though that I can't get it to work again with the same 
'tools' as previously. Especially since I also use the date to add to the name 
of the backup files that the script is making.

Oh, as for 'distributing' this thing. It's a private/personal script, so I'm my 
only customer. In this sense, I don't even need the EXE now that I've scrapped 
automatic mode. I can just run the *.py straight from a console. Oh well.

Would anyone be interested in seeing the - now infamous - script, to have a go 
yourself?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: The following modules appear to be missing ['_sysconfigdata']

2019-01-11 Thread dude . jimbo
Oh, another thing. I installed WX via a windows installer that I found (can't 
find the link again, but fairly certain it was this one: 
https://sourceforge.net/projects/wxpython/ (*)), without giving it much thought 
(yesyes bad mistake).

Since I get wx runtime errors, I'm assuming I have the wrong version. So, in 
all my 45-yo youthful ignorance, I ran 'pip install -U wxPython' hoping it 
would magically erase the previously installed version - whatever that is - and 
get me the newest one. What actually happens is the cmd-window freezing, and 
nothing else…

(*) The 'proper' method to install it, I obviously found on 
"https://wiki.wxpython.org/How%20to%20install%20wxPython#Windows";, but that led 
me to 'pip', which at that moment in time - 2 days ago LOL - I was not ready 
for yet (Hey, I'm doing this in between actual work, putting kids in bed, and 
passing out on the sofa)
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: The following modules appear to be missing ['_sysconfigdata']

2019-01-11 Thread dude . jimbo
OK, stop the presses. Or, rather, refresh your browser, I guess.

In a 'what the !@$$ am I doing'-moment (I don't get those often) I uninstalled 
everything and went gardening. But it was raining so I installed everything 
again, this time using pip for wxpython. Lo and behond, this time it did not 
crash the cmd-window, but in stead it successfully installed it.

Woot.

Then I compiled again with same command and same setup.py and - stubbornly - 
with py2exe, and got… different errors! That's actually a good sign. No, really.

Because this time, the error was about missing Windows DLLs and here I got 
plenty of help from my best friend Google (don't tell JackD he's actually 
second best friend). So, after x iterations I ended up with the following cute 
setup.py:
<-
from distutils.core import setup
import py2exe

setup(console=['AutoArchive.py'],

  options={
'py2exe': { 
'dll_excludes': ['api-ms-win-core-string-l1-1-0.dll', 
'api-ms-win-core-psapi-l1-1-0.dll', 'api-ms-win-core-registry-l1-1-0.dll',
 'api-ms-win-core-localization-l1-2-0.dll', 
'api-ms-win-security-base-l1-1-0.dll', 
'api-ms-win-core-string-obsolete-l1-1-0.dll',
 'api-ms-win-core-delayload-l1-1-0.dll', 
'api-ms-win-core-handle-l1-1-0.dll', 'api-ms-win-crt-private-l1-1-0.dll',
 'api-ms-win-core-libraryloader-l1-2-1.dll', 
'api-ms-win-core-memory-l1-1-0.dll', 'api-ms-win-core-heap-obsolete-l1-1-0.dll',
 'api-ms-win-core-atoms-l1-1-0.dll', 
'api-ms-win-core-processthreads-l1-1-1.dll', 'api-ms-win-core-heap-l2-1-0.dll',
 'api-ms-win-core-delayload-l1-1-1.dll', 
'api-ms-win-core-processthreads-l1-1-0.dll', 
'api-ms-win-core-com-midlproxystub-l1-1-0.dll',
 'api-ms-win-crt-string-l1-1-0.dll', 
'api-ms-win-crt-runtime-l1-1-0.dll', 'api-ms-win-core-libraryloader-l1-2-0.dll',
 'api-ms-win-core-errorhandling-l1-1-0.dll', 
'api-ms-win-core-string-l2-1-0.dll', 'api-ms-win-core-synch-l1-2-0.dll',
 'api-ms-win-core-profile-l1-1-0.dll', 
'api-ms-win-core-synch-l1-1-0.dll', 
'api-ms-win-core-threadpool-legacy-l1-1-0.dll',
 'api-ms-win-core-interlocked-l1-1-0.dll', 
'api-ms-win-core-debug-l1-1-0.dll', 'api-ms-win-core-sysinfo-l1-1-0.dll']
  }
 },
  )
->

After which all the missing DLL errors were finally gone (and no, I don’t wanna 
know why all of the above is even necessary). Success!! Or not? Because I was 
now right back at:

<-
The following modules appear to be missing
['Carbon.Appearance', '_sysconfigdata']
->

You cannot possibly be serious!? _sysconfigdata is back… with a friend!

Luckily it was still raining so my plan to blow up the PC in my garden fire pit 
(and dancing hysterically around the glorious resulting bonfire, while in the 
nude) got scrapped, which allowed me to notice that an actual dist folder had 
in fact been created, and not just that, there was an EXE inside!

So I ran it.

and it worked.

It worked!

It did exactly what it needed to do. Just like on my old machine. I even got 
the fancy progress popup and the date string in my file names.

(At this point I ~did~ dance in the nude, albeit in front of the PC)

So what lessons did I learn:
1) compile errors apparently mean Sweet-BLEEP-All;
2) close the curtains when dancing naked around the PC;
3) the back of modern day PCs, which typically sit at groin height on your 
desk, get really hot at the back. Avoid contact with exposed body parts;
4) there's clearly a reason why I 'gave up on Python' those 10 years ago, and 
perhaps I'm slowly starting to remember why… :|

Jimbo.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: The following modules appear to be missing ['_sysconfigdata']

2019-01-11 Thread dude . jimbo
OK, stop the presses. Or, rather, refresh your browser, I guess.

In a 'what the !@#$ am I doing'-moment (I don't get those often) I uninstalled 
everything and went gardening. But it was raining so I installed everything 
again, this time using pip for wxpython. Lo and behond, this time it did not 
crash the cmd-window, but in stead it successfully installed it.

Woot.

Then I compiled again with same command and same setup-py and - stubbornly - 
with py2exe, and got… different errors! That's actually I good sign. No, really.

Because this time, the error was about missing Windows DLLs and for these I got 
plenty of help from my best friend Google (don't tell JackD he's actually 
second best friend). So, after x iterations I ended up with the following cute 
setup.py:
<-
from distutils.core import setup
import py2exe

setup(console=['AutoArchive.py'],

  options={
'py2exe': { 
'dll_excludes': ['api-ms-win-core-string-l1-1-0.dll', 
'api-ms-win-core-psapi-l1-1-0.dll', 'api-ms-win-core-registry-l1-1-0.dll',
 'api-ms-win-core-localization-l1-2-0.dll', 
'api-ms-win-security-base-l1-1-0.dll', 
'api-ms-win-core-string-obsolete-l1-1-0.dll',
 'api-ms-win-core-delayload-l1-1-0.dll', 
'api-ms-win-core-handle-l1-1-0.dll', 'api-ms-win-crt-private-l1-1-0.dll',
 'api-ms-win-core-libraryloader-l1-2-1.dll', 
'api-ms-win-core-memory-l1-1-0.dll', 'api-ms-win-core-heap-obsolete-l1-1-0.dll',
 'api-ms-win-core-atoms-l1-1-0.dll', 
'api-ms-win-core-processthreads-l1-1-1.dll', 'api-ms-win-core-heap-l2-1-0.dll',
 'api-ms-win-core-delayload-l1-1-1.dll', 
'api-ms-win-core-processthreads-l1-1-0.dll', 
'api-ms-win-core-com-midlproxystub-l1-1-0.dll',
 'api-ms-win-crt-string-l1-1-0.dll', 
'api-ms-win-crt-runtime-l1-1-0.dll', 'api-ms-win-core-libraryloader-l1-2-0.dll',
 'api-ms-win-core-errorhandling-l1-1-0.dll', 
'api-ms-win-core-string-l2-1-0.dll', 'api-ms-win-core-synch-l1-2-0.dll',
 'api-ms-win-core-profile-l1-1-0.dll', 
'api-ms-win-core-synch-l1-1-0.dll', 
'api-ms-win-core-threadpool-legacy-l1-1-0.dll',
 'api-ms-win-core-interlocked-l1-1-0.dll', 
'api-ms-win-core-debug-l1-1-0.dll', 'api-ms-win-core-sysinfo-l1-1-0.dll']
  }
 },
  )
->

After which all the missing DLL errors were finally gone (and no, I don’t wanna 
know why all of the above is even necessary). Success!! Or not? Because I was 
now right back at:

<-
The following modules appear to be missing
['Carbon.Appearance', '_sysconfigdata']
->

You cannot possibly be serious!? _sysconfigdata is back… with a friend!

Luckily it was still raining so my plan to blow up the PC in my garden fire pit 
(and dancing hysterically around the glorious resulting bonfire, while in the 
nude) got scrapped, which allowed me to notice that an actual dist folder had 
in fact been created, and not just that, there was an EXE inside!

So I ran it.

and it worked.

It worked!

It did exactly what it needed to do. Just like on my old machine. I even got 
the fancy progress popup and the date string in my file names.

(At this point I ~did~ dance in the nude, albeit in front of the PC)

So what lessons did I learn:
1) compile errors apparently mean Sweet-BLEEP-All;
2) close the curtains when dancing naked around the PC;
3) the back of modern day PCs, which typically sit at groin height on your 
desk, get really hot at the back. Avoid contact with exposed and/or dangling 
body parts;
4) there's clearly a reason why I 'gave up on Python' those 10 years ago, and 
perhaps I'm slowly starting to remember why… :|

Jimbo.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: python setup problems

2019-01-11 Thread Enas Ahmed Zaki
I want help in solving this problem please
thanks
Enas

On Fri, Jan 11, 2019 at 2:36 PM Enas Ahmed Zaki  wrote:

> Dear sir,
> when I setup the python there is a problem in attached file. I hope I
> found the solution of it.
> thanks for attention
> Eng. Enas Ahmed Zaky
>
> عدم التعرض للفيروسات www.avast.com
> 
> 
> <#m_6099717795028892700_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Python read text file columnwise

2019-01-11 Thread shibashibani
Hello,

I'm very new in python. I have a file in the format:

2018-05-31  16:00:0028.90   81.77   4.3
2018-05-31  20:32:0028.17   84.89   4.1
2018-06-20  04:09:0027.36   88.01   4.8
2018-06-20  04:15:0027.31   87.09   4.7
2018-06-28  04.07:0027.87   84.91   5.0
2018-06-29  00.42:0032.20   104.61  4.8
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python read text file columnwise

2019-01-11 Thread shibashibani
Hello
> 
> I'm very new in python. I have a file in the format:
> 
> 2018-05-3116:00:0028.90   81.77   4.3
> 2018-05-3120:32:0028.17   84.89   4.1
> 2018-06-2004:09:0027.36   88.01   4.8
> 2018-06-2004:15:0027.31   87.09   4.7
> 2018-06-2804.07:0027.87   84.91   5.0
> 2018-06-2900.42:0032.20   104.61  4.8

I would like to read this file in python column-wise.  

I tried this way but not working 
  event_list = open('seismicity_R023E.txt',"r")
info_event = read(event_list,'%s %s %f %f %f %f\n');
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python read text file columnwise

2019-01-11 Thread Rich Shepard

On Fri, 11 Jan 2019, shibashib...@gmail.com wrote:


I'm very new in python. I have a file in the format:

2018-05-31  16:00:0028.90   81.77   4.3
2018-05-31  20:32:0028.17   84.89   4.1
2018-06-20  04:09:0027.36   88.01   4.8
2018-06-20  04:15:0027.31   87.09   4.7
2018-06-28  04.07:0027.87   84.91   5.0
2018-06-29  00.42:0032.20   104.61  4.8


  So? What do you want to do with it? Are the fields fixed length?
Tab-separated? Space-separated? Regardless of what you want to do, replace
all whitespace with commas.

Rich
--
https://mail.python.org/mailman/listinfo/python-list


celery + mongodb + RMQ + Flower service/app skeleton

2019-01-11 Thread Sivan Grünberg
Hi All,

 - -  https://github.com/sivang/laten-fw

 After some extensive work with Celery over the last 2 years, I created
this 'framework' skeleton with an example application, so anybody who wants
to get up and running with Celery but gets confused from the tutorials and
examples out there, can do so merely by running an ansible playbook.

 This was tested on Ubuntu 16.04 to 18.10 , and can be used out of the box
to write and experiment with your own tasks. It can sure use more docs for
the resulting setup, and operating it through flower and mongo-express.

 I have plans to turn this into something that can accept tasks over the
wire, from document stores and offer some sorts of Web UI of its own.
There's also slides at the root for a related talk I gave about my takeouts
from working with the above setup for Audio file analysis and ETL (and this
sort of example is also coming soon to a github near you..).

 Your feedback welcomed,

-Sivan
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python read text file columnwise

2019-01-11 Thread Piet van Oostrum
shibashib...@gmail.com writes:

> Hello
>> 
>> I'm very new in python. I have a file in the format:
>> 
>> 2018-05-31   16:00:0028.90   81.77   4.3
>> 2018-05-31   20:32:0028.17   84.89   4.1
>> 2018-06-20   04:09:0027.36   88.01   4.8
>> 2018-06-20   04:15:0027.31   87.09   4.7
>> 2018-06-28   04.07:0027.87   84.91   5.0
>> 2018-06-29   00.42:0032.20   104.61  4.8
>
> I would like to read this file in python column-wise.  
>
> I tried this way but not working 
>   event_list = open('seismicity_R023E.txt',"r")
> info_event = read(event_list,'%s %s %f %f %f %f\n');

Why would you think that this would work?

See https://docs.python.org/3/library/csv.html

Something like:

#!/usr/bin/env python3

import csv

with open('testcsv.csv', newline='') as csvfile:
reader = csv.reader(csvfile, delimiter='\t')
for row in reader:
for i in range(2, 5):
row[i] = float(row[i])
print(row)

You could convert the first two columns to datetime format if you wish.
-- 
Piet van Oostrum 
WWW: http://piet.vanoostrum.org/
PGP key: [8DAE142BE17999C4]
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python read text file columnwise

2019-01-11 Thread Cameron Simpson

On 11Jan2019 12:43, shibashib...@gmail.com  wrote:

I'm very new in python. I have a file in the format:

2018-05-31  16:00:0028.90   81.77   4.3
2018-05-31  20:32:0028.17   84.89   4.1
2018-06-20  04:09:0027.36   88.01   4.8
2018-06-20  04:15:0027.31   87.09   4.7
2018-06-28  04.07:0027.87   84.91   5.0
2018-06-29  00.42:0032.20   104.61  4.8


It is unclear what delimits the columns, but it looks like whitespace: 
tabs and/or spaces.


You could read the file a line at a time and call .split() on each line 
to get the nonwhitespace fields, which would seem to correspond to the 
columns above.


That gets you an list of strings; then you could convert them for 
processing as required.


Cheers,
Cameron Simpson 
--
https://mail.python.org/mailman/listinfo/python-list