Re: Is there anything in the script which could cause it to not run its full course please?

2020-05-05 Thread Cameron Simpson

On 04May2020 17:17, ozst...@gmail.com  wrote:

On Tuesday, 5 May 2020 01:35:42 UTC+10, David Raymond  wrote:

Not necessarily the cause of your problem, but if you're going to compare dates 
it should be as objects, or as text as year-month-day. Here you're comparing 
dates as text in day-month-year format. So January first  comes before May 
4th 2020

"01-01-" < "04-05-2020"

[...]


Thank you, see what you mean. I have corrected this now.


It seem worth pointing out that this is why many of us like ISO8601 
dates, which are written from largest component to smallest component.  
For example:


   2020-05-04

They have the convenient property of sorting lexically as they would 
sort numerically.


But David's right on in saying that if you're comparing numbers, do it 
numerically. Comparing text when the underlying thing isn't text is the 
wrong approach.


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


Special issue on Recent Advances in Autonomous Vehicle Solutions in the Digital Continuum

2020-05-05 Thread SP

Special issue on Recent Advances in Autonomous Vehicle Solutions in the Digital 
Continuum

Computing Journal, Springer Nature
https://www.springer.com/journal/607/updates/17917580

SCOPE

The domain of autonomous vehicle computing systems is changing rapidly under 
the pressure of an intense competition, the continuous emergence of new markets 
and players. Research and development in autonomous vehicles poses many 
challenges and opportunities both in hardware and software across the Digital 
Continuum: from sensors at the Edge to HPC resources in the Cloud. Hardware 
requirements range from specific processor architectures, efficient SIMD 
processing on graphics processors, and efficient memory hierarchy. Similarly, 
software requirements range from operating system support and specialized image 
processing kernels, to efficient deep learning algorithms for scene and object 
detection. Special attention is paid to power limitations, cost for mass 
production, and safety.

This special issue of Computing addresses recent advances for autonomous 
vehicles in the Digital Continuum encompassing the Edge, Fog, and Cloud 
Computing. Topics of interest include, but are not limited to:

- Workload characterization and benchmarks for autonomous vehicles to be used 
in heterogeneous platforms.
- Special accelerator architectures and microarchitectures to be used on the 
Edge.
- Resource allocation approaches for autonomous vehicle computation needs.
- Scheduling heuristics and run time environment solutions to achieve better 
throughput in computing systems with different constraints.
- Framework and prototype experiences with integration of specialized 
components.
- Testbed implementations with heterogeneous computing resources for autonomous 
vehicles.
- Memory system design for specialized hardware.
- System impact of offloading computation including interconnect technology, 
bandwidth, and data processing.
- Programmability of heterogeneous hardware resources with variable distances.
- Techniques to facilitate configurability or configurable solutions.
- System evaluation and analysis of specialized platforms.

GUEST EDITORS

- Ozcan Ozturk (Lead Guest Editor), Bilkent University (TR),
- Sabri Pllana, Linnaeus University (SE), 
- Smaïl Niar, Université Polytechnique Hauts-de-France (FR), 
- Kaoutar El Maghraoui, IBM Thomas J. Watson Research Center (US).

TENTATIVE SCHEDULE

- Submission Due: 1st Sep 2020
- First Review Notification: 1st Nov 2020
- Revision Due: 1st Dec 2020
- Final Review Notification: 1st Feb 2021

SUBMISSION GUIDELINES

Formatting: All submitted manuscripts must be formatted according to 
Computing's Submission Guidelines/Instructions for Authors which are available 
at https://www.springer.com/journal/607. We will accept both LaTeX manuscripts 
(Springer templates to be found under Submission Guidelines/Instructions for 
Authors/Text) and word manuscripts (for which no templates are available).

Manuscript length: Please note that the page limit for Special Issue 
submissions differs from that of regular Computing submissions. Manuscripts 
submitted to the Special Issue should not exceed 20 pages. Submission that do 
not comply with this requirement are likely to be desk rejected without being 
reviewed.

Submission instruction: Manuscripts should be submitted using the online 
submission system at https://www.editorialmanager.com/comp/default.aspx. 
When submitting a manuscript for this special issue, authors should select ‘SI: 
Autonomous Vehicle Solutions in the Digital Continuum’ during the submission 
step 'Additional Information'.

