Re: Grab metadata from images and save to file, batch mode

2016-04-01 Thread Dale Marvin

On 4/1/16 2:20 PM, accessnew...@gmail.com wrote:

I have a directory (and sub-directories) full of images that I want to cycle 
through and grab certain metadata values and save those values to a single row 
in a cvs file. I would like to tack on the full path name to the row as a 
separate value.

Folder
C:\Images\Family
Brother.jpg
Sister.jpg
Mom.jpg

Keys/Values
Original Date/Time
User Name
File Name

Thus, data might look like this in a Family.csv file
2014:11:10 13:52:12; BillyBob111; Brother.jpg; C:\Images\Family\Brother.jpg
2015:10:54 11:45:34; BillyBob111; Sister.jpg; C:\Images\Family\Sister.jpg
2010:10:31 19:22:11; SallySue232; Mom.jpg; C:\Images\Family\Mom.jpg

Big time noob. Much of what I have read cites command line examples dealing 
with single files and no info as to how to extract specific keys and their 
values.
What module would some of you users recommend I use (I want it to be python as 
that is what I am trying to learn)

Can you give me some coding suggestions to get me goings? I haven't found any 
substantive scripts to use as guides.

Many thanks in advance



Hi accessnewbie,

I do a fair amount of media processing and automation with python.
Look at exiftool 
There are python bindings as well .

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


Introduction

2016-04-01 Thread Dale Marvin
I just sent my first post, been using python for about 12 years to 
automate media production tasks.


Lately I've been adding testing (Thanks Ned Batchelder: 
<http://nedbatchelder.com/text/test0.html>), and documentation with 
Sphinx/rst.


Thanks

Dale Marvin
digital OutPost

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


Re: IoT automation

2018-01-28 Thread Dale Marvin via Python-list

On 1/28/18 7:39 AM, Prahallad Achar wrote:

Hello team,
Could you please help me out in automation of IoT product end to end

Regards
Prahallad



 ?

--Dale

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


Re: How do I make a video animation with transparent background?

2016-08-09 Thread Dale Marvin via Python-list

On 8/9/16 6:50 PM, Lawrence D’Oliveiro wrote:

On Wednesday, August 10, 2016 at 12:44:30 AM UTC+12, Martin Schöön wrote:


What I have failed to achieve is a graph with a transparent
background.


While it is possible to render image frames with alpha transparency channels, 
as far as I know none of the motion-video image formats supports transparency. 
They all assume that the image fills the entire frame and completely covers 
anything behind.

You could invent your own player which draws the frames one after another 
itself. Note that the JPEG image format doesn’t support transparency; you would 
have to use a bulkier format like PNG.

Another option would be to have an additional video track where the image is 
interpreted purely as transparency masking information for the “proper” video 
track. You would still need to write your own player to handle this.



Another option in the Python world is Vapoursynth:



I runs with Cython and generally pipes to something like ffmpeg which 
creates the final video file so it may be a more complex than you want 
but it is capable of the processing you are asking for and in a Python 
language syntax.


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


Re: Python 3: Launch multiple commands(subprocesses) in parallel (but upto 4 any time at same time) AND store each of their outputs into a variable

2016-08-23 Thread Dale Marvin via Python-list

On 8/23/16 8:15 PM, lax.cla...@gmail.com wrote:

> I am trying to:
>
> 1) Use Python 3+ (specifically 3.4 if it matters)
> 2) Launch N commands in background (e.g., like subprocess.call would 
for individual commands)

> 3) But only limit P commands to run at same time
> 4) Wait until all N commands are done
> 5) Have an array of N strings with the stdout+stderr of each command 
in it.

>
> What is the best way to do this?

The best way is a matter of opinion, I have had success using Celery 
with Redis. 


DAle

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


Re: Oh gods can we get any more off-topic *wink* [was Re: [Python-ideas] Inconsistencies]

2016-09-14 Thread Dale Marvin via Python-list

On 9/14/16 12:20 AM, Steven D'Aprano wrote:

On Wednesday 14 September 2016 16:54, Rustom Mody wrote:


everything we know will be negated in 5-50-500 years


I'm pretty sure that in 5, 50, 500 or even 5000 years, the sun will still rise
in the east, water will be wet, fire will burn, dogs will have mammary glands
and frogs[1] won't, and the square root of 100 will still be 10.

Isaac Asimov once wrote:

When people thought the earth was flat, they were wrong. When people
thought the earth was spherical, they were wrong. But if you think that
thinking the earth is spherical is just as wrong as thinking the earth
is flat, then your view is wronger than both of them put together.



http://chem.tufts.edu/AnswersInScience/RelativityofWrong.htm

[1] Assuming that there are any frogs left by then.



Funny, Asimov's professors must have taught him the same false history 
that I was taught at college. There's much evidence that medieval 
scholars did not believe the earth was flat.




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


Re: Oh gods can we get any more off-topic *wink* [was Re: [Python-ideas] Inconsistencies]

2016-09-14 Thread Dale Marvin via Python-list

