[issue37575] Python Documentation on strings ( section 3.1.2.)
New submission from Srikanth : In section 3.1.2 of the python documentation, its mentioned as below: Two or more string literals (i.e. the ones enclosed between quotes) next to each other are automatically concatenated. This feature is particularly useful when you want to break long strings: This only works with two literals though, not with variables or expressions: However, the concatination operation works on variables and expressions also. Please find the below python code snippet and the output: Python Code: - s1='Hello' s2=' World ' s3=' How are you ? ' print(s1, s2, "\n", s3, "\n") print('---') print('Long time ' 'No see mate ') print("Hope ", 'All is ' "good") print('---') print(s1, 'World'," !!") print((s1+s2+s3)*2," there ?") Output: Hello World How are you ? --- Long time No see mate Hope All is good --- Hello World !! Hello World How are you ? Hello World How are you ? there ? -- assignee: docs@python components: Documentation files: Python_Docs_3.1.2_String_Concatination.py messages: 347754 nosy: Deshpande, docs@python priority: normal severity: normal status: open title: Python Documentation on strings ( section 3.1.2.) type: resource usage Added file: https://bugs.python.org/file48474/Python_Docs_3.1.2_String_Concatination.py ___ Python tracker <https://bugs.python.org/issue37575> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34965] Python on Docker container using flask is going down after sometime
Srikanth added the comment: @Windson Yang The container is neither crashing nor responding for requests. Is there a way I can pull any dumps or tracelog, so I can gather and give it to you -- ___ Python tracker <https://bugs.python.org/issue34965> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34965] Python on Docker container using flask is going down after sometime
Srikanth added the comment: @anton.barkovsky Thank you so much for quick response. I am not pretty sure, but below are the findings so far. The same docker container is used by 30+ applications. All applications are working fine until last week and all of a sudden all apps are going down one by one. Our preliminary analysis is all projects using flask are going down where as apps not using flask are good. We use Kubernetes service layer, so we are checking if there is anything suspicious upgrade happened there as well. I am trying to explore more to see if anybody faced such issues with flask Eg: https://stackoverflow.com/questions/24884901/python-flask-webserver-stop-responding Thanks much for taking time -- ___ Python tracker <https://bugs.python.org/issue34965> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34965] Python on Docker container using flask is going down after sometime
New submission from Srikanth : We are have created Python 3.5 image on docker container. All applications which are running on non-flask are working fine, but applications which are running on flask 0.12.2 are failing after prolonged usage of the application (Approx after 12 hours). Note: We have enabled heart beat check for python to make sure the container is up which hits every 10 seconds. After approx 12 hours, the application is stopping to respond to heart beat. Any expert suggestion plz. -- components: Tests messages: 327586 nosy: sri_spl priority: normal severity: normal status: open title: Python on Docker container using flask is going down after sometime type: crash versions: Python 3.5 ___ Python tracker <https://bugs.python.org/issue34965> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue28956] return list of modes for a multimodal distribution instead of raising a StatisticsError
Srikanth Anantharam <sri...@gmail.com> added the comment: Please review the new PR with tests. I'll update the documentation if the PR is acceptable. -- title: return minimum of modes for a multimodal distribution instead of raising a StatisticsError -> return list of modes for a multimodal distribution instead of raising a StatisticsError ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue28956> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue28956] return minimum of modes for a multimodal distribution instead of raising a StatisticsError
Change by Srikanth Anantharam <sri...@gmail.com>: -- keywords: +patch pull_requests: +5512 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue28956> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue28956] return minimum of modes for a multimodal distribution instead of raising a StatisticsError
Srikanth Anantharam added the comment: @steven: data = [1, 2, 3, 4, 4, 4, 5, 6, 7, 7, 8, 8, 8, 8, 8, 8, 8, 9, 9] is clearly unimodal with mode 8 data would have been bimodal if 4 repeated exactly the same (7) number of times as 8, like this: data = [1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 5, 6, 7, 7, 8, 8, 8, 8, 8, 8, 8, 9, 9] in which case the new patch in PR 50 would return a tuple (4, 8) Thanks & Regards Srikanth Anantharam +91 7204 350429 https://sria91.github.io/ Sent from Android On 13-Dec-2016 3:24 PM, "Steven D'Aprano" <rep...@bugs.python.org> wrote: Steven D'Aprano added the comment: On Tue, Dec 13, 2016 at 09:35:22AM +, Srikanth Anantharam wrote: > > Srikanth Anantharam added the comment: > > A better choice would be to return a tuple of values (sliced from the > table). And let the user decide which one to use. The current mode() function is designed for a very basic use-case, where you have an obvious single mode from discrete data. The problem with dealing with multiple modes is that its not easy to tell the difference between a genuinely multi-modal sample and one which just happens to have a few samples with the same value: data = [1, 2, 3, 4, 4, 4, 5, 6, 7, 7, 8, 8, 8, 8, 8, 8, 8, 9, 9] Assuming the sampling is fair, 8 is clearly the mode; but is it bimodal with 4 the second mode? Or perhaps even four modes, 8, 4, 7 and 9? I have plans for introducing a binning function to collect data into bins and run statistics on the bins. That might be a better way to deal with multi-modal samples: if you bin the data (for discrete data, use a bin size of 1) and then look at the frequencies, you can decide how many modes there are. Thanks for the suggestion. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28956> ___ -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28956> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue28956] return minimum of modes for a multimodal distribution instead of raising a StatisticsError
Srikanth Anantharam added the comment: Please see the updated pull request PR 50, with the changes. Thanks & Regards Srikanth Anantharam +91 7204 350429 https://sria91.github.io/ Sent from Android On 13-Dec-2016 3:26 PM, "Srikanth Anantharam" <rep...@bugs.python.org> wrote: > > Changes by Srikanth Anantharam <sri...@gmail.com>: > > > -- > pull_requests: +4 > > ___ > Python tracker <rep...@bugs.python.org> > <http://bugs.python.org/issue28956> > ___ > -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28956> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue28956] return minimum of modes for a multimodal distribution instead of raising a StatisticsError
Changes by Srikanth Anantharam <sri...@gmail.com>: -- pull_requests: +4 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28956> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue28956] return minimum of modes for a multimodal distribution instead of raising a StatisticsError
Srikanth Anantharam added the comment: A better choice would be to return a tuple of values (sliced from the table). And let the user decide which one to use. Hope that's justifiable... Thanks & Regards Srikanth Anantharam +91 7204 350429 https://sria91.github.io/ Sent from Android On 13-Dec-2016 2:20 PM, "Wolfgang Maier" <rep...@bugs.python.org> wrote: > > Wolfgang Maier added the comment: > > What's the justification for this proposed change? Isn't it better to > report the fact that there isn't an unambiguous result instead of returning > a rather arbitrary one? > > -- > nosy: +steven.daprano, wolma > versions: +Python 3.7 -Python 3.5 > > ___ > Python tracker <rep...@bugs.python.org> > <http://bugs.python.org/issue28956> > ___ > -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28956> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue28956] return minimum of modes for a multimodal distribution instead of raising a StatisticsError
New submission from Srikanth Anantharam: return minimum of modes for a multimodal distribution instead of raising a StatisticsError -- components: Library (Lib) messages: 283071 nosy: Srikanth Anantharam priority: normal pull_requests: 3 severity: normal status: open title: return minimum of modes for a multimodal distribution instead of raising a StatisticsError type: behavior versions: Python 3.5 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28956> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25882] argparse help error: arguments created by add_mutually_exclusive_group() are shown outside their parent group created by add_argument_group()
Changes by Srikanth Viswanathan <srikant...@gmail.com>: -- nosy: +srikanth ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25882> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1372770] email.Header should preserve original FWS
Changes by Srikanth S sriks...@gmail.com: -- nosy: +srikanths ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1372770 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11492] email.header.Header doesn't fold headers correctly
Changes by Srikanth S sriks...@gmail.com: -- nosy: +srikanths ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11492 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
open urls in browser
Hi All, I am new to python. Before posting i have done some google regarding my question. But i didn't get exact information. So thought of posting it here. I want to open a list of urls in browser that too in same window with out exiting. it should load one by one on same window and also it should log the details simultaneously to another text file. Ex: http://www.google.com - Pass/Fail. If you guys already having this code please share it with me. Thanks a lot in advance. -- http://mail.python.org/mailman/listinfo/python-list
Re: open urls in browser
On Jul 18, 6:21 pm, Chris Angelico ros...@gmail.com wrote: On Mon, Jul 18, 2011 at 10:05 PM, srikanth srikanth0...@gmail.com wrote: Ex:http://www.google.com- Pass/Fail. What do you mean by Pass or Fail? If you send a URL to a web browser, all you'll find out is whether or not the browser accepted it - it won't tell you if the page is valid. If you want that, you don't need a web browser at all - what you want is a simple URL fetcher, such as urllib/urllib2. http://docs.python.org/library/urllib.htmlhttp://docs.python.org/release/3.1.3/library/urllib.request.html ChrisA Sorry i don't need that one. by mistake i have written it. -- http://mail.python.org/mailman/listinfo/python-list
[issue6942] email.generator.Generator memory consumption
Changes by Srikanth S sriks...@gmail.com: -- nosy: +srikanths ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1670765] email.Generator: no header wrapping for multipart/signed
Changes by Srikanth S sriks...@gmail.com: -- nosy: +srikanths ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1670765 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue968430] error flattening complex smime signed message
Changes by Srikanth S sriks...@gmail.com: -- nosy: +srikanths ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue968430 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Python CGI windows
Dear All, I Have certain clarification in python CGI. I use Python IDLE *1. How do we execute CGI Scripts in Windows? 2. How do i configure the Server?(If i use WAMP,XAMPP) 3. Is mod_python required for python cgi? * Someone Please revert back to me with the solution for the same.I would be at-most thankful -- Thanks Regards, Srikanth.N -- http://mail.python.org/mailman/listinfo/python-list
Re: Removing a particular index from a list
Thanks Steve, Cyril and Peter. This, or not reading the tutorial. http://docs.python.org/tut/node7.html#SECTION00720 Peter I read this 2 months ago and I expected it to be a method of list, but I sound like I am making an excuse. Thanks a lot. Regards, Srikanth -- http://mail.python.org/mailman/listinfo/python-list
Removing a particular index from a list
Hi, list.remove(item) removes the first item from the list, but how do I say to remove a particular index from a list without using it's value? Let's say I have 4 items in my list as li = [sri, s, srikanth, s] And if I want to remove the last item (s), how do I remove it? li.remove(-1) doesn't do it. This is my problem. Thanks, Srikanth -- http://mail.python.org/mailman/listinfo/python-list
Re: Problem with Packages
It appears that you forgot the basic rule: a package is a directory with an __init__.py file (even if empty). Exactly right. I didn't know that __init__.py is a mandatory one. Thanks for pointing out. my_apps | |-- mod3.py |-- dir1/dir1_1/mod1.py |-- dir2/dir2_2/mod2.py You need 4 of such files here. Thanks again for saying 4, cause I would have definetly put only 2 (inside dir1_1 and dir2_2) And the directory my_apps is included in PYTHONPATH environment variable, what am I doing wrong? I executed this code under PyDev and it's working perfectly but when I run it outside of PyDev, it fails. Maybe PyDev plays some tricks with PYTHONPATH or something... I got the same doubt and I checked PyDev before posting, the PYTHONPATH is exactly the same but I didn't notice or rather overlooked __init__.py file it created automatically when I created packages using the dialogs. Gabriel Genellina Thanks you Gabriel! -- Srikanth -- http://mail.python.org/mailman/listinfo/python-list
Problem with Packages
Hi, I am learning about Python packages and I am getting an ImportError but I can't figure out the reason why. I have three modules and they are stored in a directory hierarchy as: my_apps | |-- mod3.py |-- dir1/dir1_1/mod1.py |-- dir2/dir2_2/mod2.py mod1.py defines a function called add(num1, num2) and mod2.py defines a function called multiply(num1, num2) and mod3.py makes use of the two functions defined in mod1.py and mod2.py and mod3.py's contents is as follows: --- from dir1.dir1_1 import mod1 from dir2.dir2_2 import mod2 def main(): print mod1.add(10, 34) print mod2.multiply(3, 6) if __name__ == __main__: main() -- And the directory my_apps is included in PYTHONPATH environment variable, what am I doing wrong? I executed this code under PyDev and it's working perfectly but when I run it outside of PyDev, it fails. This is command I used to execute mod3.py: C:\ python C:\my_apps\mod3.py But I get the following error: Traceback (most recent call last): File c:\my_apps\mod3.py, line 1, in ? from dir1.dir1_1 import mod1 ImportError: No module named dir1.dir1_1 Thanks, Srikanth -- http://mail.python.org/mailman/listinfo/python-list
Best Free and Open Source Python IDE
Yes, All I need is a good IDE, I can't find something like Eclipse (JDT). Eclipse has a Python IDE plug-in but it's not that great. Please recommend. Thanks, Srikanth -- http://mail.python.org/mailman/listinfo/python-list