Submissions of “extended versions” of already published works (e.g., 
conference/workshop papers) should be significantly extended with a relevant 
part of novel contribution (at least 30% new work). A “Summary of Differences” 
between the submitted paper to this special issue and the former one must be 
included.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Multiprocessing vs. concurrent.futures, Linux vs. Windows

2020-05-05 Thread Terry Reedy

On 5/4/2020 9:05 PM, John Ladasky wrote:

On Monday, May 4, 2020 at 4:09:53 PM UTC-7, Terry Reedy wrote:

[snip]


Hi Terry,

Thanks for your reply.  I have been hacking at this for a few hours.  I have 
learned two things:

1. Windows hangs unless you explicitly pass any references you want to use in 
the subprocess through args.  That would include the Pipe connection.
  Using multiprocessing in Linux requires the reference names to be global, 
however the use of args is not required.  Finally, Linux does not appear to 
cause any problems if args are specified.
2. Even if you fix problem 1, the parent process must be distinguished by creating the 
subprocess inside an "if __name__ == '__main__'" block.  Again, Linux just 
pushes on through, but Windows will hang if you don't do this.

The example code you posted shows exactly these two changes.  They are 
OS-specific, and my multiprocessing code has been (up to now) only required to 
run on Linux.  These recommendations can be found in the official Python docs, 
e.g.:

https://docs.python.org/3.7/library/multiprocessing.html#programming-guidelines


I was aware of point 2 (use __name__ clause) because there was a time 
when some of the examples in the doc did not do that, and they failed 
when run on Windows.  So there was a patch to fix the examples and add 
the explicit advice.


I must have read point 1 (pass resources in args) but forgot.  But 
knowing that the examples are, I believe, now tested on Windows, I 
looked for the one closest to your code and then saw the difference.


Good luck with moving forward.



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


Python Installation Problem

2020-05-05 Thread Adolf Yoshua Marbun
Dear Python,

I am currently learning about Python. First thing first, I need to install
the interpreter Python 3.8.2 before I get to the IDE. But, I have problem
during running command.

The installation was successful. When I try to run the command prompt,
typing "python --version", it always shows me an error message as attached
below this message. I tried to follow the message (reinstalling the
program), but didn't work. I don't know what it is and I have tried few
times to solve the problem from the internet.

I wish Python could help me find a solution. Thank you very much.


-- 
*Regards,*
*Adolf Yoshua Marbun*
-- 
https://mail.python.org/mailman/listinfo/python-list


Feature request: method to cancel or bail out from fileinput.input(inplace=True)

2020-05-05 Thread Sparr Risher
After using https://docs.python.org/3/library/fileinput.html to open a file for 
inplace filtering, a backup is created before output is redirected to the new 
file. It is possible, but non-trivial and non-obvious, to bail out of this 
situation, putting the backed up file back in place and ending the output 
redirection.

My request is for a .cancel() or similar method that will automate this bail 
out process, leaving the filesystem and streams in the state they were in 
before fileinput.input() was called.

The primary use case for this functionality would be upon encountering an 
exception in the middle of file processing.

While on the subject, I also believe the following additional functionality 
would be worthwhile, even without fulfillment of the main request:

A method to return the extension provided for the backup file, and/or to return 
the full name of the backup file.

A parameter to disallow silent overwrite of the backup file.
-- 
https://mail.python.org/mailman/listinfo/python-list


The '-c' CLI option removes just the command str.

2020-05-05 Thread Simon Forman via Python-list
Is this anything?  When you run a python command from the shell to just print 
the command line args you get this:

$ python -c "import sys; print(sys.argv)"
['-c']

But I would expect one of these:

Either the '-c' option consumes both args:

$ python -c "import sys; print(sys.argv)"
[]

Or it leaves them both in:

$ python -c "import sys; print(sys.argv)"
['-c', 'import sys; print(sys.argv)']


What do you think?

Warm regards,
~Simon

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


Re: Python Installation Problem

2020-05-05 Thread Rhodri James

On 05/05/2020 05:34, Adolf Yoshua Marbun wrote:

Dear Python,

I am currently learning about Python. First thing first, I need to install
the interpreter Python 3.8.2 before I get to the IDE. But, I have problem
during running command.

