Re: Choosing a Python IDE. what is your Pythonish recommendation? I do not know what to choose.

2017-01-04 Thread Chris Clark
Tried every python ide going, they either grind to a halt or just look messy.
Best one I ever used and stick with is drpython, years old, probably not 
maintained but does everything I want at a blistering speed and just looks 
perfect.





On Mon, Jan 2, 2017 at 11:41 AM +, "Antonio Caminero Garcia" 
mailto:tonycam...@gmail.com>> wrote:


Hello, I am having a hard time deciding what IDE or IDE-like code editor should 
I use. This can be overwhelming.

So far, I have used Vim, Sublime, Atom, Eclipse with PyDev, Pycharm, IntelliJ 
with Python plugin.

The thing with the from-the-scratch full featured IDEs (Eclipse, IntelliJ, 
Pycharm) is that they look like a space craft dashboard and that unwarranted 
resources consumption and the unnecessary icons. I want my IDE to be 
minimalistic but powerful. My screen should be mostly “made of code” as usually 
happens in Vim, Sublime or Atom. However, Pycharm is really cool and python 
oriented.

The problem with Vim is the learning curve, so I know the very basic stuff, but 
obviously not enough for coding and I do not have time to learn it, it is a 
pity because there are awesome plugins that turns Vim into a lightweight 
powerful IDE-like. So now it is not an option but I will reconsider it in the 
future, learning little by little. Also, I am not very fan GUI guy if the task 
can be accomplished through the terminal. However, I don’t understand why 
people underrate GUIs, that said I normally use shortcuts for the most frequent 
tasks and when I have to do something that is not that frequent then I do it 
with the mouse, for the latter case in vim you would need to look for that 
specific command every time.

Sublime is my current and preferred code editor. I installed Anaconda, Git 
integration and a couple of additional plugins that make sublime very powerful. 
Also, what I like about sublime compared to the full featured IDEs, besides the 
minimalism, is how you can perform code navigation back and forth so fast, I 
mean this is something that you can also do with the others but for some 
subjective reason I specifically love how sublime does it. The code completion 
in sublime I do not find it very intelligence, the SublimeCodeIntel is better 
than the one that Anaconda uses but the completions are not as verbose as in 
the IDEs.

