[issue37615] json - make load and dump work with filenames and path-like objects

2019-07-18 Thread Varun Agrawal
Change by Varun Agrawal : -- pull_requests: +14624 pull_request: https://github.com/python/cpython/pull/14832 ___ Python tracker <https://bugs.python.org/issue37

[issue37615] json - make load and dump work with filenames and path-like objects

2019-07-17 Thread Varun Agrawal
New submission from Varun Agrawal : Currently, json.load and json.dump take file pointers, aka file-like objects which have support for `.write()` and `.read()`. This necessitates the following pattern of code on a regular basis: ``` with open(filename) as f: o = json.load(f

[issue32559] logging - public function to get level from name

2018-01-16 Thread Varun Agrawal
Varun Agrawal <varagra...@gmail.com> added the comment: @zach.ware: True, but since we already have a getLevelName method, having a symmetric method to do the opposite made sense. Plus the method can perform error checking and other things to ensure much cleane

[issue32559] logging - public function to get level from name

2018-01-16 Thread Varun Agrawal
Varun Agrawal <varagra...@gmail.com> added the comment: The request is not to set the level but to get the level given the level name aka textual representation. For example, passing in INFO should return 20 and passing in CRITICAL should ret

[issue32559] logging - public function to get level from name

2018-01-15 Thread Varun Agrawal
New submission from Varun Agrawal <varagra...@gmail.com>: Currently, the logging module has a function `getLevelName` and directly accessing the `_nameToLevel` dict is poor practice bordering on non-pythonic. It would be nice to have a simple method like `getNameLevel` in the

Python Learning

2017-12-15 Thread Varun R
Hi All, I'm new to programming, can anyone guide me, how to start learning python programming language,...plz suggest some books also. Thanks all -- https://mail.python.org/mailman/listinfo/python-list

[issue31123] fnmatch does not follow Unix fnmatch functionality

2017-08-07 Thread Varun Agrawal
Varun Agrawal added the comment: Hi David, It seems you already took a look at the man page. There are some subtle differences such as being unable to match to a directory when the pattern ends with a forward slash. Overall, I'd like to see fnmatch be used to create a program that can perform

[issue31123] fnmatch does not follow Unix fnmatch functionality

2017-08-04 Thread Varun Agrawal
New submission from Varun Agrawal: Currently, the fnmatch module in Python does not operate like the Unix equivalent command. This is especially the case with patterns such as `dir/` which does not match directory path returned by `os` (which would be `dir`) and neither does the pattern match

Re: How to loop through nodes of xml through xslt

2014-07-31 Thread varun bhatnagar
Hi Dan, Thanks a lot for the reply. I am using lxml for the transformation and I am parsing xsl file using lxml module, that is why posted in this list. Is there any way out to achieve this? Thanks, BR, Varun On Thu, Jul 31, 2014 at 5:47 AM, Dan Stromberg drsali...@gmail.com wrote: On Wed

How to loop through nodes of xml through xslt

2014-07-30 Thread varun bhatnagar
this tag every time from each xml and then merge it sequentially. Can anyone tell me how to achieve this. How can I loop every Procedure tag and and append the attrProc attribute value in a sequential order? Thanks, BR, Varun -- https://mail.python.org/mailman/listinfo/python-list

Removing xml element and strip extra space

2014-07-22 Thread varun bhatnagar
to strip the space between *nodePeriod* and */nodeInfo* Can anyone suggest a way out to do that? Thanks, BR, Varun -- https://mail.python.org/mailman/listinfo/python-list

Re: Removing xml element and strip extra space

2014-07-22 Thread varun bhatnagar
this can be achieved? Can't this be handled by xslt itself in some way? Thanks, BR, Varun On Tue, Jul 22, 2014 at 2:23 PM, Monte Milanuk memila...@invalid.com wrote: On 2014-07-22, varun bhatnagar varun292...@gmail.com wrote: I want to strip the space between *nodePeriod* and */nodeInfo* Can

Re: Removing xml element and strip extra space

2014-07-22 Thread varun bhatnagar
/testNode On Tue, Jul 22, 2014 at 3:00 PM, Tim jtim.arn...@gmail.com wrote: On Tuesday, July 22, 2014 8:53:35 AM UTC-4, varun bhatnagar wrote: Hi, Thank you so much for the suggestion. I tried using the rstrip() function but that did not work. Still getting a blank space between nodePeriod

xslt with python

2014-07-15 Thread varun bhatnagar
(test_file_1.xml) in xsl file using document() function. Once this code is executed I can see only the content of test_file_2.xml. Am I doing something wrong? Is there any other way to do this because my xslt rules are working fine without python. Thanks, BR, Varun -- https://mail.python.org/mailman

Re: xslt with python

2014-07-15 Thread varun bhatnagar
merged. I have to see how can I resolve the URI problem. //Varun On Tue, Jul 15, 2014 at 3:12 PM, Tim jtim.arn...@gmail.com wrote: On Tuesday, July 15, 2014 4:10:57 AM UTC-4, varun bhatnagar wrote: I am trying to merge two xmls using xslt in python but the content of first xml is not getting

Does python support ATL Modelling Language?

2014-07-09 Thread varun bhatnagar
will be appreciated! :) Thanks, BR, Varun -- https://mail.python.org/mailman/listinfo/python-list

Re: Does python support ATL Modelling Language?

2014-07-09 Thread varun bhatnagar
, still need to investigate). All these things I was doing using ATL. Anyways, I can still go through this and see if this works for me. /Varun On Wed, Jul 9, 2014 at 3:20 PM, William Ray Wing w...@mac.com wrote: On Jul 9, 2014, at 4:38 AM, varun bhatnagar varun292...@gmail.com wrote: Hi, I

[issue4142] smtplib doesn't clear helo/ehlo flags on quit

2014-03-09 Thread Varun Sharma
Varun Sharma added the comment: I have added a patch and it's test case as per martin's suggestions. Now function close() resets the attributes :sock, default_port, ehlo_msg, ehlo_resp, helo_resp, source_address But it does *not* reset : debuglevel, does_esmtp,esmtp_features, file

[issue20770] Inform caller of smtplib STARTTLS failures

2014-03-04 Thread Varun Sharma
Varun Sharma added the comment: I think that raising an exception for starttls failure can be avoided, so i have added a patch for documentation which adds the following line to doc string : If server supports TLS but fails to start it, then it does not raise any exception

[issue11558] Raise a more helpful exception in email.message.Message.attach after set_payload(some string)

2014-03-02 Thread Varun Sharma
Varun Sharma added the comment: Afer getting a lot of help from david on irc, i finally improved the patch. Now it catches AttributeError and raises TypeError for non-object types in attach function. -- Added file: http://bugs.python.org/file34269/test_email_attach_to_string.patch

[issue11558] Raise a more helpful exception in email.message.Message.attach after set_payload(some string)

2014-03-02 Thread Varun Sharma
Varun Sharma added the comment: I have fixed the pep8 voilations and shortened the regex as you suggested in the new patch. -- Added file: http://bugs.python.org/file34270/test_email_attach_to_string_11558.patch ___ Python tracker rep

[issue11558] Raise a more helpful exception in email.message.Message.attach after set_payload(some string)

2014-03-02 Thread Varun Sharma
Varun Sharma added the comment: Sorry :) -- Added file: http://bugs.python.org/file34273/test_email_attach_to_string_11558.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11558

[issue11558] Raise a more helpful exception in email.message.Message.attach after set_payload(some string)

2014-03-01 Thread Varun Sharma
Varun Sharma added the comment: I have made a patch which raises TypeError whenever a string type payload is attached to message using email.Message.attach() method.I have also added a unit test for the same. Need review. -- keywords: +patch nosy: +varun Added file: http

[issue6598] calling email.utils.make_msgid frequently has a non-trivial probability of generating colliding ids

2014-02-28 Thread Varun Sharma
Changes by Varun Sharma varunsharmal...@gmail.com: -- nosy: +varun ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6598 ___ ___ Python-bugs-list

Issue in installing xlwt package

2013-09-14 Thread varun nayyar
Hello,I am using windows 7 32 bit and installed python 2.7.5When i am trying to install xlwt 0.7.5 package from cmd prompt it shows Access Denied.When i run the cmd in administrator mode I am getting the following error: Fatal Python error: Py_Initialize: can't initialize sys standard

[issue15850] list.count() results wrong if both booleans 1's/0's are present in the list

2012-09-03 Thread Varun Masuraha
Varun Masuraha added the comment: Hey Martin, I think I got the point. Meanwhile I created my own myCount() for my problem ;-) Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15850

[issue15850] list.count() results wrong if both booleans 1's/0's are present in the list

2012-09-02 Thread Varun Masuraha
New submission from Varun Masuraha: setup: myList=[1,True,'blah blah'] print(myList.count(1)) Actual result: 2 Expected: 1 -- messages: 169707 nosy: varun_masuraha priority: normal severity: normal status: open title: list.count() results wrong if both booleans 1's/0's are present

[issue15850] list.count() results wrong if both booleans 1's/0's are present in the list

2012-09-02 Thread Varun Masuraha
Varun Masuraha added the comment: Thanks Alex for the reply, Although Booleans Integers may not be very practical in same list (or tuple, etc.) the fact that bool is subclass of int, still I feel that the search implementation (count, index, etc.) is too simple in that matter. Comparing

Language detector for Python using en-gram.

2009-07-28 Thread varun
One of my friend suggested me to do a language detector for python.At present the language detector in python is in uni-gram mode and i have planned to do it in en-gram mode.Kindly give me your suggestion as i am doing this as my final year project. With Anticipation, Varun V. Kumar -- http

controlling the windows

2008-07-03 Thread varun chadha
i am developing an application using Tkinter where 'next' button takes to another window and removes the first one from screen and 'back' button bring me back to previous window and so on. though i am able to move from one window to another but is unable to remove the previous one from the

connecting to DBMS

2008-07-01 Thread varun chadha
i am a newbie to python and is working on an application which needs to connect to the database. can anyone guide me through the DBMS that i can use and the module to connect to it. currently i have MySQL installed using the link on the python.org site but is unable to connect to it through

passing control to other window

2008-06-21 Thread varun chadha
i am trying to develop a application using Tkinter in which a new window pops out on a particular button press.though i can pass control automatically to that window using .force_focus() method and disabling all my widgets in previous window but the technique is not so clean. for eg. when u click

Problem rendering indic fonts in Tkinter

2008-06-09 Thread varun embar
Hi, I was trying to build a kannada word processor using tkinter.But i have some problem rendering conjunct consonants. For eg:- a = Text(root) a.insert(INSERT,unichr(0x0c95)+unichr(0x0ccd)+unichr(0x0c95)) this gives two separate consonants rather than one conjunct consonant --

Interfacing my chess client with GNU chess using python

2006-09-18 Thread Varun Hiremath
--8--8--8 Varun Hiremath Undergraduate Student, Aerospace Engg. Department, Indian Institute of Technology Madras, Chennai, India --- Webpage : http://www.ae.iitm.ac.in/~ae03b032

KPanelApplet using Python

2006-02-24 Thread Varun Hiremath
Hi, I was wondering if there is any way to make KDE PanelApplets using Python. I have made a small window using Qt, kdeui nad kdecore libs. Now I want to add it to the KDE kicker. Can I get any help regarding this matter. Thank you. -- --- Varun

Re: KPanelApplet using Python

2006-02-24 Thread Varun Hiremath
don't know exactly how to use it. I need some help regarding this. Thank You -- --- Varun Hiremath 461, Jamuna Hostel IIT Madras, Chennai - 600 036 mob : +919840299732 --- My Webpage : http://www.ae.iitm.ac.in

Re: KPanelApplet using Python

2006-02-24 Thread Varun Hiremath
On Fri, 24 Feb, 2006 at 09:55:59AM -0800, David Boddie wrote: Varun Hiremath wrote: I was wondering if there is any way to make KDE PanelApplets using Python. I have made a small window using Qt, kdeui nad kdecore libs. Now I want to add it to the KDE kicker. Can I get any help

Re: plotting with gnuplot.py

2005-09-02 Thread Varun Hiremath
u need to take the transpose of this column before plotting.. x=Numeric.transpose(x) y=Numeric.transpose(y) g=Gnuplot.Gnuplot() d=Gnuplot.Data(x,y) g('set logscale xy') g.plot(d) It should work... Bye -- --- Varun Hiremath 461, Jamuna Hostel IIT

Problem with Pythoncard

2005-08-26 Thread Varun Hiremath
: Broken packages * -- --- Varun Hiremath 461, Jamuna Hostel IIT Madras, Chennai - 600 036 mob : +919840299732 --- My Webpage : http://www.ae.iitm.ac.in/~ae03b032

Re: Python Online Programming Contest

2005-03-02 Thread Varun
Hi, The results of OPC (online programming contest) is out. The statistics of python usage is available at http://www.samhita.info/opc/status.php. Regards, -OPC Team -- http://mail.python.org/mailman/listinfo/python-list

Python Online Programming Contest

2005-02-25 Thread Varun
Hi Friends, Department of Information Technology, Madras Institute of Technology, Anna University, India is conducting a technical symposium, Samhita. As a part of samhita, an Online Programming Contest is scheduled on Sunday, 27 Feb 2005. This is the first Online Programming Contest in India to

Python Online Programming Contest

2005-02-25 Thread Varun
Hi Friends, Department of Information Technology, Madras Institute of Technology, Anna University, India is conducting a technical symposium, Samhita. As a part of samhita, an Online Programming Contest is scheduled on Sunday, 27 Feb 2005. This is the first Online Programming Contest in India to

Re: Python Online Programming Contest

2005-02-24 Thread Varun
Hi, It is open for anyone across the world. All times are local ( GMT +5:30). The contest will be on Feb 27 (this sunday) and i will ensure that the times are clearly specified. -Varun -- http://mail.python.org/mailman/listinfo/python-list