The installation was successful. When I try to run the command prompt,
typing "python --version", it always shows me an error message as attached
below this message. I tried to follow the message (reinstalling the
program), but didn't work. I don't know what it is and I have tried few
times to solve the problem from the internet.


Unfortunately this is a text-only mailing list, and your attachment was 
stripped off before any of us had the chance to see it.  Could you copy 
and paste the error message into a message, please?  Also if you could 
let us know what operating system you are using, some people may be able 
to offer more detailed advice.


--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list


Re: Python Installation Problem

2020-05-05 Thread MRAB

On 2020-05-05 23:20, Rhodri James wrote:

On 05/05/2020 05:34, Adolf Yoshua Marbun wrote:

Dear Python,

I am currently learning about Python. First thing first, I need to install
the interpreter Python 3.8.2 before I get to the IDE. But, I have problem
during running command.

The installation was successful. When I try to run the command prompt,
typing "python --version", it always shows me an error message as attached
below this message. I tried to follow the message (reinstalling the
program), but didn't work. I don't know what it is and I have tried few
times to solve the problem from the internet.


Unfortunately this is a text-only mailing list, and your attachment was
stripped off before any of us had the chance to see it.  Could you copy
and paste the error message into a message, please?  Also if you could
let us know what operating system you are using, some people may be able
to offer more detailed advice.

If you're using Windows and it's complaining that it can't find 
"python", try the Python launcher instead:


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


Re: print() ignores context ?

2020-05-05 Thread Greg Ewing

On 1/05/20 8:33 pm, R.Wieser wrote:


getcontext().rounding=ROUND_HALF_UP

print(round(1.5))
print(round(2.5))


If you're talking about getcontext() from the decimal module,
that only affects operations with Decimals, not regular floats.
Python doesn't provide a way to change the rounding mode for
floats.

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


Re: Python Installation Problem

2020-05-05 Thread Souvik Dutta
Have you added python to path? If not then you will have to do it.

Souvik flutter dev

On Wed, May 6, 2020, 1:28 AM Adolf Yoshua Marbun 
wrote:

> Dear Python,
>
> I am currently learning about Python. First thing first, I need to install
> the interpreter Python 3.8.2 before I get to the IDE. But, I have problem
> during running command.
>
> The installation was successful. When I try to run the command prompt,
> typing "python --version", it always shows me an error message as attached
> below this message. I tried to follow the message (reinstalling the
> program), but didn't work. I don't know what it is and I have tried few
> times to solve the problem from the internet.
>
> I wish Python could help me find a solution. Thank you very much.
>
>
> --
> *Regards,*
> *Adolf Yoshua Marbun*
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Installation Problem

2020-05-05 Thread Adolf Yoshua Marbun
Yes, I did. I did this before the installation began, checked the "add to
PATH" option.

On Wed, May 6, 2020 at 9:17 AM Souvik Dutta  wrote:

> Have you added python to path? If not then you will have to do it.
>
> Souvik flutter dev
>
> On Wed, May 6, 2020, 1:28 AM Adolf Yoshua Marbun <
> adolfbordeau...@gmail.com> wrote:
>
>> Dear Python,
>>
>> I am currently learning about Python. First thing first, I need to install
>> the interpreter Python 3.8.2 before I get to the IDE. But, I have problem
>> during running command.
>>
>> The installation was successful. When I try to run the command prompt,
>> typing "python --version", it always shows me an error message as attached
>> below this message. I tried to follow the message (reinstalling the
>> program), but didn't work. I don't know what it is and I have tried few
>> times to solve the problem from the internet.
>>
>> I wish Python could help me find a solution. Thank you very much.
>>
>>
>> --
>> *Regards,*
>> *Adolf Yoshua Marbun*
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>>
>

-- 
*Regards,*
*Adolf Yoshua Marbun*
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Installation Problem

2020-05-05 Thread Souvik Dutta
What is the error can you copy and paste? Because this list does not
support attachment.

Souvik flutter dev

On Wed, May 6, 2020, 7:49 AM Adolf Yoshua Marbun 
wrote:

