[issue40765] clear screen in idle

2020-05-25 Thread sagar


New submission from sagar :

please provide clear screen option in windows idle.
clear screen means moving command line to start of the page.

--
assignee: terry.reedy
components: IDLE
messages: 369870
nosy: sagarkancharlas, terry.reedy
priority: normal
severity: normal
status: open
title: clear screen in idle
type: behavior
versions: Python 3.10

___
Python tracker 
<https://bugs.python.org/issue40765>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35543] re.sub is only replacing max. of 2 string found by regexp.

2018-12-20 Thread Sagar


New submission from Sagar :

Below are the logs:

>>> dat = '"10GE" "4x" "AMPC" "B3" "BUILTIN" "DOWN" "LU" "SFP+" "ether" "xe" 
>>> "DOWN" "MPC" "BUILTIN"'
>>> type = 
>>> re.subn(r'\"BUILTIN\"|\"B\d\"|\"I\d\"|\"LU\"|\"Trinity\"|\"Trio\"|\"DOWN\"|\"UNKNOWN\"|'
... r'^AND$|\"Q\"|\"MPC\"|\"EA\d\"|\"3D\"', '', dat, re.I)
>>> type
('"10GE" "4x" "AMPC"   "DOWN" "LU" "SFP+" "ether" "xe" "DOWN" "MPC" "BUILTIN"', 
2)
>>> dat = '"10GE" "4x" "AMPC"   "DOWN" "LU" "SFP+" "ether" "xe" "DOWN" "MPC" 
>>> "BUILTIN"'
>>> type = 
>>> re.subn(r'\"BUILTIN\"|\"B\d\"|\"I\d\"|\"LU\"|\"Trinity\"|\"Trio\"|\"DOWN\"|\"UNKNOWN\"|'
... r'^AND$|\"Q\"|\"MPC\"|\"EA\d\"|\"3D\"', '', dat, re.I)
>>> type
('"10GE" "4x" "AMPC" "SFP+" "ether" "xe" "DOWN" "MPC" "BUILTIN"', 2)
>>> dat = '"10GE" "4x" "AMPC" "SFP+" "ether" "xe" "DOWN" "MPC" "BUILTIN"'
>>> type = 
>>> re.subn(r'\"BUILTIN\"|\"B\d\"|\"I\d\"|\"LU\"|\"Trinity\"|\"Trio\"|\"DOWN\"|\"UNKNOWN\"|'
... r'^AND$|\"Q\"|\"MPC\"|\"EA\d\"|\"3D\"', '', dat, re.I)
>>> type
('"10GE" "4x" "AMPC" "SFP+" "ether" "xe"   "BUILTIN"', 2)
>>> dat = '"10GE" "4x" "AMPC" "SFP+" "ether" "xe"   "BUILTIN"'
>>> type = 
>>> re.subn(r'\"BUILTIN\"|\"B\d\"|\"I\d\"|\"LU\"|\"Trinity\"|\"Trio\"|\"DOWN\"|\"UNKNOWN\"|'
... r'^AND$|\"Q\"|\"MPC\"|\"EA\d\"|\"3D\"', '', dat, re.I)
>>> type
('"10GE" "4x" "AMPC" "SFP+" "ether" "xe"   ', 1)
>>>

--
components: Library (Lib)
messages: 332198
nosy: saga
priority: normal
severity: normal
status: open
title: re.sub is only replacing max. of 2 string found by regexp.
type: behavior
versions: Python 3.5

___
Python tracker 
<https://bugs.python.org/issue35543>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42034] Unchecked return in Objects/typeobject.c and possible uninitialized variables in cls and new_mro

2020-10-14 Thread Sagar Pant


New submission from Sagar Pant :

The return value of a function that is potentially used to initialize a local 
variable is not checked. Therefore, reading the local variable may result in 
undefined behavior.

Our AI analyzer found that this function is called for a total of 43 times. Out 
of these 43 times, the return value from the function call is checked at 42 
instances. This is the only instance where the code misses to check the return 
value for success or failure.

Once such correct reference usage found in Python/hamt.c at line 2805 .

--
components: C API
messages: 378615
nosy: sagar
priority: normal
severity: normal
status: open
title: Unchecked return in Objects/typeobject.c and possible uninitialized 
variables in cls and new_mro
type: enhancement

___
Python tracker 
<https://bugs.python.org/issue42034>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42036] Unchecked return in Modules/posixmodule.c from multiple function calls

2020-10-14 Thread Sagar Pant

New submission from Sagar Pant :

The return value of a function that is potentially used to initialize a local 
variable is not checked. Therefore, reading the local variable may result in 
undefined behavior.

Our AI analyzer flagged it to be a potential bug as it found another usage of 
the function in the codebase where the return value of the function was checked 
for success/failure before using it’s parameters.

--
components: C API
messages: 378623
nosy: sagar
priority: normal
severity: normal
status: open
title: Unchecked return in Modules/posixmodule.c from multiple function calls
type: enhancement

___
Python tracker 
<https://bugs.python.org/issue42036>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42034] Unchecked return in Objects/typeobject.c and possible uninitialized variables in cls and new_mro

2020-10-14 Thread Sagar Pant


Change by Sagar Pant :


--
components: +Library (Lib) -C API

___
Python tracker 
<https://bugs.python.org/issue42034>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42036] Unchecked return in Modules/posixmodule.c from multiple function calls

2020-10-14 Thread Sagar Pant


Change by Sagar Pant :


--
components: +Library (Lib) -C API

___
Python tracker 
<https://bugs.python.org/issue42036>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42036] Unchecked return in Modules/posixmodule.c from multiple function calls

2020-10-27 Thread Sagar Pant


Sagar Pant  added the comment:

Bumping this up for updates.

--

___
Python tracker 
<https://bugs.python.org/issue42036>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42034] Unchecked return in Objects/typeobject.c and possible uninitialized variables in cls and new_mro

2020-10-27 Thread Sagar Pant


Sagar Pant  added the comment:

Bumping this up for updates.

--

___
Python tracker 
<https://bugs.python.org/issue42034>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26064] directory is getting separated

2016-01-09 Thread Sagar Kar

New submission from Sagar Kar:

In [108]: os.mkdir('newdir') # make new dir
In [140]: p = os.path.abspath('newdir')

In [141]: p
Out[141]: 
'/media/sagarkar10/sdrive/programing/python/SciPy/scipy-notebook/newdir'

## here 'newdir' is also a directory with a file inside

In [143]: os.path.dirname(p)
Out[143]: '/media/sagarkar10/sdrive/programing/python/SciPy/scipy-notebook'

## but os.path.dirname() dont show it under directory it treats as if its a 
file and till the last '/' is the directory
and also 

In [145]: os.path.basename(p)
Out[145]: 'newdir'

## basename shows it

--
components: Extension Modules
messages: 257849
nosy: sagarkar10
priority: normal
severity: normal
status: open
title: directory is getting separated
type: enhancement
versions: Python 3.4

___
Python tracker 
<http://bugs.python.org/issue26064>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com