On 9/14/16 5:40 PM, Steve D'Aprano wrote:


If you're going to criticise Asimov, don't criticise him for wrongly
thinking that people in the Middle Ages believed in a flat earth. There's
no evidence of that in his essay.



I didn't mean to criticize Asimov, but the History Professors, one in 
particular seemed to make it his life's purpose to say bad things about 
religion/bible etc.


I should have known better than to get into such an off-topic quagmire.

Dale

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


Re: julian 0.14 library

2018-04-04 Thread Dale Marvin via Python-list


>> On 2018-04-04 05:44, Chris Angelico wrote:
>>> On Wed, Apr 4, 2018 at 12:24 PM, sum abiut  wrote:
 Hi,
 Has anyone try this https://pypi.python.org/pypi/julian/0.14

 i got this error trying to import julian

>>> import julian
 Traceback (most recent call last):
File "", line 1, in 
File "/usr/local/lib/python2.7/dist-packages/julian/__init__.py",
>> line 1,
 in 
  from julian.julian import to_jd, from_jd
File "/usr/local/lib/python2.7/dist-packages/julian/julian.py", 
line

>> 5
  def __to_format(jd: float, fmt: str) -> float:
^
 SyntaxError: invalid syntax

>>>
>>> Looks like that package requires Python 3, but was uploaded to PyPI
>>> without any version tags. You could try running it in Python 3.x, but
>>> there's no way to know which ".x" versions are going to work.
>>
>> the cheeseshop description says 3.2+
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>>
On 4/4/18 3:35 PM, sum abiut wrote:

I got the error  below, tryinig in on python 3.2.

import julian
Traceback (most recent call last):
   File "", line 1, in 
ImportError: No module named julian


On Thu, Apr 5, 2018 at 3:21 AM, Thomas Jollans  wrote:



Did you pip install julian into your python 3.2 installation?
You may need type pip3 install julian depending upon how your python was 
installed.


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


Re: curses, ncurses or something else

2018-07-23 Thread Dale Marvin via Python-list

On 7/23/18 3:24 PM, John Pote wrote:
I recently wrote a command line app to take a stream of numbers, do some 
signal processing on them and display the results on the console. There 
may be several output columns of data so a title line is printed first. 
But the stream of numbers may be several hundred long and the title line 
disappears of the top on the console.


So I thought it might be quick and easy to do something with curses to 
keep the title line visable while the numbers roll up the screen. But 
alas I'm a Windows user and the 'curses' module is not in the Windows 
standard library for Python.


It occured to me that I could create a simple tkinter class but I 
haven't tinkered for some time and would have to refresh my knowledge of 
the API. Just wondered if there was any other simple way I could keep 
the title line on the console, preferably without having to install 
another library.


Ideas invited.




You didn't tell us much about your application but for analysis and 
display I like Jupiter Notebook. Plus it's easy to add graphs etc.


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


Re: Python for System Verilog testbench

2018-09-14 Thread Dale Marvin via Python-list

On 9/14/18 11:41 AM, Bobby wrote:

Hi George

WOW!  thanks for the reply and specially thanks for using the word 'BDD'. I
read the articles regarding BDD the whole day and understood the concepts.
Now will get this Pytest test framework with pytest bdd plugin. I found out
it follows this Gherkin syntax. Then I read about this Gherkin synatx. It
also looks good specially for Verilog. Maybe the syntax I was following
earlier is too complicated.

Some more questions regarding this:

- I read that there are other Python framweorks also
for BDD like 'behave'. What do you suggest as a beginner is Pytest-bdd is
easier or 'behave' ?

- If I am able to successfully map the requirements in pytest-bdd following
this Gherkins syntax, in the end what we get is Python code. To proceed
further, will I have to use Python to Verilog parser for the final Verilog
kind of structure?



Hi Bobby,
It's better to either bottom post, or inline your comments as the thread 
gets mangled in the archives.


There is MyHDL that may be of some use: 

"MyHDL turns Python into a hardware description and verification 
language, providing hardware engineers with the power of the Python 
ecosystem."


It supports synthesis from the Python RTL Models:


- Dale




On Friday, September 14, 2018, George Fischhof  wrote:



Bobby  ezt írta (időpont: 2018. szept. 14., P

0:16):


I have a very simple System Verilog (SV) adder as my DUT (device under

test). I would like to  generate a test bench for this DUT based on the
'requirements'. I wrote its  (DUT) functions in simple text as
'requirements' while following a particular syntax. Now through  the help
of grammar, I would like to give the requirement input to the grammar.


Questions:

  (1) Considering my end goal, i.e. to generate some particular parts

of

  SV testbench from requirements, any good python parser

available ?


  (2) If I use python parser, will any kind of python scripting will

help me to generate the testbench in SV for my DUT ? My confusion at this
point is that most of all the literature I am reading suggests linguistic
techniques. Any non-linguistic technique ?



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


Hi,
Perhaps you should check articles about BDD,  and you can use PyTest test

framework with pytest-bdd plugin

__george__



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