> Yes, I did. I did this before the installation began, checked the "add to
> PATH" option.
>
> On Wed, May 6, 2020 at 9:17 AM Souvik Dutta 
> wrote:
>
>> Have you added python to path? If not then you will have to do it.
>>
>> Souvik flutter dev
>>
>> On Wed, May 6, 2020, 1:28 AM Adolf Yoshua Marbun <
>> adolfbordeau...@gmail.com> wrote:
>>
>>> Dear Python,
>>>
>>> I am currently learning about Python. First thing first, I need to
>>> install
>>> the interpreter Python 3.8.2 before I get to the IDE. But, I have problem
>>> during running command.
>>>
>>> The installation was successful. When I try to run the command prompt,
>>> typing "python --version", it always shows me an error message as
>>> attached
>>> below this message. I tried to follow the message (reinstalling the
>>> program), but didn't work. I don't know what it is and I have tried few
>>> times to solve the problem from the internet.
>>>
>>> I wish Python could help me find a solution. Thank you very much.
>>>
>>>
>>> --
>>> *Regards,*
>>> *Adolf Yoshua Marbun*
>>> --
>>> https://mail.python.org/mailman/listinfo/python-list
>>>
>>
>
> --
> *Regards,*
> *Adolf Yoshua Marbun*
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [ANN] Python Brain Teasers Book is Out

2020-05-05 Thread Miki Tebeka
Hi,

> Would be grateful if you could post it to python-authors also:
> https://mail.python.org/mailman/listinfo/python-authors
Done. Though list seems very dormant.

Thanks,
Miki
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [ANN] Python Brain Teasers Book is Out

2020-05-05 Thread Abdur-Rahmaan Janhangeer
Thanks a lot!

The list is very dormant and we have begun working
to make the list beneficial for the community. It is
supposed to be a resource place for Python literature
advice, from blog posts to books writing. I have also
removed your moderate flag so that your future messages
won't be held.

_disclaimer: a python-authors admin_

Kind Regards,

Abdur-Rahmaan Janhangeer
compileralchemy.com  | github

Mauritius


On Wed, May 6, 2020 at 8:05 AM Miki Tebeka  wrote:

> Hi,
>
> > Would be grateful if you could post it to python-authors also:
> > https://mail.python.org/mailman/listinfo/python-authors
> Done. Though list seems very dormant.
>
> Thanks,
> Miki
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: compiling 3.7.0 from source with custom libffi path

2020-05-05 Thread yuri . yudhaswana
Hi, I dont have "lib64" in libffi, are you sure it is "lib64" or just "lib"?

On Monday, 1 July 2019 21:32:46 UTC+9, tom...@gmail.com  wrote:
> On Monday, September 24, 2018 at 11:48:59 AM UTC+3, Fetchinson . wrote:
> > I'm trying to compile python 3.7.0 from source with a custom libffi
> > path and the compiler/linker doesn't seem to pick up the right
> > version. The system libffi doesn't have the development files so I've
> > installed the latest libffi (also from source) to /opt/custom but
> > still I get
> > 
> > INFO: Could not locate ffi libs and/or headers
> > 
> > Failed to build these modules:
> > _ctypes
> > 
> > Although I compile python with --prefix=/opt/custom because that's the
> > location I'd like to install it too. So how do I tell the build system
> > where to find my custom libffi?
> > 
> > Cheers,
> > Daniel
> > 
> > 
> > 
> > -- 
> > Psss, psss, put it down! - http://www.cafepress.com/putitdown
> 
> After some messing around with the build scripts, I figured it out. This 
> works for me:
> 
> 0. Choose installation path for FFI -> $LIBFFI_PATH
> 1. Configure, build, install libffi:
> 1a. Download libffi from https://sourceware.org/libffi/ and untar it
> 1b. ./configure --prefix $LIBFFI_PATH
> 1c. make
> 1d. make install
> 2. Configure CPython: (I'm using tcsh syntax, it is slightly different with 
> bash)
> 2a. setenv PKG_CONFIG_PATH $LIBFFI_PATH/lib/pkgconfig/
> 2b. setenv LDFLAGS "-L $LIBFFI_PATH/lib64/"
> 2c. /configure --with-pydebug
> 3. Build
> 3a. setenv LD_LIBRARY_PATH "${LIBFFI_PATH}/lib64/"
> 3b. make -s -j2 
> 
> Good luck!

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