[issue18967] Find a less conflict prone approach to Misc/NEWS

2016-10-06 Thread Nick Coghlan
Nick Coghlan added the comment: I came across OpenStack's tool for this problem today: http://docs.openstack.org/developer/reno/design.html I think it's significantly more complex than we need for CPython, but also still interesting as a point of reference. It's already mentioned in PEP 512,

Re: Question on multiple Python users in one application

2016-10-06 Thread Chris Angelico
On Fri, Oct 7, 2016 at 3:06 PM, Loren Wilton wrote: > If the thread has a current instruction pointer, then it must also know what > function it is currently in, and therfore have a pointer (or some such) to > the current function locals: > > def func1(): >ham = 0.0;

Re: static, class and instance methods (Reposting On Python-List Prohibited)

2016-10-06 Thread ast
"Gregory Ewing" a écrit dans le message de news:e5mgi9fp1b...@mid.individual.net... Lawrence D’Oliveiro wrote: Every function is already a descriptor. Which you can see with a simple experiment: >>> def f(self): ... print("self =", self) ... I thought

[issue18789] XML Vunerability Table Unclear

2016-10-06 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Hi, here is the patch. I followed Raymond's suggestion to use 'vulnerable' or 'safe' instead of the original 'True' or 'False'. Please check it out. Thanks :) -- keywords: +patch Added file: http://bugs.python.org/file44994/issue18789.patch

[issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal

2016-10-06 Thread Kevin Norris
New submission from Kevin Norris: The documentation for __hash__ contains this text: "The only required property is that objects which compare equal have the same hash value; it is advised to somehow mix together (e.g. using exclusive or) the hash values for the components of the object that

Re: A newbie doubt on methods/functions calling

2016-10-06 Thread Loren Wilton
Honestly, the best implementation strategy I can think of is to first implement a Python interpreter for the actual mainframe environment. Then invent an RPC layer that can semi-transparently bridge the two for when you want to call a module that only exists in the Windows environment (or call

Re: A newbie doubt on methods/functions calling

2016-10-06 Thread mr . puneet . goyal
Let me rephrase my question in other way. class myClass: def __init__(self, var): self.var = var myObj = myClass(abc) # I am calling instance with function name and arguments myObj func1 arg1 arg2 Can i associate any function like __init__ with instance ? Means if I just use

Re: Question on multiple Python users in one application

2016-10-06 Thread Loren Wilton
I still don't understand why this has to be in the same process space as the VM. Wouldn't it be a lot simpler to create a simple RPC layer (all localhost of course) to interface between the VM and a Python server that spins up multiple processes or sessions? Kind of like how Python for a web

Re: Question on multiple Python users in one application

2016-10-06 Thread Loren Wilton
To be fair, the sharing of data between threads is no different from other concerns about global state. The only thing threads change is that you can have multiple functions doing stuff at once. state = [1,2,3] def func(): state[1] += 5 # do work state[1] -= 5 It occurs to me that

Re: A newbie doubt on methods/functions calling

2016-10-06 Thread Random832
On Thu, Oct 6, 2016, at 19:27, Loren Wilton wrote: > So I don't want to WRITE a Python interpreter for the actual mainframe > environment. I want to use an interpreter for an existing environment > (Windows) where there are already a lot of existing libraries. But > since a lot of the data to be

[issue26171] heap overflow in zipimporter module

2016-10-06 Thread Parvesh jain
Parvesh jain added the comment: I think patches put up in http://bugs.python.org/msg258736 is at least not sufficient enough for Python 2.7. POC script(crash.py) provided with the issue calls get_data with data_size = -1. I am using Python 2.7.8 . I patched the same with the solution provided

[issue26081] Implement asyncio Future in C to improve performance

2016-10-06 Thread INADA Naoki
INADA Naoki added the comment: fixed -- Added file: http://bugs.python.org/file44993/fastfuture2.patch ___ Python tracker ___

Re: Question on multiple Python users in one application

2016-10-06 Thread Loren Wilton
From: "Paul Rubin" I don't think Python threads are the answer. You want a separate interpreter per user, which is annoying to do with CPython. Do you have concrete performance expectations about the sharing of data between interpreter sessions? Those old mainframes

[issue28199] Compact dict resizing is doing too much work

2016-10-06 Thread INADA Naoki
INADA Naoki added the comment: Since entries array is embedded in PyDictKeysObject, we can't realloc entries. And while values are split array, dictresize() convert split table into combine table. Split table may have enough size of ma_values at first in typical case. And in not typical case,

[issue21443] asyncio logging documentation clarifications

2016-10-06 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Hi, I added the paragraph explaining how to change the log level for asyncio. Please check it out. Thanks :) -- keywords: +patch nosy: +Mariatta Added file: http://bugs.python.org/file44992/issue21443.patch ___

Re: A newbie doubt on methods/functions calling

2016-10-06 Thread mr . puneet . goyal
Well I jump from TCL to Python. And found that it was very convenient to use Procs there. So I was looking for that luxury in Python. I am not trying to reinvent the wheel. I was just curious to know if there is any possibility to create a caller function in my way (TCL) where I can call

[issue26081] Implement asyncio Future in C to improve performance

2016-10-06 Thread INADA Naoki
INADA Naoki added the comment: FutureIter_throw is wrong, maybe. Removing FutureIter_send and FutureIter_throw from FutureIter_methods solves the segv and test passed. -- ___ Python tracker

[issue28199] Compact dict resizing is doing too much work

2016-10-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: For the simple case with no dummy entries, I was expecting a fast path that just realloced the keys/values/hashes arrays and then updated the index table with reinsertion logic that only touches the indices. Use realloc() is nice because it makes it

Re: Question on multiple Python users in one application

2016-10-06 Thread Michael Torrie
On 10/06/2016 07:48 PM, Chris Angelico wrote: > If that had been your original plan, it's dead simple to enhance it to > use per-user module names. Just do this same work, but substitute a > different module name right at the beginning! Other > extremely-high-level interface functions are similar.

Re: Question on multiple Python users in one application

2016-10-06 Thread Chris Angelico
On Fri, Oct 7, 2016 at 12:52 PM, Paul Rubin wrote: > "Loren Wilton" writes: >> I've read that Python supports 'threads', and I'd assumed (maybe >> incorrectly) that these were somewhat separate environments that could >> be operating

Re: A newbie doubt on methods/functions calling

2016-10-06 Thread Paul Rubin
"Loren Wilton" writes: > strength of Python is that there are many existing 3rd party libraries > that do lots of useful things. Since a lot of them are distributed as > binaries, they would not work in this mainframe environment. Python libraries are usually available

Re: Question on multiple Python users in one application

2016-10-06 Thread Paul Rubin
"Loren Wilton" writes: > I've read that Python supports 'threads', and I'd assumed (maybe > incorrectly) that these were somewhat separate environments that could > be operating concurrently (modulo the GC lock). I assume that data can > be shared between the threads,

Re: Question on multiple Python users in one application

2016-10-06 Thread Chris Angelico
On Fri, Oct 7, 2016 at 12:21 PM, Loren Wilton wrote: > The VM is a program running on Windows. The mainframe object code is just > byte code. The VM has routines to handle every operator and each kind of > Descriptor that they might validly use. One form of Descriptor is

Re: Question on multiple Python users in one application

2016-10-06 Thread Chris Angelico
On Fri, Oct 7, 2016 at 11:22 AM, Loren Wilton wrote: >> Ah, that probably means you want separate interpreters, then. > > > I hope not, unless I can get separate simultaneous interpreters out of one > CPython.dll in one Windows process space. I'm guessing that I can't,

Re: Question on multiple Python users in one application

2016-10-06 Thread Loren Wilton
No idea as it's still not clear what you want to accomplish exactly. You are providing a lot of details, just not concrete ones that show how things are currently done and how you want to change that by adding Python to the mix. Hum, this could take a lot of pages of text to describe how the

Re: Question on multiple Python users in one application

2016-10-06 Thread Chris Angelico
On Fri, Oct 7, 2016 at 11:03 AM, Loren Wilton wrote: > I've read that Python supports 'threads', and I'd assumed (maybe > incorrectly) that these were somewhat separate environments that could be > operating concurrently (modulo the GC lock). I assume that data can be >

Re: A newbie doubt on methods/functions calling

2016-10-06 Thread Loren Wilton
Oops, apologies for replying to the wrong thread! Loren -- https://mail.python.org/mailman/listinfo/python-list

Re: Question on multiple Python users in one application

2016-10-06 Thread Loren Wilton
Ah, that probably means you want separate interpreters, then. I hope not, unless I can get separate simultaneous interpreters out of one CPython.dll in one Windows process space. I'm guessing that I can't, but since I really don't know what I'm doing with Python yet, maybe I'm wrong there.

Re: Question on multiple Python users in one application

2016-10-06 Thread Michael Torrie
On 10/06/2016 06:03 PM, Loren Wilton wrote: >> So I take it that currently users access the software running in the >> virtual mainframe over telnet or some form of serial link and that they >> interact with it in a text terminal? This point is fairly important, >> because if it's true, then you

[issue28381] Add a "starcaller" function

2016-10-06 Thread Steven D'Aprano
Steven D'Aprano added the comment: This was discussed on Python-Ideas back in July: https://mail.python.org/pipermail/python-ideas/2016-July/041153.html I don't recall any opposition, although Nick suggested that possibly a better idea was to resurrect the `apply` built-in into functools:

Re: Question on multiple Python users in one application

2016-10-06 Thread Loren Wilton
So I take it that currently users access the software running in the virtual mainframe over telnet or some form of serial link and that they interact with it in a text terminal? This point is fairly important, because if it's true, then you really don't have any in-band way of clients talking to

Re: A newbie doubt on methods/functions calling

2016-10-06 Thread BartC
On 06/10/2016 18:06, mr.puneet.go...@gmail.com wrote: Hi I just started learning python. Is there any way to call functions in different way ? Rather calling obj.function(arg1, arg2) I would like to call like below "obj function arg1 arg2" As has been pointed out, it's difficult to tell

Re: A newbie doubt on methods/functions calling

2016-10-06 Thread Loren Wilton
[Cue the decades-old story about the elaborate set of C macros that I once saw somebody using so he could write a C program that looked like some flavor of structured BASIC.] I once wrote a set pf C defines so that I could compile Pascal with a C compiler without having to change the Pascal

[issue28382] Possible deadlock after many multiprocessing.Process are launch

2016-10-06 Thread Alexis
New submission from Alexis: I am launching a process inside a pool worker, using the multiprocessing module. After a while, a deadlock append when I am trying to join the process. Here is a simple version of the code: import sys, time, multiprocessing from multiprocessing.pool import

Re: Question on multiple Python users in one application

2016-10-06 Thread Chris Angelico
On Fri, Oct 7, 2016 at 9:47 AM, Loren Wilton wrote: > I don't think my main concern here is being able to call the CPython > interpreter routines, but instead it is to be able to provide separate > sandboxes for the various programs ("stacks", in B6500 terminology) that

Re: A newbie doubt on methods/functions calling

2016-10-06 Thread Grant Edwards
On 2016-10-06, Steve D'Aprano wrote: > The only way to do this will be to write your own pre-processor, which will > parse your source code, and translate it from your language to valid > Python. That's a lot of work for very little value -- I recommend you just >

Re: Question on multiple Python users in one application

2016-10-06 Thread Michael Torrie
On 10/06/2016 04:47 PM, Loren Wilton wrote: > The Python code is running as (I hope) a native Windows DLL, so should be > able to access any existing Python libraries that exist on the WIndows > machine. Obviously this Python code will be using Windows-shaped data > objects like integers,

Re: Question on multiple Python users in one application

2016-10-06 Thread Chris Angelico
On Fri, Oct 7, 2016 at 9:09 AM, Loren Wilton wrote: >> Okay. Before you go one micron further, answer this critical question: >> >> *Do you trust your users?* > > > The basic answer is yes. This program amounts to a virtual machine > implementation of a multi-processor

Re: Question on multiple Python users in one application

2016-10-06 Thread Loren Wilton
"Loren Wilton" writes: I don't think my main concern here is being able to call the CPython interpreter routines, but instead it is to be able to provide separate sandboxes for the various programs ("stacks", in B6500 terminology) that might have their own Python

Re: Question on multiple Python users in one application

2016-10-06 Thread Paul Rubin
"Loren Wilton" writes: > I don't think my main concern here is being able to call the CPython > interpreter routines, but instead it is to be able to provide separate > sandboxes for the various programs ("stacks", in B6500 terminology) > that might have their own Python

Re: Question on multiple Python users in one application

2016-10-06 Thread Loren Wilton
the multi-user program is a virtual machine implementation and the programs running on the machine have resources like variables, arrays, files, and databases Python variables? Python arrays (lists? tuples?)? Or some other sort of "variables" and "arrays" that exist outside of Python? You

[issue28206] signal.Signals not documented

2016-10-06 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- nosy: +Mariatta ___ Python tracker ___ ___

[issue28381] Add a "starcaller" function

2016-10-06 Thread Ned Deily
Changes by Ned Deily : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list

[issue28381] Add a "starcaller" function

2016-10-06 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Hi Josh, I think python ideas mailing list might have been a better venue for this. https://mail.python.org/mailman/listinfo/python-ideas -- nosy: +Mariatta ___ Python tracker

Re: Question on multiple Python users in one application

2016-10-06 Thread Loren Wilton
We need to understand first what the process/threading/per-user model of the existing application is. The program is a virtual machine for an old mainframe architecture. You could think of a VM running a Linux implementaiton as a kind of crude mental reference model. The emulated mainframe

[issue27972] Confusing error during cyclic yield

2016-10-06 Thread Guido van Rossum
Guido van Rossum added the comment: Maybe it could be fixed rather than making this a checked failure? -- ___ Python tracker ___

Re: Question on multiple Python users in one application

2016-10-06 Thread Loren Wilton
Okay. Before you go one micron further, answer this critical question: *Do you trust your users?* The basic answer is yes. This program amounts to a virtual machine implementation of a multi-processor and multi-user mainframe computer. It runs on a Windows box of its own. It has an IO

Re: Question on multiple Python users in one application

2016-10-06 Thread Erik
On 06/10/16 22:40, Loren Wilton wrote: the multi-user program is a virtual machine implementation That's not relevant (unless you mean each user is running in their own VM, in which case you _really_ need to describe your execution environment). BTW, you _really_ need to describe your

[issue27972] Confusing error during cyclic yield

2016-10-06 Thread Yury Selivanov
Yury Selivanov added the comment: > Is that enough? What if the recursion involves several tasks waiting for each other in a cycle? I'm not sure... Maybe it's OK when two tasks await on each other, I think the current Task implementation should be able to handle that. The problem with the

[issue27972] Confusing error during cyclic yield

2016-10-06 Thread Yury Selivanov
Yury Selivanov added the comment: > It's pretty perverse. But how would you detect this case? In Task._step, we can check if the future the task is about to await on is "self". -- ___ Python tracker

[issue27972] Confusing error during cyclic yield

2016-10-06 Thread Guido van Rossum
Guido van Rossum added the comment: Is that enough? What if the recursion involves several tasks waiting for each other in a cycle? -- ___ Python tracker

Re: Question on multiple Python users in one application

2016-10-06 Thread Paul Rubin
"Loren Wilton" writes: > While it is certianly possible to marshall every variable access > through IPC, it isn't real efficient. I would much perfer to avoid > this if I possibly can. Maybe you could use Python proxy objects accessing a shared memory segment. Though as

[issue27972] Confusing error during cyclic yield

2016-10-06 Thread Guido van Rossum
Guido van Rossum added the comment: It's pretty perverse. But how would you detect this case? Does it require changes to CPython or only to asyncio? Does it require a spec change anywhere? -- ___ Python tracker

Question on multiple Python users in one application

2016-10-06 Thread Loren Wilton
(Apologies for the broken threading on this reply, I'm just getting the list access set up.) Put each Python in a separate process and communicate by IPC. I thought of that, but the multi-user program is a virtual machine implementation, and the programs running on the machine have

[issue28380] Mock functions with autospec don't support assert_called_once, assert_called, assert_not_called

2016-10-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: thanks! I didn't apply the fix to 3.5 (or earlier - those are closed) as it could arguably be seen as adding a new API and there are valid workarounds by asserting on the list of calls directly. -- resolution: -> fixed stage: -> commit review

Re: Question on multiple Python users in one application

2016-10-06 Thread Chris Angelico
On Fri, Oct 7, 2016 at 7:59 AM, Jolly Good Spam wrote: > I have a Windows multi-user program that can be used by an arbitrary number > of users at once. They can work independently, or they can share data at the > file or even variable level if they want. I want to give

Re: Question on multiple Python users in one application

2016-10-06 Thread Erik
On 06/10/16 22:11, Paul Rubin wrote: "Jolly Good Spam" writes: Can someone please suggest what I should be looking at and doing to be able to effectively run multiple independent Pythons in a single program? Put each Python in a separate process and communicate by

[issue28380] Mock functions with autospec don't support assert_called_once, assert_called, assert_not_called

2016-10-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4e39b4e57673 by Gregory P. Smith in branch '3.6': Fixes issue28380: unittest.mock Mock autospec functions now properly support https://hg.python.org/cpython/rev/4e39b4e57673 New changeset fca5c4a63251 by Gregory P. Smith in branch 'default': Issue

[issue28381] Add a "starcaller" function

2016-10-06 Thread Josh Rosenberg
New submission from Josh Rosenberg: Not sure if this is the right venue to propose this, but I'd like to propose adding a starcaller method to the standard library, either functools or operator (not sure if the proposal is more like partial or more like methodcaller). Basically, right now,

Re: Question on multiple Python users in one application

2016-10-06 Thread Paul Rubin
"Jolly Good Spam" writes: > Can someone please suggest what I should be looking at and doing to be > able to effectively run multiple independent Pythons in a single > program? Put each Python in a separate process and communicate by IPC. --

[issue28380] Mock functions with autospec don't support assert_called_once, assert_called, assert_not_called

2016-10-06 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: -> gregory.p.smith nosy: +gregory.p.smith ___ Python tracker ___

Question on multiple Python users in one application

2016-10-06 Thread Jolly Good Spam
Hello. Please pardon a newbie question. I have a Windows multi-user program that can be used by an arbitrary number of users at once. They can work independently, or they can share data at the file or even variable level if they want. I want to give them the ability to write Python programs

[issue28365] IDLE: don't offer to save text files as .py

2016-10-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: PS. A.J., you will likely be a happier user if you make a subdirectory under c:/Users/angie and put your files there instead of in the installation directory under the hidden AppDate -- ___ Python tracker

[issue28365] IDLE: don't offer to save text files as .py

2016-10-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am closing this as a duplicate of existing #21140, to make .txt instead of .py the extension for files known not to be code files. I There is an existing simple patch. I will modify it to not even offer .py as a secondary choice. The reason Paul had to

[issue21140] Idle: saving Shell or an OutputWindow should default to .txt

2016-10-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: A more drastic change would be to refuse to save OutputWindow and Shell as .py(w,o) files. #28365 is about a beginner who apparently save a short Shell session as .py, quit IDLE, loaded the saved session in an editor, and tried to run it. --

[issue28380] Mock functions with autospec don't support assert_called_once, assert_called, assert_not_called

2016-10-06 Thread Yannick Brehon
New submission from Yannick Brehon: If one defines a mock for a function, using autospec=True, then the mock will correctly support assert_called_once_with(), among others, but not assert_called_once, assert_called, and assert_not_called. The attached file contains a fix for the issue.

[issue18789] XML Vunerability Table Unclear

2016-10-06 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: I'll work on this :) -- ___ Python tracker ___ ___ Python-bugs-list

[issue18789] XML Vunerability Table Unclear

2016-10-06 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- nosy: +Mariatta ___ Python tracker ___ ___

[issue26081] Implement asyncio Future in C to improve performance

2016-10-06 Thread Yury Selivanov
Yury Selivanov added the comment: INADA, would you be able to take a look? -- ___ Python tracker ___ ___

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added comments on Rietveld. I don't know whether tests for this function are needed. It is public, but is not a part of stable API. -- ___ Python tracker

[issue26081] Implement asyncio Future in C to improve performance

2016-10-06 Thread Yury Selivanov
Yury Selivanov added the comment: The most recent patch segfaults... Will try to debug. -- ___ Python tracker ___

[issue27972] Confusing error during cyclic yield

2016-10-06 Thread Yury Selivanov
Yury Selivanov added the comment: This is an interesting mind twister. The key problem is that `self.runner_task` is blocked on *itself*: so Task._fut_waiter is set to the Task. Therefore when the task is being cancelled, `Task.cancel` simply recurses. One way to solve this is to prohibit

Re: segfault using shutil.make_archive

2016-10-06 Thread Tim
On Thursday, October 6, 2016 at 2:04:20 PM UTC-4, Random832 wrote: > On Thu, Oct 6, 2016, at 13:45, Random832 wrote: > > On Thu, Oct 6, 2016, at 12:46, Tim wrote: > > > I need to zip up a directory that's about 400mb. > > > I'm using shutil.make_archive and I'm getting this response: > > > > > >

Re: User Interface Suggestions? (newbie)

2016-10-06 Thread mbg1708
On Wednesday, 5 October 2016 14:10:21 UTC+1, Beverly Howard wrote: > I'm new to Python, but have three decades of experience with FoxPro and VFP > plus I started programming in Basic and still comfortable with that. > > I have spent some time with Python and am now fairly familiar with the

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-06 Thread Xiang Zhang
Changes by Xiang Zhang : Added file: http://bugs.python.org/file44990/PyUnicode_CopyCharacters.patch ___ Python tracker ___

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-06 Thread Xiang Zhang
Changes by Xiang Zhang : Removed file: http://bugs.python.org/file44989/PyUnicode_CopyCharacters.patch ___ Python tracker ___

Re: BeautifulSoup help !!

2016-10-06 Thread Michael Torrie
On 10/06/2016 11:34 AM, Navneet Siddhant wrote: > I guess I will have to extract data from multiple divs as only > extracting data from the parent div which has other divs in it with > the different data is coming up all messed up. Will play around and > see if I could get through it. Let me

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-06 Thread Xiang Zhang
New submission from Xiang Zhang: Currently PyUnicode_CopyCharacters doesn't check arguments thoroughly. This could lead to undefined behaviour or crash in debug mode. For example, from_start > len(from), how_many < 0. Another case is that when how_many > len(from), it will choose len(from)

[issue27392] Add a server_side keyword parameter to create_connection

2016-10-06 Thread Yury Selivanov
Yury Selivanov added the comment: AFAICT this issue was resolved in https://github.com/python/asyncio/pull/378. Closing this one. Thanks, Jim! -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue27759] selectors incorrectly retain invalid file descriptors

2016-10-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8cc1fca83fb8 by Yury Selivanov in branch '3.4': Issue #27759: Fix selectors incorrectly retain invalid file descriptors. https://hg.python.org/cpython/rev/8cc1fca83fb8 -- ___ Python tracker

[issue27386] Asyncio server hang when clients connect and immediately disconnect

2016-10-06 Thread Yury Selivanov
Yury Selivanov added the comment: Alright, I've backported the fix to 3.4. Closing this. -- stage: -> resolved status: open -> closed ___ Python tracker

Re: segfault using shutil.make_archive

2016-10-06 Thread Random832
On Thu, Oct 6, 2016, at 13:45, Random832 wrote: > On Thu, Oct 6, 2016, at 12:46, Tim wrote: > > I need to zip up a directory that's about 400mb. > > I'm using shutil.make_archive and I'm getting this response: > > > > Segmentation fault: 11 (core dumped) > > > > The code is straightforward

Re: segfault using shutil.make_archive

2016-10-06 Thread Random832
On Thu, Oct 6, 2016, at 12:46, Tim wrote: > I need to zip up a directory that's about 400mb. > I'm using shutil.make_archive and I'm getting this response: > > Segmentation fault: 11 (core dumped) > > The code is straightforward (and works on other, smaller dirs): Are you able to make a

Re: BeautifulSoup help !!

2016-10-06 Thread Navneet Siddhant
I guess I will have to extract data from multiple divs as only extracting data from the parent div which has other divs in it with the different data is coming up all messed up. Will play around and see if I could get through it. Let me clarify once again I dont need complete code , a resource

Re: A newbie doubt on methods/functions calling

2016-10-06 Thread Steve D'Aprano
On Fri, 7 Oct 2016 04:06 am, mr.puneet.go...@gmail.com wrote: > Hi > > I just started learning python. Is there any way to call functions in > different way ? > > Rather calling obj.function(arg1, arg2) I would like to call like below > > "obj function arg1 arg2" No. This will be a syntax

Re: A newbie doubt on methods/functions calling

2016-10-06 Thread Peter Otten
mr.puneet.go...@gmail.com wrote: > Hi > > I just started learning python. Is there any way to call functions in > different way ? > > Rather calling obj.function(arg1, arg2) I would like to call like below > > "obj function arg1 arg2" How would the machine reading the above know that you

Re: BeautifulSoup help !!

2016-10-06 Thread Chris Angelico
On Fri, Oct 7, 2016 at 4:00 AM, Navneet Siddhant wrote: > I guess I shouldnt have mentioned as this was a recruitment task. If needed I > can post a screenshot of the mail I got which says I can take help from > anywhere possible as long as the assignment is done.

Re: BeautifulSoup help !!

2016-10-06 Thread Chris Angelico
On Fri, Oct 7, 2016 at 3:38 AM, Steve D'Aprano wrote: > On Fri, 7 Oct 2016 03:00 am, Chris Angelico wrote: > >> You are asking >> for assistance with something that was assigned to you *as a >> recruitment task*. Were you told that asking for help was a legitimate >>

Re: User Interface Suggestions? (newbie)

2016-10-06 Thread Grant Edwards
On 2016-10-06, Steve D'Aprano wrote: > On Thu, 6 Oct 2016 10:03 pm, BartC wrote: > >> I'd quite like to know too. However I've just tried a test sequence >> ("[P1d" to move the cursor to row 1) and it didn't work. If there's >> reason why something so basic won't work

Re: BeautifulSoup help !!

2016-10-06 Thread Navneet Siddhant
On Thursday, October 6, 2016 at 8:52:18 PM UTC+5:30, Navneet Siddhant wrote: > So I've just started up with python and an assignment was given to me by a > company as an recruitment task. > > I need to web scrap the coupons of all the websites available on > http://www.couponraja.in and export

[issue28365] idle forgets that saved console session is not a python file after restart

2016-10-06 Thread A.J.
A.J. added the comment: There is no other way to explain it without fail every time no matter what code I write there is always syntax error highlighted on the five in the version banner. -- Added file: http://bugs.python.org/file44988/2016-10-06 (4).png

A newbie doubt on methods/functions calling

2016-10-06 Thread mr . puneet . goyal
Hi I just started learning python. Is there any way to call functions in different way ? Rather calling obj.function(arg1, arg2) I would like to call like below "obj function arg1 arg2" this function is part of a class. class myClass: def function(arg1, arg2): # do something

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good point Naoki. I think we can remove tp_new method from range_iterator in 3.7. Seems it is never used. The patch LGTM for 3.5-3.6, but the test should be marked as CPython implementation detail (@support.cpython_only). --

Re: User Interface Suggestions? (newbie)

2016-10-06 Thread Grant Edwards
On 2016-10-06, BartC wrote: > All this advice seems to be getting out of hand, with suggestions of > 'curses' and 'blessings' and using GUI. I've tried 'ncurses' elsewhere > and it was over the top for what I wanted to do. > > The OP wants to runs on Pi which I think runs

segfault using shutil.make_archive

2016-10-06 Thread Tim
I need to zip up a directory that's about 400mb. I'm using shutil.make_archive and I'm getting this response: Segmentation fault: 11 (core dumped) The code is straightforward (and works on other, smaller dirs): shutil.make_archive(os.path.join(zip_dir, zname), 'zip', tgt_dir) I guess I

Re: BeautifulSoup help !!

2016-10-06 Thread Steve D'Aprano
On Fri, 7 Oct 2016 03:00 am, Chris Angelico wrote: > You are asking > for assistance with something that was assigned to you *as a > recruitment task*. Were you told that asking for help was a legitimate > solution? Why should he need to be told that? Asking for help *is* a legitimate solution,

Re: Is it possible to use 'groupby' asynchronously?

2016-10-06 Thread Ian Kelly
On Thu, Oct 6, 2016 at 9:57 AM, Chris Angelico wrote: > On Thu, Oct 6, 2016 at 11:09 PM, Frank Millman wrote: >> Hi all >> >> I have used itertools.groupby before, and I love it. I used it to process a >> csv file and 'break' on change of a particular field.

Re: Python and ssh for remote login

2016-10-06 Thread Noah
On 6 Oct 2016 04:56, "Michael Torrie" wrote: > > On 10/05/2016 11:46 AM, Noah wrote: > > Hello folk, > > > > I would like to use a python script to ssh into a server using a username > > and password and perhaps ass port. > > > > Any ideas on how to script that. > > If paramiko

Re: BeautifulSoup help !!

2016-10-06 Thread Navneet Siddhant
On Thursday, October 6, 2016 at 9:57:46 PM UTC+5:30, Navneet Siddhant wrote: > On Thursday, October 6, 2016 at 9:42:47 PM UTC+5:30, Steve D'Aprano wrote: > > On Fri, 7 Oct 2016 02:30 am, alister wrote: > > > > > On Thu, 06 Oct 2016 08:22:05 -0700, desolate.soul.me wrote: > > > > > >> So I've

Re: BeautifulSoup help !!

2016-10-06 Thread Navneet Siddhant
On Thursday, October 6, 2016 at 9:42:47 PM UTC+5:30, Steve D'Aprano wrote: > On Fri, 7 Oct 2016 02:30 am, alister wrote: > > > On Thu, 06 Oct 2016 08:22:05 -0700, desolate.soul.me wrote: > > > >> So I've just started up with python and an assignment was given to me by > >> a company as an

  1   2   >