00 << no, I want just 2 or 2.
Maybe you're looking for "{:.3g}"
print "{:.3g}".format(2)
# '2'
print "{:.3g}".format(2.00)
# '2'
print "{:.3g}".format(2.35)
# '2.35'
print "{:.3g}".format(2.356) # this rounds up
# '2.36'
Cheers,
-- Adrien
--
http://mail.python.org/mailman/listinfo/python-list
Boost.Python; some trial & error is often necessary to find out
what the parameters of a function should be;
- it may be overkill if you just want to do some basic image processing
(maybe scikits-image is a better choice there?).
Hope this helps,
Adrien
Le 29/11/2012 07:53, Alasdair McAndrew a é
Hi,
Did you try the list.update() builtin function ?
Regards
Peter Otten a écrit :
> Alfons Nonell-Canals wrote:
>
>> I have different sets/dictionaries/lists (whatever you want because I
>> can convert them easily) and I would like to combine them. I don't want
>> a consensus and something lik
If you'are looking for hosting some Python in the cloud, let me introduce you
to http://python-cloud.com/
This PaaS platform can automatically scale up and down your application
regarding your traffic. You can also finely customize if you want vertical,
horizontal or both types of scalabilit
eturned by importlib.machinery.PathFinder.find_spec()
> <https://docs.python.org/3/library/importlib.html#importlib.machinery.PathFinder.find_spec>
> will be the actual current working directory and not the empty string.
>
What I am interested in is what is the reason of this difference ?
P.S.:
- My english may suck a bit, please blame it on me being a French native
speaker
- Sorry if the colours hurt 😅
*Adrien OYONO*
--
https://mail.python.org/mailman/listinfo/python-list
Release works, but I have a bad feeling
about it :-)
Any help would be welcome! Thanks in advance.
Adrien.
--
https://mail.python.org/mailman/listinfo/python-list
Hello,
Thank you for your work. Just discovering python.
My issue steps were :
- 3.5 installed
- friend codes in 2.7
- server scripts can t run on my laptop (cant find module 0o)
- whatever, must be 3.5 / 2.7 issues
- let's try virtualenv
- can t download virtualenvwrapper-powershell : error X t
Hi again, Correct guess, virtualenvwrapper-powershell correctly installed
under 2.7 :)
On Sun, 15 Nov 2015 at 12:31 Adrien Viala <
[email protected]> wrote:
> Hello,
>
> Thank you for your work. Just discovering python.
>
> My issue steps were :
> -