[issue42058] Process not running with args
Change by Vaibhav Banait : -- type: compile error -> behavior ___ Python tracker <https://bugs.python.org/issue42058> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42058] Process not running with args
New submission from Vaibhav Banait : I am getting this error on windows 10 python 3.8 Emacs 27 and prelude configuration Company: backend company-ngram-backend error "Process company-ngram not running" with args (prefix) I am using this code in .emacs (with-eval-after-load 'company-ngram ; ~/data/ngram/*.txt are used as data (setq company-ngram-data-dir "~/data/ngram") ; company-ngram supports python 3 or newer (setq company-ngram-python "python3") (company-ngram-init) (cons 'company-ngram-backend company-backends) ; or use `M-x turn-on-company-ngram' and ; `M-x turn-off-company-ngram' on individual buffers ; ; save the cache of candidates (run-with-idle-timer 7200 t (lambda () (company-ngram-command "save_cache") )) ) (require 'company-ngram nil t) -- components: Regular Expressions messages: 378797 nosy: ezio.melotti, mrabarnett, vbanait priority: normal severity: normal status: open title: Process not running with args type: compile error versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue42058> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Regarding 3D buttons in PyQT5
Hi, I want to know that how can i create 3D buttons in PyQT5 window or an animated button. Regards Vaibhav -- https://mail.python.org/mailman/listinfo/python-list
[issue24928] mock.patch.dict spoils order of items in collections.OrderedDict
Vaibhav Gupta added the comment: Hi Emmanuel Please go ahead and make a PR. :) -- ___ Python tracker <https://bugs.python.org/issue24928> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24928] mock.patch.dict spoils order of items in collections.OrderedDict
Vaibhav Gupta added the comment: Hi. I would like to make a PR for this. Also, I am not very familiar with the process of backporting. Is something specific needs to be done for that which is related to this? -- nosy: +dojutsu-user ___ Python tracker <https://bugs.python.org/issue24928> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35579] Typo in in asyncio-task documentation
Change by Vaibhav Gupta : -- keywords: +patch, patch, patch, patch pull_requests: +10578, 10579, 10580, 10581 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35579> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35579] Typo in in asyncio-task documentation
Change by Vaibhav Gupta : -- keywords: +patch, patch, patch pull_requests: +10578, 10579, 10580 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35579> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35579] Typo in in asyncio-task documentation
Change by Vaibhav Gupta : -- keywords: +patch, patch pull_requests: +10578, 10579 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35579> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35579] Typo in in asyncio-task documentation
Change by Vaibhav Gupta : -- keywords: +patch pull_requests: +10578 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35579> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35579] Typo in in asyncio-task documentation
Vaibhav Gupta added the comment: I am totally new to the community here and would like to start with a easy issue. Can i make a PR for this? -- nosy: +Vaibhav Gupta ___ Python tracker <https://bugs.python.org/issue35579> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35006] itertools.combinations has wrong type when using the typing package
New submission from Vaibhav Karve : If I run mypy on the following file called test.py, I get an error: # test.py from typing import Iterator, Tuple import itertools as it a : Iterator[Tuple[int, ...]] a = it.product([1,2,3], repeat = 2) b : Iterator[Tuple[int, ...]] b = it.combinations([1,2,3], 2) The line about a goes through without complain. But mypy complains about b by printing the following error message-- test.py:8: error: Incompatible types in assignment (expression has type "Iterable[Tuple[int, ...]]", variable has type "Iterator[Tuple[int, ...]]") test.py:8: note: 'Iterable' is missing following 'Iterator' protocol member: test.py:8: note: __next__ So basically, it.product is an Iterator but it.combinations is an Iterable (I think it should be an iterator too). I think (without a lot of evidence) that this is a bug in itertools and not in typing. PS: I apologize if my comment is not formatted according to best practices. This is my first time registering a new issue. -- components: Demos and Tools messages: 327849 nosy: vaibhavkarve priority: normal severity: normal status: open title: itertools.combinations has wrong type when using the typing package type: behavior versions: Python 3.6 ___ Python tracker <https://bugs.python.org/issue35006> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31590] CSV module incorrectly treats escaped newlines as new records if unquoted
Vaibhav Mallya <vaibhavmal...@gmail.com> added the comment: Hello R. David & Terry! Appreciate your prompt responses. While experimenting with different test cases I realized that escaped slashes and newlines are intrinsically annoying to reason about as stringy-one-liners, so I threw together a small tarball test case - attached - to make sure we're on the same page. To be clear, I was referring *solely* to reading with csv.DictReader (we're not using the writing part). The assertion for the multi_line_csv_unquoted fails, and I believe it should succeed. I hadn't considered the design-bug vs code-bug angle. I also think that documenting this somehow - explicitly - would help others, since there's no mention of the interaction here, with what should be a fairly common use-case. It might even make sense to make a "strong recommendation" that everything is quoted + escaped (much as redshift makes a strong recommendation to escape). Our data pipeline is doing fine after the right parameters on both sides, this is more about improving Python for the rest of the community. Thanks for your help, I will of course respect any decision you make. -- Added file: https://bugs.python.org/file47181/csv_test.tar ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31590> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31590] CSV module incorrectly treats escaped newlines as new records if unquoted
Vaibhav Mallya (mallyvai) <vaibhavmal...@gmail.com> added the comment: If there's any way this can be documented that would be a big help, at least. There have been other folks who run into this, and the current behavior is implicit. On Sep 29, 2017 5:44 PM, "R. David Murray" <rep...@bugs.python.org> wrote: R. David Murray <rdmur...@bitdance.com> added the comment: I'm pretty hesitant to make this kind of change in python2. I'm going to punt, and let someone else make the decision. Which means if no one does, the status quo will win. Sorry about that. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31590> _______ -- nosy: +Vaibhav Mallya (mallyvai) ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31590> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31590] CSV module incorrectly treats escaped newlines as new records if unquoted
New submission from Vaibhav Mallya: I'm writing python `csv` based-parsers as part of a data processing pipeline that includes Redshift and other data stores upstream and down. It's easy and expected in all of these data stores (http://docs.aws.amazon.com/redshift/latest/dg/r_UNLOAD.html) that CSV-style data can be generated with ESCAPE'd newlines, and with or without quotes on the columns. Challenge: However, 2.x CSV module has a bug where ESCAPE'd newlines in unquoted CSVs are not actually treated as escaped newlines, but as entirely new record entries. This is at odds with expected behavior in most common data warehouses (See - Redshift docs I linked above for example) and is a subtle source of bugs for data processing pipelines. We changed our Redshift Parameters to ADDQUOTES so we could get around this bug, after some debugging. Note - This seems to be a continuation of https://bugs.python.org/issue15927 which was closed as WONTFIX for 2.x. I think this is a legitimate bug, and should be fixed in 2.x. If someone is relying on old / bad behavior might mean something else is wrong. In my view, the current behavior effectively adds an implicit, undocumented dialect to the CSV module. -- components: Library (Lib) messages: 303025 nosy: mallyvai priority: normal severity: normal status: open title: CSV module incorrectly treats escaped newlines as new records if unquoted type: behavior versions: Python 2.7 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31590> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6009] optparse docs say 'default' keyword is deprecated but uses it in most examples
New submission from Vaibhav Mallya mally...@umich.edu: The first example, and several subsequent examples later on in the optparse docs, use 'default' as an argument, even though it's apparently deprecated in favor of set_defaults. At the risk of overstating the obvious, this seems to be inconsistent. Even the section on defaults http://docs.python.org/library/optparse.html#default-values uses the 'default' keyword without stressing its deprecation. It might make more sense to leave it out of all of the examples altogether, replacing it with the appropriate set_defaults invocations. -- assignee: georg.brandl components: Documentation, Library (Lib) messages: 87668 nosy: georg.brandl, mallyvai severity: normal status: open title: optparse docs say 'default' keyword is deprecated but uses it in most examples type: behavior versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6009 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5906] Risk of confusion in multiprocessing module - daemonic processes
Vaibhav Mallya mally...@umich.edu added the comment: I understand pakal's line of reasoning. The term 'daemon' in the general Unix sense has a specific meaning that is at odds with the multiprocessing module's usage of 'daemon'. Clarification would be useful, I feel, especially if an outright rename of that part of the API is out of the question. -- nosy: +mallyvai ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5906 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5857] Return namedtuples from tokenize token generator
New submission from Vaibhav Mallya mally...@umich.edu: Returning an anonymous 5-tuple seems like a suboptimal interface since it's so easy to accidentally confuse, for example, the indices of start and end. I've used tokenize.py for several scripts in the past few weeks and I've always ended up writing some sort of wrapper function for generate_tokens that names the returned tuple's fields to help me avoid mistakes like this. I'd like to propose the following patch that simply decorates the generate_token function and names its return values' fields. Since it's a namedtuple, it should be fully backwards compatible with the existing interface, but also allow member access via next_token.type next_token.string next_token.start.row, next_token.start.col next_token.end.row, next_token.end.col next_token.line If this seems like a reasonable way to do things, I'd be happy to submit relevant doc patches as well as the corresponding patch for 3.0. -- components: Library (Lib) files: mallyvai_tokenize.patch keywords: patch messages: 86691 nosy: mallyvai severity: normal status: open title: Return namedtuples from tokenize token generator type: feature request versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13797/mallyvai_tokenize.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5857 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5857] Return namedtuples from tokenize token generator
Vaibhav Mallya mally...@umich.edu added the comment: Well, the reason I put in the inner row/col namedtuple initially was because the first mistake I made with the original module was mixing up the row/col indices for a particular case. It certainly caused all sorts of weird headaches. :o) I mean, it seems like there's no real reason it should be (row,col) instead of (col,row) in the returned tuple; that is, it feels like the ordering is arbitrary in and of itself. I really feel that allowing for start.row and start.col would make the interface completely explicit and valid semantically. Agreed with the other two points, however. Also, I take it there's going to be a need for an addendum to the test suite, since the interface is being modified? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5857 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Executing a C program from Python
Hi, I am very new to python. I have my cgi script written in Python. My CGI script should call a C program and collect the value returned by this program and pass it to the browser. Can anyone help me out in this. How can I execute the c program and collect the return value. I tried, import os a=os.system(my-app)//my-app is the C program executable print a But the variable a prints 0 everytime. It should return a non-zero value as per my C program. Is there any method to do what I need. Regards, vish -- http://mail.python.org/mailman/listinfo/python-list
[issue5573] multiprocessing Pipe poll() and recv() semantics.
Vaibhav Mallya mally...@umich.edu added the comment: On second thought, it seems like it shouldn't make sense. This forces a destructive check. Suppose we do child.poll() and then child.recv() but it's legitimate data; that data will be removed from the queue even if we just wanted to check if the pipe was alive. This seems like it shouldn't have to happen. I'm unfamiliar with the lower level workings of sockets; is this destructive checking behavior forced by the socket internals? Is it standard? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5573 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5570] Bus error when calling .poll() on a closed Connection from multiprocessing.Pipe()
Vaibhav Mallya mally...@umich.edu added the comment: Python 2.6.1 (r261:67515, Mar 22 2009, 05:39:39) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)] on linux2 Type help, copyright, credits or license for more information. from multiprocessing import Pipe a, b = Pipe() a.close() a.poll() Segmentation fault Seems like this should raise an exception. uname -a: Linux mememy 2.6.24-23-generic #1 SMP Thu Feb 5 15:00:25 UTC 2009 i686 GNU/Linux Compiled Python 2.6.1 from source. -- components: +Extension Modules -Library (Lib) nosy: +mallyvai ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5570 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5573] multiprocessing Pipe poll() and recv() semantics.
New submission from Vaibhav Mallya mally...@umich.edu: Python 2.6.1 (r261:67515, Mar 22 2009, 05:39:39) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)] on linux2 Type help, copyright, credits or license for more information. from multiprocessing import Pipe parent, child = Pipe() parent.send(1) parent.close() print child.recv() 1 print child.poll() True print child.recv() Traceback (most recent call last): File stdin, line 1, in module EOFError We have to use both poll() and recv() to determine whether or not the connection was actually closed. Better behavior might be returning True on poll() only if the next recv() on that end of the pipe will work without an error. There may not be a way to guarantee this, but it would be useful if the documentation was clarified either way. uname -a: Linux mememy 2.6.24-23-generic #1 SMP Thu Feb 5 15:00:25 UTC 2009 i686 GNU/Linux Compiled Python 2.6.1 from source. -- assignee: georg.brandl components: Documentation, Library (Lib) messages: 84204 nosy: georg.brandl, mallyvai severity: normal status: open title: multiprocessing Pipe poll() and recv() semantics. type: behavior versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5573 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5573] multiprocessing Pipe poll() and recv() semantics.
Changes by Vaibhav Mallya mally...@umich.edu: -- nosy: +jnoller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5573 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5574] multiprocessing queues.py doesn't include JoinableQueue in its __all__ list
New submission from Vaibhav Mallya mally...@umich.edu: Should __all__ = ['Queue', 'SimpleQueue'] in queues.py have JoinableQueue as part of the list as well? Also, multiprocessing's __init__.py does not appear to have SimpleQueue as part of its __all__ - is this expected? SimpleQueue does not appear in the multiprocessing docs; is it meant to be avoided by user code then? -- assignee: georg.brandl components: Documentation, Library (Lib) messages: 84212 nosy: georg.brandl, jnoller, mallyvai severity: normal status: open title: multiprocessing queues.py doesn't include JoinableQueue in its __all__ list type: feature request versions: Python 2.6, Python 2.7, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5574 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
export opengl context to pdf
Hi, Does anyone know of a package that will allow me to output an opengl context as a PDF (or postscript)? I am using pyglet to render something on screen that i want to save as PDF. thanks! vaibhav -- http://mail.python.org/mailman/listinfo/python-list
export opengl context to pdf
Hi, Does anyone know of a package that will allow me to output an opengl context as a PDF (or postscript)? I am using pyglet to render something on screen that i want to save as PDF. thanks! vaibhav -- Vaibhav Bhawsar -- http://mail.python.org/mailman/listinfo/python-list
error in SimpleXMLRPCServer
hi, I create a SimpleXMLRPCServer script which execute the command on server and return the result. code is below accessList=( 'test.org' ) class Server(SimpleXMLRPCServer.SimpleXMLRPCServer): def __init__(self,*args): SimpleXMLRPCServer.SimpleXMLRPCServer.__init__(self,(args[0],args[1])) def server_bind(self): self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) SimpleXMLRPCServer.SimpleXMLRPCServer.server_bind(self) def verify_request(self,request, client_address): if client_address[0] in accessList: return 1 else: return 0 class xmlrpc_registers: def __init__(self): self.python_string = string def clientfun(self,argument): try: cmd = argument (stdin,stdout,stderr)=popen3(cmd) stdin.close() value2=stdout.read() value3=stderr.read() stdout.close() stderr.close() output = {stdout:value2,stderr: value3} return output if __name__ == __main__: if (len(sys.argv) == 3): try : servername=sys.argv[1] portnumber=int(sys.argv[2]) server = Server(servername,portnumber) server.register_instance(xmlrpc_registers()) server.serve_forever() except Exception,e: print Root service is shutting down .. print str(e) else: print Please provide \hostname or ip\ \portnumber\ this server side code i run in background using nohup from client when i call function it execute fine but after some time when i call it gives following error ProtocolError for hostname:portnumber /RPC2: -1 and server program killed. please help -- http://mail.python.org/mailman/listinfo/python-list
[no subject]
hi, I wrote a python program and import the function and executing , that fuction get executing as the current uid what i have to do if i want to exectue that function as root or another user . -- http://mail.python.org/mailman/listinfo/python-list
Re: list problem 4 newbie
Hi, if u check the id's of a and b lists and also its elements, you will obeserve that the id's of a and b have changed but id's of their elements have not changed. If you make a deep copy of the list a and then make your changes in that list, it shud work. this can be done using the copy module. hope that helps, vaibhav id(a) -1208622388 id(b) -1208622324 for el in a: ... print id(el) ... -1208622836 -1208622708 -1208622772 -1208622420 for el in b: ... print id(el) ... -1208622836 -1208622708 -1208622772 -1208622420 import copy c = copy.deepcopy(a) id(c) -1208464564 for el in c: ... print id(el) ... -1208465172 -1208464276 -1208464180 -1208463988 -- http://mail.python.org/mailman/listinfo/python-list
Re: import woe
Hi bob, 1. decide the directory which will be your root folder containing foo [/home/ROOT/foo/] 2. work out your directory structure relative to this root folder here it is -ROOT-foo-car.py -bar-far.py -bar-jar.py 3. add __init__.py file inside each folder containing a list variable __all__ with contents as the name of the directories and classes so foo folder should contain a file called __init__.py which has the following contents __all__ = ['bar','car'] and bar folder should contain a file called __init__.py which has the following contents __all__ = ['far','jar'] 4. add the root folder to your sys.path so your jar.py file should have the following entries from sys import path path.append('../../../ROOT') note: i prefer relative paths or make paths using os.getcwd combinations in such situations, which makes the class more flexible. you can also do this step where u configure/initialize 5. then you can import the classes you want in jar.py from foo import car from foo.bar import far pls mail if u dont get it working/any doubts. - vaibhav -- http://mail.python.org/mailman/listinfo/python-list
Re: who can give me the detailed introduction of re modle?
easy and convenient way to get a good introduction for any module [especially if ur stuck and dont have internet connectivity]: 1. start python interpreter $ python 2. import the module and ask it for help :-) import re help(re) -vaibhav -- http://mail.python.org/mailman/listinfo/python-list
What are new-style classes?
I recently heard about 'new-style classes'. I am very sorry if this sounds like a newbie question, but what are they? I checked the Python Manual but did not find anything conclusive. Could someone please enlighten me? Thanks! -- http://mail.python.org/mailman/listinfo/python-list