Now, I am thinking about giving a try to Visual Studio Code Edition (take a 
look, it sounds good 
https://marketplace.visualstudio.com/items?itemName=donjayamanne.python). I 
need an editor for professional software development. What would you recommend 
to me?
--
https://mail.python.org/mailman/listinfo/python-list


This message is private and confidential and may also be legally privileged. If 
you have received this message in error, please email it back to the sender and 
immediately permanently delete it from your computer system. Please do not 
read, print, re-transmit, store or act in reliance on it or any attachments. 
British Airways may monitor email traffic data and also the content of emails, 
where permitted by law, for the purposes of security and staff training and in 
order to prevent or detect unauthorised use of the British Airways email 
system. Virus checking of emails (including attachments) is the responsibility 
of the recipient. British Airways Plc is a public limited company registered in 
England and Wales. Registered number: 177. Registered office: Waterside, PO 
Box 365, Harmondsworth, West Drayton, Middlesex, England, UB7 0GB. Additional 
terms and conditions are available on our website: www.ba.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Choosing a Python IDE. what is your Pythonish recommendation? I do not know what to choose.

2017-01-05 Thread Chris Clark
I want an IDE that I can use at work and home, linux and dare I say windows.

Sublime, had to remove it from my work PC as it is not licensed.

Atom, loved it until it slowed down.

VIM, ok the best if you know vi inside out.

Any JAVA based IDE, just slows up on work PC's due to all the background stuff 
that corporates insist they run.

Why can not someone more clever than I fork DrPython and bring it up to date.

Its is fast, looks great and just does the job ?

Its wx, no idea if that is good or bad but it just works.



From: Python-list  on 
behalf of ArnoB 
Sent: 05 January 2017 17:32:33
To: python-list@python.org
Subject: Re: Choosing a Python IDE. what is your Pythonish recommendation? I do 
not know what to choose.



On 02-01-17 12:38, Antonio Caminero Garcia wrote:
> Hello, I am having a hard time deciding what IDE or IDE-like code editor 
> should I use. This can be overwhelming.
>
> So far, I have used Vim, Sublime, Atom, Eclipse with PyDev, Pycharm, IntelliJ 
> with Python plugin.
>
> The thing with the from-the-scratch full featured IDEs (Eclipse, IntelliJ, 
> Pycharm) is that they look like a space craft dashboard and that unwarranted 
> resources consumption and the unnecessary icons. I want my IDE to be 
> minimalistic but powerful. My screen should be mostly “made of code” as 
> usually happens in Vim, Sublime or Atom. However, Pycharm is really cool and 
> python oriented.
>
> The problem with Vim is the learning curve, so I know the very basic stuff, 
> but obviously not enough for coding and I do not have time to learn it, it is 
> a pity because there are awesome plugins that turns Vim into a lightweight 
> powerful IDE-like. So now it is not an option but I will reconsider it in the 
> future, learning little by little. Also, I am not very fan GUI guy if the 
> task can be accomplished through the terminal. However, I don’t understand 
> why people underrate GUIs, that said I normally use shortcuts for the most 
> frequent tasks and when I have to do something that is not that frequent then 
> I do it with the mouse, for the latter case in vim you would need to look for 
> that specific command every time.
>
> Sublime is my current and preferred code editor. I installed Anaconda, Git 
> integration and a couple of additional plugins that make sublime very 
> powerful. Also, what I like about sublime compared to the full featured IDEs, 
> besides the minimalism, is how you can perform code navigation back and forth 
> so fast, I mean this is something that you can also do with the others but 
> for some subjective reason I specifically love how sublime does it. The code 
> completion in sublime I do not find it very intelligence, the 
> SublimeCodeIntel is better than the one that Anaconda uses but the 
> completions are not as verbose as in the IDEs.
>
> Now, I am thinking about giving a try to Visual Studio Code Edition (take a 
> look, it sounds good 
> https://marketplace.visualstudio.com/items?itemName=donjayamanne.python). I 
> need an editor for professional software development. What would you 
> recommend to me?

Hi Antonio,

Just an extra one in case you'll ever want to create
a nice GUI, then there's also QT Creator:
https://wiki.qt.io/QtCreator_and_PySide

A very simple but powerful interface a la XCode...

It integrates nicely with PySide:
https://wiki.qt.io/QtCreator_and_PySide

gr
Arno

--
https://mail.python.org/mailman/listinfo/python-list
This message is private and confidential and may also be legally privileged. If 
you have received this message in error, please email it back to the sender and 
immediately permanently delete it from your computer system. Please do not 
read, print, re-transmit, store or act in reliance on it or any attachments. 
British Airways may monitor email traffic data and also the content of emails, 
where permitted by law, for the purposes of security and staff training and in 
order to prevent or detect unauthorised use of the British Airways email 
system. Virus checking of emails (including attachments) is the responsibility 
of the recipient. British Airways Plc is a public limited company registered in 
England and Wales. Registered number: 177. Registered office: Waterside, PO 
Box 365, Harmondsworth, West Drayton, Middlesex, England, UB7 0GB. Additional 
terms and conditions are available on our website: www.ba.com
-- 
https://mail.python.org/mailman/listinfo/python-list


array and struct 64-bit Linux change in behavior Python 3.7 and 2.7

2019-12-02 Thread Chris Clark
Test case:

   import array
   array.array('L', [0])
# x.itemsize == 8  rather than 4

This works fine (returns 4) under Windows Python 3.7.3 64-bit build.

Under Ubuntu; Python 2.7.15rc1, 3.6.5, 3.70b3 64-bit this returns 8. 
Documentation at https://docs.python.org/3/library/array.html explicitly states 
'L' is for size 4.
It impacts all uses types of array (e.g. reading from byte strings).

The struct module is a little different:

import struct
x = struct.pack('L', 0)
# len(x) ===8 rather than 4

This can be worked around by using '=L' - which is not well documented - so 
this maybe a doc issue.

Wanted to post here for comments before opening a bug at 
https://bugs.python.org/

Is anyone seeing this under Debian/Ubuntu?


Chris

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


RE: array and struct 64-bit Linux change in behavior Python 3.7 and 2.7

2019-12-03 Thread Chris Clark
Thanks for all the replies (and apologies for top posting, I have a brain dead 
email client ☹).

I think the consensus from the various threads is that the docs are either 
lacking or misleading.

I mentioned that this impacts bytes and the problem there is more telling as it 
hard fails (this is how I first discovered this was an issue):

>>> array.array('L', b'\0\0\0\0')
Traceback (most recent call last):
  File "", line 1, in 
ValueError: string length not a multiple of item size

I don't believe the documentation is accurate by using the word "minimum". 
Minimum would suggest that it would accept a 4-byte value as a minimum and on 
64-bit it does *not*, it hard fails. If it were to document that, "the sizes 
are native integer types for the platform, the table documents some typical but 
*not* guaranteed sizes", that would be more clear.

For struct - I think the '<' and '=' non-padding docs could benefit from some 
explanation.. I'm not sure what yet 😊

I saw a few suggestions on alternatives for size specifications, I'm definitely 
in favor of that (right now I'm probing I and L to determine size before using 
them for real). I don’t think U prefix would work as array really only accepts 
a single specifier. If array was to be updated to use multiple character 
specifiers I would recommend matching the struct specifier (which it is close 
to at the moment) format.

For my uses case I'm seriously thinking about not using array moving forward 
and only using struct. I briefly wondered about ctypes (it has nice names, e.g. 
c_int64 that are unambiguous) but then I remembered it is not available in 
Jython).

With the benefit of hindsight it would have been better if array (and struct) 
used stdint.h types, those types and lengths are explicitly documented.

Regarding Barry's comment, yep size consistency with array is a pain - what I 
implemented as workaround is below (and likely to be my solution going forward):

x = array.array('L', [0])
if x.itemsize == 4:
FMT_ARRAY_4BYTE = 'L'
FMT_STRUCT_4BYTE = ' 
Sent: Monday, December 2, 2019 5:50 PM
To: python-list@python.org
Subject: Re: array and struct 64-bit Linux change in behavior Python 3.7 and 2.7

On 12/2/19 4:25 PM, Barry Scott wrote:
>
>> On 2 Dec 2019, at 17:55, Rob Gaddi  wrote:
>>
>> On 12/2/19 9:26 AM, Chris Clark wrote:
>>> Test case:
>>>import array
>>>array.array('L', [0]) # x.itemsize == 8  rather than 
>>> 4 This works fine (returns 4) under Windows Python 3.7.3 64-bit 
>>> build.
>>> Under Ubuntu; Python 2.7.15rc1, 3.6.5, 3.70b3 64-bit this returns 8. 
>>> Documentation at https://docs.python.org/3/library/array.html explicitly 
>>> states 'L' is for size 4.
>>> It impacts all uses types of array (e.g. reading from byte strings).
>>> The struct module is a little different:
>>> import struct
>>> x = struct.pack('L', 0)
>>> # len(x) ===8 rather than 4
>>> This can be worked around by using '=L' - which is not well documented - so 
>>> this maybe a doc issue.
>>> Wanted to post here for comments before opening a bug at 
>>> https://bugs.python.org/ 
>>> Is anyone seeing this under Debian/Ubuntu?
>>> Chris
>> I'd say not a bug, at least in array.  Reading that array documentation you 
>> linked, 4 is explicitly the MINIMUM size in bytes, not the guaranteed size.
> I'm wondering how useful it is that for array you can read from a file but 
> have no ideas how many bytes each item needs.
> If I have a file with int32_t  in it I cannot from the docs know how to read 
> that file into an array.
>
>> The struct situation is, as you said, a bit different.  I believe that with 
>> the default native alignment @, you're seeing 4-byte data padded to an 
>> 8-byte alignment, not 8-byte data.  That does seem to go against what the 
>> struct documentation says, "Padding is only automatically added between 
>> successive structure members. No padding is added at the beginning or the 
>> end of the encoded struct."
> The 'L' in struct is documented for 3.7 to use 4 bytes, but in fact uses 8, 
> on fedora 31. Doc bug?
>
>>>> x=struct.pack('L',0x102030405)
>>>> x
> b'\x05\x04\x03\x02\x01\x00\x00\x00'
>
> Given I have exact control with b, h, i, and q but L is not fixed in size I'm 
> not sure how it can be used with certainty across OS and versions.
>
> Barry
>
Actually, you DON'T have exact control with those sizes, it just happens that 
al