Re: [BangPypers] Multiple Django app with nginx
On 20 May 2016 at 00:40, Sathishkumar Duraisamy <bewithsath...@gmail.com> wrote: > On Thu, May 19, 2016 at 11:50 PM, Gora Mohanty <g...@mimirtech.com> wrote: > >> On 19 May 2016 at 09:01, Sathishkumar Duraisamy <bewithsath...@gmail.com> >> wrote: >> [...] >> > >> > >> > May be you are right. I am really sorry, with many django developers here >> > in our local python list, I hoped to get solution. >> >> I do think it is off-topic: It really has to do with understanding >> how the proxy_pass directive in nginx works, and i is not just >> about being off-topic. Yes, you are, of course right, Please excuse me for spending time in actually trying to help you. Goodbye Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Multiple Django app with nginx
On 19 May 2016 at 09:27, Saurabh Kumarwrote: [...] > > You might want use `proxy_pass`[0][1]. > > Something like: > > ``` > location /app1 { > proxy_pass http://localhost:9000/; > } > location /app2 { > proxy_pass http://localhost:8000/; > } [...] Contrary to OP's original statement, this is not his immediate problem. The multiple apps part seem to work for him, but it seems that nginx redirections are contrary to his expectations. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Multiple Django app with nginx
On 19 May 2016 at 09:01, Sathishkumar Duraisamywrote: [...] > > > May be you are right. I am really sorry, with many django developers here > in our local python list, I hoped to get solution. I do think it is off-topic: It really has to do with understanding how the proxy_pass directive in nginx works, and i is not just about being off-topic. I still think that you would get better answers on a nginx list. The fact that nginx is proxying to a Django application is irrelevant here. Nevertheless, I am bored at the moment :-) [...] > Below is my nginx configuration, with domain name changed to example.com. > Here I two application one is Taiga which is basically django application > and second one is green, which is again, home grown django application.This > one is on second server( with different architecture with docker). I have > checked with browser with address 10.135.48.188:8000 and is working good. Your description points to a different issue: The problem is not that there are multiple upstream servers (those seem to be configured correctly, and should be working fine), but that you are seeing what you feel to be an unexpected redirection. > I could see the home page of green project: > > https://example.com/green/ > > When I try to login with links in the home page of green, it is pointing to > https://example.com/login instead of https://example.com/green/login. May > be it is correct from nginx reverse proxy. [...] I think that this the crux of the confusion: While I cannot test this now, the above redirection should be as expected from your configuration. Viz., with the configuration: location /green/ { proxy_pass http://green_servers; } https://example.com/green/login should indeed redirect to https://example.com/login Maybe these links will help (I am unable to do more without a test setup): * nginx core documentation: Please read carefully the distinction between specifications with, and without a URI. Your /api and /green locations are different in this respect. * Multiple examples of such configurations: http://www.liaohuqiu.net/posts/nginx-proxy-pass/ A final thing to watch out for is trailing-slashes in the proxy-pass directive: The nginx behaviour here can be quite confusing. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Multiple Django app with nginx
On 19 May 2016 at 00:41, Sathishkumar Duraisamywrote: > Hi All, > > In Apache with help of modwsgi module we can mount may application like > > WSGIScriptAlias /app1 /usr/local/www/wsgi-scripts/myapp1.wsgi > WSGIScriptAlias /app2 /usr/local/www/wsgi-scripts/myapp2.wsgi > > What is the similar approch for NGINX web server? Any idea? First of all, this is really off-topic here, and you are probably better off asking on a nginx list. Having said that, we regularly use nginx with gunicorn, and what you need to do is * Set up an upstream server that defines the TCP/Unix domain socket that gunicorn is listening on. Something like: upstream app_server { server 127.0.0.1:80 fail_timeout=0; } * Then, proxy to the app_server, e.g., location @proxy_to_app { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-Protocol https; proxy_redirect off; proxy_buffering off; proxy_pass http://app_server; } There are many detailed write-ups available by searching Google: See, e.g., http://michal.karzynski.pl/blog/2013/06/09/django-nginx-gunicorn-virtualenv-supervisor/ > I have been trying with reverse proxy along with gunicorn, but not able to > achieve. > > I am trying to get mount as follows: > > http://exmaple.com/app1 --> 127.0.0.1:8000/ > http://exmaple.com/app1/home/ --> 127.0.0.1:8000/home/ [...] Please show actual nginx configuration on the nginx mailing list rather than pseudo-examples like this. Nobody can tell what you are actually trying. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Anand S at cnnibng
On 18 May 2016 at 22:06, Chandruwrote: > Thanks for responding > > Can you refer someone pls? [...] With all due respect, I rest my case: The more that regulars on this list feel free to post off topic, the more irrelevant postings that we invite, till the list becomes an unusable mess. May I quote once again the second line from https://mail.python.org/mailman/listinfo/bangpypers "This group is for discussions related to the Python programming language. We welcome all kinds of discussions related to Python." What exactly about this statement is lacking in clarity? Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Anand S at cnnibn
On 18 May 2016 at 23:09, Nitin Kumarwrote: > > I was anticipating few names to respond. And I was bang on. Guilty as charged :-) We have been through this argument many times now, and I have no wish to re-ignite it. All I can do is stand by my position, which I do not think is unreasonable. > "Now, what would have been > on-topic would have been a discussion on how those plots were created > with Python, > and any special tricks that were use" > > These details too would follow up if these mails are allowed to initiate. Great, but if you had this in mind, why not start from that end? Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Anand S at cnnibn
On 18 May 2016 at 21:05, Nitin Kumarwrote: > > Today evening just noticed Anand with Arnav at cnn ibn. Check my below tweet. > > https://twitter.com/nitinsview/status/732956770495123457 > > Someone might quote this as off topic ;) Er, maybe because it *is* off-topic on a technical list, but I am quite sure that you were aware of that. >but I was sure about > posting > it over this alias as uses python to do all those plotting used on > back screen That is hardly an excuse: By that token, I could discuss Debian/Ubuntu on this list as they make extensive use of Python for system tasks. Now, what would have been on-topic would have been a discussion on how those plots were created with Python, and any special tricks that were use. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Django
On 16 May 2016 at 22:02, Pavan Kulkarniwrote: > > Dear Sir > Could you please suggest good book on Django implementing Restful API Don't know about a book, but IMHO Django Rest Framework is the leader here, and is well documented: http://www.django-rest-framework.org/ . Try the tutorial first. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] C Programming trainer - Bangalore
On 16 May 2016 at 11:20, Suman Debnath via BangPyperswrote: > > (Sorry for the Spam, as this is not the right forum to ask) Well, you are right about the spam part, but still somehow felt entitled to go ahead and post. Please do not do that. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Plotting Range [1e13 to 1e19] in linear scale
On 9 May 2016 at 13:35, Santosh Chiniwarwrote: > Can I get you gmail ID so that I can send you code and problem. Sorry, but unless you want to pay for my time, I am afraid that I cannot commit to solving your problem, and will certainly *not* do that off list. As I said, make what you have done publicly available, and chances are that it will pique someone's interest enough to figure out a solution. If you want a guaranteed solution from someone that will work with you, please make a request for a commercial engagement. IMHO, as other people have been trying to point out, you need to understand how to engage with a community: A priori, the community owes you *nothing*. It is up to you to figure out how to get the community interested. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Plotting Range [1e13 to 1e19] in linear scale
On 9 May 2016 at 13:15, Santosh Chiniwarwrote: > I have sent a mail but its held until approval. For that I have attached > code. Now again I got same email. > I don't have to attach plots? This mailing list probably does not allow attachments. How long is the code? Can you use a service like pastebin, or put the code/plots somewhere for download? Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Plotting Range [1e13 to 1e19] in linear scale
Hi, With all due respect, your question is too vague for anyone to be able to answer: * You do not indicate which plotting library you are using. Without that, how do you expect anyone to help you? * Your first question is still vague: Of course, one can plot points in the range 1e13 to 1e19 on a linear scale. The real question probably is how to do this in a meaningful way, and that is probably specific to your data. If you share some details, and show what you have tried, people might be able to help you. Regards, Gora On 9 May 2016 at 12:06, Santosh Chiniwarwrote: > > Can I accept any response from a team. [...] > On 4 May 2016 at 15:28, Santosh Chiniwar wrote: > > > > > > > > > Hi All, > >A. I have difficulty in plotting from range 1e13 to 1e19 on linear > > scale. Any help is appreciated. > > > > B. How to stack all graph at single page. I mean three graphs without > > using subplot. Since subplot has problem under for loop. ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Exponential : warning overflow
On 29 March 2016 at 17:14, Santosh Chiniwarwrote: > Dear BangPypers, > Please find my code and I get Overflow warning. I am unable to continue > further. Any support or help is appreciated. Somewhere you are getting too large a number for the range of type in the array that you are using: probably because you are dividing by the very small Boltzmann constant. You either need to use a type with a bigger range, say bigfloat for arbitrary precision floating-point arithmetic, or if the errors only occur for values that can be ignored, see http://docs.scipy.org/doc/numpy/reference/generated/numpy.seterr.html for how to ignore errors. Incidentally, all this information is available from an easy Google search. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Python comparisons
On 5 December 2015 at 12:56, Noufal Ibrahim KVwrote: > > > So I came across this today.. > > >>> class Number(object): > ...def __init__(self, n): > ... self.n = n > ... > >>> m = Number(10) > >>> n = Number(5) > >>> > >>> m < n > True > > This is documented like so > > > If no __cmp__(), __eq__() or __ne__() operation is defined, class > > instances are compared by object identity (“address”). > > over here https://docs.python.org/2/reference/datamodel.html#object.__cmp__ Maybe because that was the historical way that C did it? I agree that the Python 3 exception makes more sense. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Life lessons shared by Jesse Noller
On 29 October 2015 at 18:11, Abdul Muneerwrote: > Hi, > Jesse Noller talks about the turn of events in his life since last couple > of years : http://jessenoller.com/blog/2015/9/27/a-lot-happens. > Valuable lessons for everyone. With all due respect to Mr. Noller, the article is not germane to this list. Please refrain from off-topic posts. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] BangPypers Digest, Vol 97, Issue 5
On 8 September 2015 at 18:57, Mandar Raibagiwrote: > > Folks, > You may feel this email out of context, but regarding usage of discount > coupon provided by @goibibodotcom, @pyconindia and @goibibodotcom are > playing ping-pong with me. > The issue is I'm unable to apply my discount coupon while booking flights / > hotels through GoIbibo.com and I'm following up with them regarding this > issue for over a week, without solid resolution. > > What's the way to escalate this with Pycon India organizers. I'm a regular > visitor of PyCon for last 3 years. Sorry, but please take it up with the organisers directly: I fail to see why you are following up on this list. Also, as the digest itself mentions, please do not quote the entire digest when following up to digest mail. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] [clarification]
Hi, With due respect, this is off-topic to the list. OpenStack has mailing lists of its own, and you would probably find better responses on such lists. Regards, Gora On 12 August 2015 at 17:42, Shashidhar Paragonda shashidha...@gmail.com wrote: hello Python hackers, I wanted to learn about private cloud computing, gone through some google search information, found that OpenStack framework is good for the same. Does anyone have idea about OpenStack and its strength, futuristic benefits. Thank you in advance. -- --- Regards, Shashidhar N.Paragonda shashidha...@gmail.com +919900093835 ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] [X-Post] ERPNext Conference 2015
Hi, Thank you for the explanation. Please do include such an explanation in future postings. Regards, Gora On 23 July 2015 at 23:30, Harisankar P S mai...@hsps.in wrote: On Thu, Jul 23, 2015 at 11:12 PM, Gora Mohanty g...@mimirtech.com wrote: And, maybe you would care to explain how this is relevant to this group, or are you just spamming everyone willy-nilly? ERPNext is an open source tool released under GPLv3 license, developed using Python. -- Harisankar P S https://twitter.com/coderhs | *http://csnipp.com/coderhs http://csnipp.com/coderhs* ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] [X-Post] ERPNext Conference 2015
On 23 July 2015 at 17:23, Pratik Vyas m...@pd.io wrote: Hey! We are excited to announce the ERPNext Conference 2015 on October 9th in Mumbai. This is a great opportunity for ERPNext users, developers and open source enthusiasts to meet, share ideas and network with the community. For this conference, we are delighted to have Jordan Hubbard, the co-creator of the FreeBSD project, CTO at iX Systems and former Director of Unix at Apple as our guest speaker. Please reply to this thread or drop us an email to confere...@erpnext.com if you have any questions. https://conf.erpnext.com/2015 The entry fee is Rs. 500 and it includes lunch. And, maybe you would care to explain how this is relevant to this group, or are you just spamming everyone willy-nilly? Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Fwd: Need a help on reviewing a python code.
Hi, Just forget it. The problem statement itself is so badly broken that it is unfixable, IMHO. To quote from problem.txt: The application will not determine the alignments itself. Instead, the application must be able to load a set of plugins at runtime that will determine whether a particular configuration of planets is 'aligned' according to whatever definition the plugin uses for alignment. Yes, and without the specification of an interface, I suppose Moses will come down from the mountain to tell us how a particular plugin decides how a planet is alignedOh my God/aligned. IMHO, it is just not worth even applying to such companies as their basic recruitment process seems not to work. Regards, Gora On 17 July 2015 at 00:54, Senthil Kumaran sent...@uthcode.com wrote: Agree with Anuvrat. Paste your code in https://gist.github.com/ or upload it github/bitcket and share it again. I will help with the review. Thanks, Senthil On Thu, Jul 16, 2015 at 3:40 AM, Anuvrat Parashar anuv...@anuvrat.in wrote: 1. alignment.tar.gs is missing. 2. please consider hosting the code on github / bitbucket instead of attaching heavy files. On Thu, Jul 16, 2015 at 3:49 PM, Ramesh Rajagopal mail2.rame...@gmail.com wrote: -- Forwarded message -- From: Ramesh Rajagopal mail2.rame...@gmail.com Date: Jul 16, 2015 3:30 PM Subject: Fwd: Need a help on reviewing a python code. To: bangpypers@python.org Cc: Hello All, It would be very helpful, if you can review a small code which I had written in python. It is purely for my personal development perspective. I had a got an assignment from a company, they rejected my assignment without exactly stating what is the problem with my code. They just conveyed that it doesn't look like a pythonic way. I would like to understand my mistakes and improve on this. It would be good if you can help me on this. I am attaching the problem.txt(which has the assignment details, we need to make assumptions), then solution as alignment.tar.gz file. Looking forward you reply. Regards, Ramesh ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers -- Anuvrat Parashar http://anuvrat.in http://anuvrat.in ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Changing Time Zone dynamically in Django
On 14 July 2015 at 13:30, mithun chackravarthy vbnetmit...@gmail.com wrote: Is it possible to change TIME_ZONE variable dynamically in Django? The use case is when a user from IST comes the TIME_ZONE should Asia/Kolkata and if some one from GMT comes it should be set to UTC. https://docs.djangoproject.com/en/1.8/topics/i18n/timezones/#selecting-the-current-time-zone Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] UI less Rest API server with flask
Hi, Since you seem to be determined to reinvent the wheel, may I ask what is your use case to choose flask + largely-roll-one's-own-rest-api vs. Django + DRF? The same goes for all the recent hoopla in this list over Flask/Bottle over Django, if you ask me. Django is not all that difficult to get into, has a well-established track record, and is eminently scalable. For serious development, one also needs to worry about the community size, and support. I do not even know that Flask/Bottle/what have an edge over Django for any use case, but IMHO if so one would be talking about the scale of one the largest sites on the Internet. Remember, premature oprtimisation is the root of all evil. Sorry, but if you ask me I smell buzzword-driven development. Regards, Gora On 23 June 2015 at 00:20, anu sree anusree@gmail.com wrote: Thanks krace, Good suggestion, I am going to use schematics with flask. I red about schematics and think that will help me keep validation code clean and reduce number of statements in the code. Thanks On Mon, Jun 22, 2015 at 10:48 PM, kracekumar ramaraju kracethekingma...@gmail.com wrote: On Jun 22, 2015 19:03, anu sree anusree@gmail.com wrote: Thanks anuvrat and krace, How do we do validation of data in the POST and PUT API request, if we use only native fask ?. That is where serialization library like schematics comes to play. Pass the request data dict to serialization and call validate method. I have seen a way in flask-restful, but I am planing to use only native fask. http://flask-restful.readthedocs.org/en/latest/api.html#reqparse.RequestParser Thanks, On Mon, Jun 22, 2015 at 6:28 PM, kracekumar ramaraju kracethekingma...@gmail.com wrote: The biggest problem with all rest apis except Django REST framework is no distinction between serializer and model. Soon that will be problem for the kind of tasks you want to do. I don't use any framework to create apis in Flask. I follow different approach, use schematics [1] for serialization, Flask method view and use model methods/service layer to interact with dbs, queues etc ... You can find the similar example for Django in schematics example directory, it should be easy to implement in Flask too. [1]: http://github.com/schematics/schematics ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Fwd: Help!!! Python/Django WKHTMLTOPDF
Hi, This is really not on-topic for this list, but the error is most likely because wkhtmltopdf is not in your path. Try using the WKHTMLTOPDF_CMD = '/path/to/my/wkhtmltopdf' setting for django-wkhtmltopdf package Regards, Gora On 5 June 2015 at 15:03, Sunil Gupta su...@planmytour.in wrote: Hi All, We are facing the problem of creating the HTML to PDF in ubuntu.The package wkhtmltopdf is working fine on windows but when we integrated my code onto ubuntu its throwing errors. Any pointers would be a great help. Traceback (most recent call last): File ./apps/common/views.py, line 702, in get pdf_content = response.rendered_content File /usr/local/lib/python2.7/dist-packages/wkhtmltopdf/views.py, line 148, in rendered_content footer_filename=footer_filename) File /usr/local/lib/python2.7/dist-packages/wkhtmltopdf/views.py, line 107, in convert_to_pdf return wkhtmltopdf(pages=[filename], **cmd_options) File /usr/local/lib/python2.7/dist-packages/wkhtmltopdf/utils.py, line 98, in wkhtmltopdf return check_output(ck_args, **ck_kwargs) File /usr/lib/python2.7/subprocess.py, line 566, in check_output process = Popen(stdout=PIPE, *popenargs, **kwargs) File /usr/lib/python2.7/subprocess.py, line 710, in __init__ errread, errwrite) File /usr/lib/python2.7/subprocess.py, line 1327, in _execute_child raise child_exception *OSError: [Errno 8] Exec format error* We installed django-wkhtmltopdf package, wkhtmltopdf executable From the command prompt when we try creating the file it works fine but in django project its throwing error root$wkhtmltopdf www.google.com output.pdf works fine Any idea what can be the issue with Thanks Sunil ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Anyone who has worked on Lamson?
On 27 May 2015 at 17:48, Ramdas S ram...@gmail.com wrote: Noufal, I want to use this for setting up an interim SMTP server which based on certain rules should decide whether the mails need to go through the normal corporate server, or should go through an alternate SMTP server. This is primarily to reduce outbound spam as a result of some marketing campaigns running on side. [...] While I have no knowledge of Lamson, I would echo Noufal in recommending something like postfix. Cannot go into details without knowing more about your requirements, and anyway those would not be germane to this list, but postfix's transport system is very flexible in allowing mail redirection. IMHO, one should use the right tool for the job at hand. Regards. Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Text Mining + Search Engine Summer Project, Little Help?
Dear Pramod, This sounds great, and I think that it would be perfectly fine to continue such a discussion on this list. At least until it gets into nitty-gritties, upon which private email, or a list more focused on the topic might be where to go. Please do post details here. Even without knowing more about what you are doing, I would urge you to use an existing facility for efficient geospatial search, rather than reinventing the wheel. The ones that I know about are: * Lucene now has geospatial search, and Solr/Elasticsearch build on top of that * postgis offers geospatial search on top of the PostgreSQL database. There are more options depending on your use case. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] ImportError: cannot import name 'unquote'
On 20 March 2015 at 22:11, Nimish Dalal nimish.s.da...@gmail.com wrote: I installed Anaconda version 2.1.0 python 3.4.1 Unfortunately, I am not really conversant with Python3, but I think that there you would need: from urllib.parse import unquote Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] how to see each line result in python
On 3 March 2015 at 18:50, narayan naik narayannaik...@gmail.com wrote: [...] I want to see what happens in each line.I know what happens in theoritically but i want each line result.is i possible. What you seem to be looking for is a Python debugger. Try pdb: See, e.g., https://pythonconquerstheuniverse.wordpress.com/2009/09/10/debugging-in-python/ Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Django pagination
On 16 February 2015 at 12:42, Shashidhar Paragonda shashidha...@gmail.com wrote: hello hackers, I need help on implementing pagination for Restful responses in django, front hand I am using angular js. Basically I get customer details from rest request and I need to divide then by 25 per page with pagination how can I achieve this. No Db involved here. If the front-end is in AngularJS, you should probably do the pagination there. The JSON sent to AngularJS can contain a list of the entities to be paginated. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] How to manage Database for Django on live server?
On 30 January 2015 at 17:09, Mukesh Yadav mak@gmail.com wrote: Hi, I recently moved my office one of the app to Django. Now its time for this to go live. While development we faced many problems in terms of conflicts in migrations file of Django. Due to this I'm not confident that django should take control of database (migrate and makemigrations command) on live server. Would strongly recommend using migrations, rather than changing the schema manually. I presume that you are using the built-in support for migrations with Django 1.7. You do not explain details of the issues that you faced with using migrations, so it is difficult to comment further, but manual schema changes are more prone to errors. Have not yet had occasion to use Django 1.7's migrations, but South has been part of our Django setup for quite some time, and we have not faced significant issues with it besides glitches when support for a custom user was added to Django. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Terrible choices: MySQL. What is the way ahead?
On 30 December 2014 at 19:32, Noufal Ibrahim KV nou...@nibrahim.net.in wrote: [...] I can't offer anything normative but in my experience (and it's a little dated since I don't use mySQL for anything these days), mySQL is a disaster waiting to hit you. [...] Personally, I agree with this, but such arguments often degenerate into flamewars. IMHO, it comes down to a matter of knowing your tools, and what use-cases they can meet. Sometimes, mysql can be what one needs. If I had to recommend a path ahead, I'd suggest that you bite the bullet now and make the technical and other investments necessary to migrate from mySQL to postgres right away. It's a much more future proof investment. If your budget and situation doesn't allow for that, atleast make a plan to migrate and stop investing in mySQL for any of your work from now. Agreed strongly. Unless one can make a very good case for it, I would go with Postgresql. From what I am told, even if one has to use mysql, one should look at MariaDB. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] combine multiple modules in one
On 17 December 2014 at 23:35, Nitin Kumar nitin.n...@gmail.com wrote: Hi, say I am installing a module abc and it got multiple dependent modules say xyz pqr. pip easy install will take care of downloading and installing these. but i need to install abc on a device which doesnt have net connection. [...] Have only tried this once a while ago, but one can install offline with pip. See, e.g., https://pip.pypa.io/en/latest/user_guide.html#fast-local-installs Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] about code
On 15 December 2014 at 11:51, narayan naik narayannaik...@gmail.com wrote: [...] This is a face detection code.This will work properly.but I want to crop the detected faces and it should display on the screen. Please ask more specific questions *after* you have tried for yourself. Did you even try searching Google, e.g., cv2 crop detected faces turns up many likely-looking links. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] [Jobs][Part-Time] Django framework - Interested candidates for part time work
On 10 December 2014 at 18:01, abhishek choudhary acabhishek...@gmail.com wrote: I have some experience with django and would like to be a part of the discussion . As already requested, please take follow-ups off-line. They are not germane to this list. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Moving from python 2.6 to 2.7
On 7 October 2014 15:53, Kulkarni, Shreyas shy...@gmail.com wrote: Hi guys, We are planning to move our production environment from 2.6 to 2.7 on one of the projects. While I understand it's not a significant upgrade, this being a production environment, I was wondering what aspects of 2.6 might break under 2.7 and what I should be watching out for. I tried searching about it, but didn't hit anything useful. You should take a look at https://docs.python.org/3/whatsnew/2.7.html , and as always should have test cases that should uncover any issues in the migration. One thing to watch out for is that if you have bytecode (.pyc) files, it is quite possible that they will be incompatible between 2.6 and 2.7. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] The Python I would like to see - Armin Ronacher
On 19 August 2014 12:32, chandrakant kumar k.03chan...@gmail.com wrote: [...] Following are the problems i faced that made me revert back to Python 2.7 - 1. Lack of packages ported to Python 3, one of the main advantages of using Python is a large set of ready to be used packages, so that you can build something very quickly. This is not a criticism of Python 3 per se. 2. Performance is same if not less than that of Python 2.7. I have not been closely following this, but I did not think that performance was a criterion for Python 3. As I am sure that you are aware, projects like PyPi are addressing this, but again I do not know that performance was ever touted as a Python 3 feature. If i have to rewrite my code, with limited 3rd party packages, resulting in little or no performance gains, i would rather move to CLISP, at least the performance gains would be worth it. And, about the day-to-day work, i have a SAAS application built with Python 3, and the inconvenience it caused without the rewards, made me regret my decision to move to Python 3. [...] Why then did you decide to move to Python 3? Unlike, say major revisions to PHP, most Python people that I have met are happy with 2.7, and there does not seem to me a critical feature like, say improved security, that provides a strong incentive to make the move. Not trying to show you up, but seriously would like to know your rationale. We have been itching to goto Python 3, but the deal-breaker for us was Django not being ready. Now that Django does support Python 3, we did think again about moving, but held off exactly because of what you mention: Lack of Python 3 support in several third-party apps that were critical for us. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] The Python I would like to see - Armin Ronacher
On 19 August 2014 21:24, Baiju M baiju.m.m...@gmail.com wrote: I would like to add one point about deployment of large and complex applications written in Python. Deployment of these types of applications are very difficult in Python. Would you please elaborate on the difficulties? We are reasonably happy with AWS images to bootstrap the system, then virtualenv, pip, fabric and now ansible to deploy Django apps. I would love to install single statically linked binaries for deployment. Building these binaries should be very fact also, say less than 1 minute. Statically-linked binaries are so 1990s :-) This is one of the reason I am getting attracted to Golang :-) For me, the main attraction of Go is the concurrency features. Syntax still seems strange, though. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] The Python I would like to see - Armin Ronacher
On 19 August 2014 21:58, Sriram Narayanan sriram...@gmail.com wrote: On Tue, Aug 19, 2014 at 9:53 PM, Gora Mohanty g...@mimirtech.com wrote: snip/ We have been itching to goto Python 3, but the deal-breaker for us was Django not being ready. Now that Django does support Python 3, we did think again about moving, but held off exactly because of what you mention: Lack of Python 3 support in several third-party apps that were critical for us. I've suggested to one of my customers that they could sponsor some dev time for helping migrate to Python 3. After some consideration, they moved to Go Lang. Sorry, but again this makes no sense to outsiders without the context of why such a choice was made, and IMHO leads to pointless flame-wars about my programming language is better than yours when the truth is that they all suck, though in different ways. In this day and age, machines should be doing the grunt work that we seem to still be doing. To revive an ancient meme about whom to credit memorable quotes to: anonDo not write code. Write code that writes code/anon Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] The Python I would like to see - Armin Ronacher
On 18 August 2014 21:45, chandrakant kumar k.03chan...@gmail.com wrote: Python 3 has been a disappointment. I am bemused by absolutist comments like this. Could you explain how exactly it was a disappointment for you in day-to-day work? Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Mobile App Development using Python
On 4 August 2014 14:45, Saurabh Minni saurabh.mi...@gmail.com wrote: You should have a look at Kivy [http://kivy.org/] A lot of things are detailed in there. Seconded. Incidentally, one of the core Kivy developers is from Delhi, and frequents the Delhi/NCR Python group. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Pygtk
On 22 July 2014 21:27, Ankita Rath ankitarath2...@gmail.com wrote: Hi, I am using pygtk for GUI. We can import gtk module for this. But lot of places i have seen pygtk module along with gtk module. So can somebody tell me what is the use of this pygtk module. import pygtk import gtk we can do everything with gtk module only. So when is this pygtk module is useful. pygtk has pretty decent documentation, which you might want to read carefully: Please see the right-hand sidebar at http://www.pygtk.org/ From the tutorial: The variables and functions that are defined in the PyGTK module are named as gtk.*. So, you are very likely using functions from pygtk, even when they are named as gtk.XXX. If you are so inclined, you can look into the two modules to figure out what is defined where. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Did anybody try Mezzanine CMS?
Yes. ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Is there a way to find the import originator?
On 15 July 2014 15:25, Nitin Kumar nitin.n...@gmail.com wrote: Hi All, Say there are 3 files. a.py and b.py uses *import c* (which is the third python file c.py) is there a way we can know inside c.py that whether its a or b who is doing the importing? You can use the inspect module to get this information, e.g., see http://stackoverflow.com/questions/2654113/python-how-to-get-the-callers-method-name-in-the-called-method IMHO it is not good design for a module to depend on who is calling it. If you need that, pass a parameter to __init__ Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Django FTP
On 1 July 2014 12:58, Anand Reddy Pandikunta anand21na...@gmail.com wrote: Hi, In one Django App, I've created a simple form. It has URLField, where user enters FTP url. As soon as user submits the form, I have to download the file and save it our servers. File size: ~10gb. Need to download securely. Use ftplib to download the file. It is not completely clear what you mean by download securely, but ftplib will handle ftps. If you need sftp, i.e., ftp over SSH, use paramiko. You should also use an offline task processor like Celery, rather than trying to download a 10GB file in a web request. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Django using syncdb does not work
On 3 June 2014 08:48, Senthil skksun...@yahoo.co.in wrote: Hi All, I am in process of writing an application. While designing models, I have the database tables created first and tried using syncdb to create the models. When i try to access the models from view I get error. Upon searching in google, I found that only after designing models, the database is being created. Please try out the nice Django tutorial on the site. Learning how to use syncdb is a very basic step, and you need to be completely familiar with this process. Should I follow the second approach? Or is there a way i can create tables and sync them to create models and make them work successfully? Normally, with a framework like Django. one designs the system top-down; from user needs to models which the Django ORM translates to database tables for you. So, yes, that is the way to go. An exception is if one already has a database with tables, say from another site, or from Wordpress, Drupal, etc. In that case, one can use Django's inspectdb to create the initial models by examining the existing tables, i.e., the reverse of the normal process. While such auto-generated models are crude, they are fine as a base to start from. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Python script hangs after using logging module
On 26 May 2014 17:42, Rahul Gopan rahulpce...@gmail.com wrote: -Original Message- From: Rahul G ra...@visolve.com Sent: 26-05-2014 05:41 PM To: rahulpce...@gmail.com rahulpce...@gmail.com Subject: Python script hangs after using logging module Hello, I tried to make a log file in a python script. After adding the line below logging.basicConfig(filename='LOG_FILE.log', filemode='w', format='%(asctime)s %(message)s', level=logging.DEBUG) Now when I try to run a binary file using os.system or commands.getoutput, script simply hangs. Binary file is supposed to provide me the number of items available within two numbers in a particular branch Usage of that command : range branch Begin_number End_number Without using the above logging line, I could run this command. I used trace python -m trace --trace myscript.sh to see where exactly it hangs.Last few lines from the output of trace work of python is commands.py(58): import os commands.py(59): pipe = os.popen('{ ' + cmd + '; } 21', 'r') commands.py(60): text = pipe.read() I see no reason from the above that a logging statement like the above would cause the script to hang. Please show us your complete script. If it is tool long, use pastebin.com, and post the link here. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Tornado or twisted?
Hi, Why not consider gevent? Do not have enough real-life experience with it to comment on your capacity requirements, but those will also be a function of your application, and will need to be actually measured. Regards, Gora On May 5, 2014 11:48 AM, Mukesh Yadav mak@gmail.com wrote: Hey guys, I'm starting a new projects which requires real time update, something like tweetdeck. After initial research I have finalized twisted and tornado. But i'm confused which one to use. Requirement: 1. Should work flawlessly with Django. 2. Should be fast enough to handle around 10K concurrent users, on small instance (Server). 3. Should work on socket.io as I'm planning it use it. NOTE: I'm just a Newbie :P -- Regards Mukesh Yadav mukeshyadav.com ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] { exctract italic, bold }
On 12 March 2014 10:29, Shashidhar Paragonda shashidha...@gmail.com wrote: Hello Python hackers I have a excel file which has some amount of data. The data in each row has some words which are italic and bolded. my requirement is I need to extract only italic or bold words from each row. any suggestions on the same, thank you in advance. Try xlrd. This includes style information from the Excel file. We have used it to pick out underlined fonts, so I imagine that bold/italic should also be possible. Please check the documentation. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] class instance getting passed to other class obj creation
On 9 March 2014 16:37, Nitin Kumar nitin.n...@gmail.com wrote: Hi All, I am looking for some better way to implement below scenario. Say there is a class login class login: def __init_(self, user, pwd): - now user uses this class to login a session and then I am using the object of this class being passed to other class. So that other class can use this logged in session. lgn = login() scores(lgn) account(lgn) I am somehow not in favour of passing this object to different class. Is there a way such that once we have login object that is visible to other class. How does your login work? What does the class store in order to validate login? Nowadays, this is typically an authentication token obtained with OAuth2, or the like. So, you could pass lgn.token to other functions that need authenticated services, though that is not very different from passing lgn itself. What is your objection to passing the login class instance? Alternatively, all services needing authentication could be part of a single class, where login() is a class method or derived from a base class. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Managing variable in small scripts.
On 19 February 2014 15:37, Mukesh Yadav mak@gmail.com wrote: Hi, I normally create small scripts for crons, Sometime I do create multiple modules. My question is how to pass same variable to modules which is being used. e.g. script.py file contans following code *import module * *bucket* = 'some_bucket' object = module.*Class_name*('value'); object.*some_awesome_function*() I want bucket variable should be available in *some_awesome_function. * How to achieve above? Unless I am missing something, why can't you use: object.some_awesome_function( bucket ) It makes little sense to me to have a class import a variable from a script just to use it in a function. Also, as you are presumably writing these scripts after the class code has already been created, how would the class know where to import from? Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Managing variable in small scripts.
On 19 February 2014 16:21, Mukesh Yadav mak@gmail.com wrote: Unless I am missing something, why can't you use: object.some_awesome_function( bucket ) I can but in my case I have 5+ setting variables, which is not feasible to pass it for each method which it is using. Why not? If you really wanted, you could use a settings dict. Also, as you are presumably writing these scripts after the class code has already been created, how would the class know where to import from? I can change the class code and parameter as it is small script. I would think that this is terrible practice. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Managing variable in small scripts.
On 19 February 2014 17:01, Mukesh Yadav mak@gmail.com wrote: I can change the class code and parameter as it is small script. I would think that this is terrible practice. Would love to more about it. Passing multiple arguments to the function seems to be the cleanest approach, as it separates out variables in the class from those in a specific usage of it. Not only is this pretty standard in Python, reworking the class every time for a new script makes no sense to me. Whether the multiple arguments are passed as such, or as keyword arguments is a matter of design, and a bit of preference. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] JMS provider using RabbitMQ
On 31 December 2013 14:11, Chintan Dave davechin...@gmail.com wrote: Hi, I need to post messages on a JMS queue on a remote server. RabbitMQ is compliant to JMS v1.1 and I can use it, however I am not able to find any specific reference documentation for developing a JMS Producer using RabbitMQ. The one's available use AMQP Producer and Consumer. Any pointers would be helpful. Why exactly are you asking on a Python list? Having said that: http://lmgtfy.com/?q=jms+rabbitmq Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] JMS provider using RabbitMQ
On 31 December 2013 15:53, Chintan Dave davechin...@gmail.com wrote: RabbitMQ supports Python for messaging purpose. I thought people who might have some hands on experience may be able to help. [...] IMHO, that hardly makes it relevant, especially given that JMS is a JAVA API. Did you take a look at the links from the Google search: Some seemed helpful. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] JMS provider using RabbitMQ
On 31 December 2013 18:42, Chintan Dave davechin...@gmail.com wrote: [...] PS: I asked a question thinking there may be some wise people who may be able to help me in my research, however it seems - the culture here is to humiliate people. Even if the question was not relevant, delete was just a click away. People should realize that no one is stupid enough to ask questions without really doing basic research. [...] Sorry, did not mean to humiliate you, and I do not understand why you find that saying something is off-topic for the list is humiliating. Given the brevity of your original message, I both said it was off-topic, and sent you a link to search results. I am sorry, but far too often people ask here without doing basic research. In any case, if you were offended, I offer my apologies. I still disagree with your contention that since JMS clients can be written in Python, it is germane for the list. By that argument, almost anything would be permitted here. Nor do I buy the argument that delete was just a click away: So, are you OK with my posting spam? After all, delete is just a click away. Am going to stop following up on this thread, but IMHO there is a value to insisting that a list stay on-topic, especially a technical one. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] JMS provider using RabbitMQ
On 31 December 2013 19:22, Chintan Dave davechin...@gmail.com wrote: Hi Gora, I can understand your perspective. Lets leave this here based on individual beliefs. We don't necessarily need not agree to each other's point. All I am saying is - sending out lmgtfy links are the last things one should consider. Ah, OK, I get you. I view lmgtfy links as a bit of gentle fun, but can see how someone might see that as insulting. Sorry, will stop doing that. Saying its not relevant would have closed the thread. If you noticed - I responded urging the group to ignore my mail if found not relevant. I am also closing this thread here. Done, and thanks for a polite discussion. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Empty element in xml
On 4 November 2013 21:07, Amit Sethi amit.pureene...@gmail.com wrote: I ended up using method=html for writing the xml. tree.write(filename, encoding=utf-8, xml_declaration=True, method='html') I am not sure if there are going to be any problems with this but for the time being my nosetests seem to be working fine I would not do that at all. There are subtle differences between HTML and XML, e.g., HTML allows tags that are not explicitly closed with /tag. Try a sub-element with the img or input tag. In general, valid HTML is not necessarily valid XML, and vice versa. The bugs that such an assumption might exercise can be subtle and hard to catch. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] hello world
On 18 October 2013 22:23, Noufal Ibrahim nou...@nibrahim.net.in wrote: Aman Srivastava eamanshrivast...@gmail.com writes: Hi, I'm new to this list. Anybody working with sentimental analysis here ? I think you mean sentiment analysis[1]. I don't think many people are that emotionally attached to analytical work. I don't know about that: Sometimes I come to love the curves on my reports. More seriously, yes we have dabbled in sentiment analysis, as I am sure many other people on this list have. The interesting work in this area has moved beyond simple positive/negative analysis to a more nuanced evaluation. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] File upload to Server using FTP in Django?
On 24 September 2013 16:13, sameerkatti sameerka...@live.com wrote: Hello, I am trying to incorporate FTP using 'pyftplib' in Django. I tried searching in the forum for help. When i attach a file and click send, i do not get any error but the page is redirected to File Uploaded template. [...] Nobody is going to be able to figure out your issue unless you share some code. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] File upload to Server using FTP in Django?
On 24 September 2013 17:34, sameerkatti sameerka...@live.com wrote: Hi, I said i want to know the entire procedure. Code is not the issue. I wanted to know whether i am following the right procedure. Same issue there: You do not share nearly enough information for anyone to be able to help you. What procedure are you following? Just saying that you have some code in a Django view that is throwing an error, does not give anyone any clue. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] File upload to Server using FTP in Django?
On 24 September 2013 22:21, sameerkatti sameerka...@live.com wrote: I am using the Django Framework and i have written a small snippet in a function in views.py The same function is called in the urls.py . The code in the Views is /session = ftplib.FTP('abc.com','Username','Password') file = open('filename','rb') session.storbinary('STOR filename', file) file.close() session.quit()/ I am trying to upload a random file through the template, it throws a error as *'cannot concatenate 'str' and 'InMemoryUploadedFile' objects'* I'm very new to Django and Python. I am sorry, but trying to help you is like trying to extract teeth. Please provide sufficient details so that others without access to your system can guess what is going on. This code cannot possibly run, as there is a syntax error in the very first line. Besides that: * What is 'filename' on line 2? Does it exist? * Where is 'filename' derived from? * Where is the error thrown? I do not see anything in the above code which would cause that error, so my best guess is that you have not seen fit to show us the complete code. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Functional testing wih headless browser framework
On 17 September 2013 02:24, Amit Sethi amit.pureene...@gmail.com wrote: Hi , I am looking to add some functional testing to my application. I have seen a couple of tools via google search but the reason I am a little circumspect is that last time, I did something similar using selenium and it seemed lack some requirements of mine.(It was not exacty headless) [...] If you are already familiar with Selenium, that is what I would go with. You can run Selenium headless with X11 and Xvfb (the old school method that works just fine), or with PhantomJS and Webkit. Regards, Gora ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Agile methodology
On 27 August 2013 19:00, Rohit Chormale rohitchorm...@gmail.com wrote: Hi friends, Is anybody know a good resource about 'agile methodology'? This is off-topic for the list but have you tried searching Google. There is quite a bit of material on Agile available on the net that can be supplemented by a couple of good books. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Teradata python ODBC driver
On 4 June 2013 11:37, Divya divyani...@gmail.com wrote: Hello, I have to connect Python based script (Python2.6) to Teradata using ODBC driver on Linux. Can any one please suggest / help me to integrate. As has been mentioned before for similar requests, nobody is going to do your work for you. Have you even tried searching Google. Please tell us in more detail what the code needs to do, what your approach is, and ideally show us some code sample that you tried, tell us what did not work, and ask more specific questions. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Need help installing MySQLdb
On 24 May 2013 13:35, Praveen Kumar pravs3...@gmail.com wrote: Hi, I have to install MySQLdb module for python2.4 on a CentOS6 - 64bit system. I tried hard but I am not able to install it. Can you please help me, on installing MySQLdb module. You would be better off asking on a CentOS list. This is not really relevant here. Having said that, yum with the proper repos should work, except that I am not sure how well an old version of Python, 2.4, would be supported on CentOS 6. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Volunteer for Managing pycon India Website content
On 22 May 2013 14:51, vijay vnbang2...@yahoo.com wrote: Hi All, We need couple of people to take charge of PyCon India website. Tasks include tweaking the website software and manage the content. Code is on github. https://github.com/pythonindia/pyconindia2013 Please reply to this thread if you are interested. [...] We would be glad to get involved. From an initial look at the codebase, this looks like a static site, plus Hasgeek's funnel. Is that correct? Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Volunteer for Managing pycon India Website content
On 22 May 2013 19:29, vijay vnbang2...@yahoo.com wrote: Konark,mukesh,Gora,sayan and Rahul thanks for volunteering to help us. As Anand C said can you guys send a pull request to https://github.com/pythonindia/pyconindia2013 We basically to work in showing this information 1) Home section- Like venue , about us. 2) CFP section- Explain term and condition and display link to submit 3) Sponsor's section with 4 slot 1) platinum 2) gold 3) silver 4) partners 4) Twitter plugin 5) Keynote speaker section 6) Registration section 7) Blog/New section 8) FAQ section 9) Schedule - once Talk selection is done 10) Volunteer section to recognize volunteer for their support( my plan is to include this to motivate volunteer) Do let me know if any section is missed. CFP is been worked by Anand C and Ramki, so we can pick other section and work on the same. @Anand C please do provide us instruction on how to set up locally and guide us on how to contribute faster. [...] I presume that one just forks the repo, informs people what one is working on, and sends Anand a pull request once the work is done. I have a fundamental question. Since the above requirements have workflows like registration, and since the content will be expanding significantly, is there any interest in moving to a framework plus CMS? If so, my vote would be for Django + feincms. Also, are there timelines for the various tasks, or even a broad deadline? Finally, I presume that this discussion needs to move offline, or to a different mailing list. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Open Source API Management platforms in Python
On 13 May 2013 18:08, Sriram Karra karra@gmail.com wrote: Is there such a thing? I am looking for something along the lines of Mashery or Apiphany - roughly. I doubt that there would be a complete product like Mashery that is open source, but you could build one using Django and Tastypie. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Another qn. THanks for the basic of basic qn\
On 8 May 2013 23:00, Jagadeesh N. Malakannavar mnjagade...@gmail.com wrote: I prefer to do it like this a = list(str(3245325)) sum(map(int, a)) 24 What does the map() gain you over basic list comprehension: sum( [int(i) for i in '3245325'] ) ignoring any try/catch for int conversion errors IMHO, this is easier to understand, more Pythonic, and likely faster. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Another qn. THanks for the basic of basic qn\
On 9 May 2013 07:32, Noufal Ibrahim nou...@nibrahim.net.in wrote: Gora Mohanty g...@mimirtech.com writes: On 8 May 2013 23:00, Jagadeesh N. Malakannavar mnjagade...@gmail.com wrote: I prefer to do it like this a = list(str(3245325)) sum(map(int, a)) 24 What does the map() gain you over basic list comprehension: sum( [int(i) for i in '3245325'] ) You could drop the []. No need to first generate and then iterate over the list. Ah, yes! Forgot that the expression would act as a generator. Good catch! Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Basic of basic question
On 7 May 2013 07:19, Umesh Tiptur umeshreloa...@yahoo.com wrote: Hi, I am very new to programming in python. But I want to know is user hass inputted a number or a string Please help with this HOW to.. [...] * You can use type( var ) to find the type of a variable, var * Typically, one should not need to know the type of a variable * This is a very basic question that can be answered by a book or an online learning resource. Searching Google would find this, for example. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] uWSGI Spooler
On 2 May 2013 23:21, Venkatraman S venka...@gmail.com wrote: [I posted this in one more forum...but thought would share my enthusiasm here too...:) ] I have been playing around uWSGI (for a django app) for a few days now and We have switched to nginx + uWSGI for our Django projects, in preference to the more standard Apache + mod_wsgi. Yet to do real benchmarking, but initial results show a significant gain in performance. i must say that Spooler has been one of the best finds. I haven't done any benchmarking yet, but the ease of use is so darn good that I am extremely impressed. I was planning to use celery+redis, but this makes things so easy that i do not have to take care of anything else. I think this would work just fine for most of the websites/webapps that are not expecting a gazillion hits/tasks. I love simple but powerful constructs(another e.g Django's content-types), and Spooler was one such. [...] Haven't looked at the uWSGI spooler yet, as things that we need offline tasks for, such as mail, use Celery which is better supported by Django apps, e.g., django-celery-mail. uWSGI is interesting. Besides the base features, we will also be looking at its caching performance, auto-scaling, and asynchronous access. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] [Ncr-Python.in] [HELP] QUERIES RELATED TO PYTHON
On 21 April 2013 16:54, saurabh chandra fatboyslimchan...@gmail.com wrote: I am trying to develop an algorithm for a combinatorial optimization. The problem consists of a graph network with nodes and connected arcs. In this algorithm I have to choose an optimal combination of nodes out of all the nodes in the graph. The successive nodes are selected as entries in the list using a random search technique. Successive nodes share a precedence relationship. This description is not very clear, at least to me. What is an optimal combination in this case? Why does it make sense to use a random search? In each iteration of the algorithm I generate a combination of a subset of nodes chosen randomly from the whole node-set, as a list. In the same loop I carry out a modification of the generated list and calculate the objective value associated with this . A particular generated list in any loop will give rise to a single modified list. Now I do not want same list to be generated again and again, so I maintain a super-list of generated lists and check the membership of each new list in this super-list. I restart the loop if same list appears again in the algorithm. As I already said the original list gets modified within an iteration. The problem is that although I append the super-list with the original list before modification, as soon as I modify this original list the list added to the super-list also changes automatically. Thus the iteration goes on even if the same list is generated again and again. [...] Perhaps your best bet would be to show us some code, and describe which parts are not working as you expect them to. You might want to use pastebin.com for that. See if you can distil your code down to a small example that demonstrates the issue that you are facing. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Need help for python coding
On 20 April 2013 22:47, Kamalakar gs foxrun2...@gmail.com wrote: What i am asking is i have a file of other format for example .PCL which is Patran file (Software used for analysis). Now what i want is if user inputs a file name,python has to recognise the file name and directory of file which exists and executes the file in patran window. (a) Please do not start separate threads for the same question (b) You might wish to review how to use mailing lists to your advantage, and with the added benefit of preserving the sanity of people trying to respond to your messages. Here are some excellent pointers: - http://wiki.apache.org/solr/UsingMailingLists - https://code.djangoproject.com/wiki/UsingTheMailingList - http://catb.org/~esr/faqs/smart-questions.html I am not sure who on this list might have an idea of some random software that you are interested in. Please formulate this in a way relevant to this list. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] [HELP] QUERIES RELATED TO PYTHON
On 21 April 2013 00:31, hiharry danny hrd...@gmail.com wrote: I have Python 2.5.4 installed on windows platform ..(win xp) ...and in the installation folder there is a folder named Tcl(Tool Command Language) which contains subfolders like Tk, Tix etc ..the version of tcl is 8.4 .The default gui standard of python is through Tkinter module and when this module is used the calls are made to the Tcl embedded interpreter to execute the code. So, is it for this reason Tcl is embedded in python or for anything else ? If i haven't installed tcl separately, what are the ways to access Tcl interpreter other than using ELmer and Using Tkinter module ,Tcl interpreter can be invoked using Tkinter.Tcl(). Can wish or telsh be for such ? Not sure what you are asking here. import Tkinter a = Tkinter.Tcl() result = a.eval(' puts hello, world ') TclError: can not find channel named stdout But still it doesn't work, giving error why ? This works just fine for me on Linux with Python 2.7. Python 2.5 is quite old, and I would suspect some issue with your Python vs. Tk installation. And one more thing when i type dir('Tkinter') or any other module name to display it's contents , why does it always show the same thing every time which is as follows [...] What you want is dir(Tkinter). Please note the absence of single quotes. What you are getting now is the dictionary for string, since that's you asked for. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] I need some help/guidance
On 16 April 2013 12:17, Smrutilekha Swain smrutile...@gmail.com wrote: i am writing a program using PyQt4. i have created a table containg name of the instruments, locations, its latitudes, longitude and altitude. there may be two instruments and its locations are same but different latitude and longitude with mild difference. so now i want to sort the table by latitude or longitude whose have least difference... [...] What do you mean by a table? A database table, or a Python sequence? Abdul has already pointed out how to sort a list in Python. However, if you want any kind of scale, you will need a database that supports GIS operations, and a web GIS framework if you need a presence on the web. I would suggest GeoDjango with PostGIS. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Amazon and Django
On 16 April 2013 18:13, Ramdas S ram...@gmail.com wrote: On Tue, Apr 16, 2013 at 6:11 PM, Gora Mohanty g...@mimirtech.com wrote: On 16 April 2013 17:02, Ramdas S ram...@gmail.com wrote: Anyone running Django apps on amazon, I need to spec and figure out some costing. Please do let me know? http://ramdaz.wordpress.com This is maybe a little off-topic, but we do use Django extensively on AWS. Maybe contact me off-list? Absolutely, give me your contact details Please email me at this address. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] I need some help/guidance
On 17 April 2013 10:00, Smrutilekha Swain smrutile...@gmail.com wrote: It is a database table which i have created using QTableWidget n it contains 7 columns. first column is checkbox for selecting the rows den name, site, latitude, longitude, altitude and date of entry. [...] In that case, I would look into what facilities PyQt4 offers to access such database tables. I am not familiar with PyQt4. Alternatively, you can use standard Python DB access and run specific SQL, or use a ORM as a higher-level interface. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] [OT] Microsoft Office 365 for Education made mandatory for approved institutions by AICTE
On 15 April 2013 11:17, Balachandran Sivakumar benignb...@gmail.com wrote: Hi, On Mon, Apr 15, 2013 at 9:13 AM, Gora Mohanty g...@mimirtech.com wrote: On 15 April 2013 07:03, Balachandran Sivakumar benignb...@gmail.com wrote: Please do not indulge in such off-topic postings, no matter how important you feel that your message is. By the argument that your message is important enough that it should be seen by people everywhere, every mailing list becomes a catch-all for all content. As you seem to be well aware, there are lists dedicated to such topics: Please stick to them. I know there exists other lists elsewhere. I am not sure if one such list/group of people exists in Bangalore. If you know of any please point me. I am not going to argue with your response, but you misjudged. Thanks I am not sure of such an alternative list, but IMHO that still does not make it right to post off-topic on this list. Not sure what argument there is to be made about this: Just requesting you to refrain from such posts. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] [OT] Microsoft Office 365 for Education made mandatory for approved institutions by AICTE
On 15 April 2013 07:03, Balachandran Sivakumar benignb...@gmail.com wrote: Hi all, I understand that this is a Python group and not a free software group. But there are quite a few free software enthusiasts here, and they might already know/like to know the news. So, I apologise upfront, for posting this off-topic information. [...] Please do not indulge in such off-topic postings, no matter how important you feel that your message is. By the argument that your message is important enough that it should be seen by people everywhere, every mailing list becomes a catch-all for all content. As you seem to be well aware, there are lists dedicated to such topics: Please stick to them. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Need help for python coding
On 26 March 2013 23:41, Kamalakar gs foxrun2...@gmail.com wrote: Dear all, I am newbie to coding.I want extract the data from text file which contains text and tables.In a file i want to extract all VON MISES stress data from a table.i wrote a code as below. but i dont know how to extract the vonmises column data and dump it into text file. [...] It is difficult to help when you have not provided enough details. This should be quite easy, but please include a short sample of the data that you are trying to extract, explaining what you need to extract. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Female developer fired after tweeting about men's comments at PyCon 2013 and San Jose.
On 23 March 2013 14:49, Nitin Kumar nitin.n...@gmail.com wrote: Thought to share news eveen though it has very less to do with python. This happened at PyCon 2013. San Jose: A female developer was fired after tweeting about a group of men she said were making sexual comments at a computer programming co... http://ibnlive.in.com/news/female-developer-fired-after-tweeting-about-mens-sexual-comments/380690-11.html Please at least label such posts off-topic, or better yet refrain from posting them here. Just because it happened at Pycon does not make it relevant for the list. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Female developer fired after tweeting about men's comments at PyCon 2013 and San Jose.
On 23 March 2013 15:08, Jeffrey Jose jeffjosej...@gmail.com wrote: I disagree. I haven't read the article but it looks like it talks about very specific behavior in the python community which we are all part of. Maybe you would care to explain how this fits with the list's stated purpose of This group is for discussions related to the Python programming language. We welcome all kinds of discussions related to Python.? IMHO, this is a technically-oriented list, not a socially-oriented one. Plenty of other forums are available for discussing the kinds of things Nitin and you seem to want to. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] BangPypers Digest, Vol 67, Issue 8
On 15 March 2013 12:08, pavan intercon pavan.inter...@gmail.com wrote: people with experience are preffered . still resume can be shared , we can go ahead with a telephonic discussion. [...] When replying, please edit your Subject line so it is more specific than Re: Contents of BangPypers digest... [...] As Mailman so helpfully points out, please edit the Subject line, and remove non-relevant content, when replying to a digest post. Thanks. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Reading log file using seek and tell
On 8 March 2013 16:07, davidsnt david...@gmail.com wrote: Hello, How to read log files in python, On the first run I need to read all the lines from the log, process it and get the position of the last read line and from the next run I have to read from the last read line and process all the lines after it and similarly. Can you please help me with some examples? If you already know about seek and tell, Python file objects offer similar functionality. Please look up documentation on this. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Django url patterns help
On 1 March 2013 17:24, JAGANADH G jagana...@gmail.com wrote: Hi , I was trying to write a url pattern for URL like this /my_page/?btn=view_pagesel=Profile [...] The ?btn=view_pagesel=Profile is not part of the URL, but is a query string. The URL is simply /my_page Within the Django view, you can get the query string parameters with, e.g., request.GET.get( 'btn' ) Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Django url patterns help
On 1 March 2013 17:31, Bhimsen Kulkarni bhimsen@gmail.com wrote: your regex is r'^my_page/(?Pbtn.* but your search string ( /my_page/?btn=view_pagesel=Profile) begins with /. According to your regex, search string must begin with my_page. That is not the problem: url(r'^my_page/$'...) will match http://example.com/my_page . The issue is that in Django, urlpattern matches the path, and not the querystring. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] regarding installation of python
On 21 February 2013 13:43, Siva Ranganath workfors...@gmail.com wrote: hello BangPypers@python.org I have RedHat linux in my Laptop where iam accessing through VMware. how can install python librearies in Linux to execute some python scripts. please help me This is better suited to a Redhat forum, or RHEL support if you purchased that. It is also a very basic question about maintaining system packages, and you would do well to learn such things on your own. Been a while since I used RPM-based systems, but yum install python should do the trick. You will need to have set up network access on your VM. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Python related jobs for me
On 20 February 2013 12:54, L Radhakrishna Rao satishsaga...@gmail.com wrote: Hi guys and girls, I am software engineer and also an enthusiastic programmer. I have learned python on my own, though not knowledgeable as you people are. I have learned python purely out of my interest. Now i would like to get involved in some serious python development activities. Any suggestions? [...] This is a little off-topic, but nevertheless: * Learning something on a candidate's own initiative would be a big plus in our book when it comes to a hiring decision. * You should decide on a more specific area that you want to work in. One possibility is web development with Django, and Python, but you should pick an area that interests you. * If your experience in that area is not very extensive, consider finding a company/organisation that works in the area, and do an internship with them. * Another good way of gaining expertise, and getting noticed, is to find an open-source project in that area of work, and contributing to it. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] List compression imrpovement
On 9 January 2013 13:25, vijay vnbang2...@yahoo.com wrote: i want to use only list compression to get solution like the way you see i share solutions. Basically one line solution . Do you mean list comprehension? Even so, it is not clear how the resulting list is to be derived from the original. Rather than showing us solutions that already assume a particular way, could you describe the problem in words? Else, the most efficient way to achieve your expected result would be [[a[1], a[3]], [a[2]] + a[3:]] Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] List compression imrpovement
On 9 January 2013 13:11, vijay vnbang2...@yahoo.com wrote: Hi, I want to know if there is any other better way for improving below list compression. I have to use list compression only to achieve it. say i have list a=[1, 4, 9, 12, 15, 21] expected result (4, 12), (9, 12, 15, 21) It would help if you defined what you mean by list compression in this case. It is not immediately obvious what you are trying to achieve. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Question on Pattern Matching and Regular Expression
On 7 January 2013 15:06, davidsnt david...@gmail.com wrote: Bangpypers, Having a little trouble in parsing a file of 702 line appox, the file is in the format # # Title # [Space] [ Few lines of information about the title ] [Space] If the above format is strictly followed, this should do it, assuming you can read the entire file into a string (s in the example below. import re TITLE_RE = re.compile( r'#\n#([^\n]*)\n#\n \n\[([^\]]*)\]\n \n', re.MULTILINE|re.DOTALL ) for m in TITLE_RE.finditer( s.strip ): title, info = m.groups() print title, info Error handling, and reading chunks from a large file are left as an exercise for the reader. Also, if the file format is at all more complex, and maybe even in this case, I would write a parser rather than use regular expressions. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Unpacking Tuple
On 6 October 2012 15:39, Saju M sajup...@gmail.com wrote: Hi, I am using python 2.6. I need a way to make following code working without any ValueError . a, b, c, d = (1,2,3,4) a, b, c, d = (1,2,3). Note: Number of values in the tuple will change dynamically. Is the maximum length of the tuple fixed? If so, you can pad the tuple with blank variables to this maximum length, viz., NMAX = 4 UNKNOWN_VAL = '' t = (1, 2, 3) a, b, c, d = t + (NMAX - len(t)) * (UNKNOWN_VAL,) If the maximum length is not fixed, you should probably revisit your design. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] hook file download
On 7 September 2012 15:59, Nitin Kumar nitin.n...@gmail.com wrote: Say for example: from a site http://www.winzip.com/downwz.htm we click download button. So i file download will start. but I want to do some other activities before file start to download. so is there a way to pause start of download do some activity and then start the download using python. If I understand correctly, you are looking for background task processing, such as is provided by Celery: http://www.celeryproject.org/ Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Sad demise of our dear KG (Keneth Gonsalvas)
On 3 August 2012 15:25, JAGANADH G jagana...@gmail.com wrote: Hi All, Just now I got a message that our dear KG (Kenneth Gonsalvas) passed away. He was admitted in hospital due to Asthma attack and passed away today morning. Cremation will be held at ooty on 4th Aug 2012. Yikes! My condolences to all his near and dear ones. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Call for Python programmers interested in building social applications
On 1 August 2012 20:18, Deepak Garg deepakgarg.i...@gmail.com wrote: Diaspora is AGPL (version 3), some parts dual-licensed under MIT License http://en.wikipedia.org/wiki/Diaspora_(software) Erm, you are the second person to suggest that, but Diaspora is RoR. A better bet might be Pinax ( http://pinaxproject.com/ ) if one wants to stick to Python. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Call for Python programmers interested in building social applications
On 1 August 2012 23:27, Anand Chitipothu anandol...@gmail.com wrote: On Wed, Aug 1, 2012 at 10:08 PM, Gora Mohanty g...@mimirtech.com wrote: On 1 August 2012 20:18, Deepak Garg deepakgarg.i...@gmail.com wrote: Diaspora is AGPL (version 3), some parts dual-licensed under MIT License http://en.wikipedia.org/wiki/Diaspora_(software) Erm, you are the second person to suggest that, but Diaspora is RoR. A better bet might be Pinax ( http://pinaxproject.com/ ) if one wants to stick to Python. -1 I don't think we should be so religious about using Python. After all programming languages are tools to get job done. Er, I am not. But, there could well be a good reason for someone to want to do that in Python. Since they are asking on a Python group, a reasonable assumption is that they have done their homework and want a Python solution. Remember that Diaspora was developed by a bunch of very smart chaps over couple of years and it was able to raise $200K of funds on kickstarter. It would take equal amount of efforts (or even more) and resources to start building something from scratch again. Rejecting an already available opensource project, even before considering its merits, just because it is not written in your favorite programming language is not a good idea. Have not looked at Diaspora, and it could well be quite good. RoR is also perfectly fine for a RAD framework. I am not sure how it came across that I was rejecting Diaspora out of hand? Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Configuring web2py to run on apache with Centos5.8
Hi, While I am far from being an expert in setting up Apache, there seem to be several things wrong with your Apache config. 1. Your ServerName is wrong unless you have aliased it locally, or are hosting on example.com :-) 2. Your WSGIScriptAlias is at /wpy , but in some cases you are accessing / 3. The Order parameter for Directory /root/web2py/web2py should be Order Deny,Allow so as to match the rest of the steps: http://httpd.apache.org/docs/2.0/mod/mod_access.html#order 4. This is off-topic for the list :-) Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Job list (was: [JOB] Aspirae Bangalore)
On 3 July 2012 07:07, Anand Chitipothu anandol...@gmail.com wrote: On Tue, Jul 3, 2012 at 5:24 AM, Noufal Ibrahim nou...@nibrahim.net.in wrote: Having lots of job postings is a good sign of a healthy community. However, it does dilute the list a little. Sidu suggested a separate bangalore-python-jobs (or something similar) list. What's the general opinion? -1 One more list to signup. I don't think we are getting too many such emails. I don't see a problem. [...] Agreed with the above reasons. Also, I do like to get a sense of what jobs are available, as it also gives one an idea of what Python work is going on. As long as such postings are marked properly in the subject line, I see no issue with them. Most email clients will let one set up filters. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Two days course on Python
On 27 June 2012 10:08, kala Vinay kala...@gmail.com wrote: Dear All, credativ India specialized in open source, conducting a two days course on Python Programming on 13th and 14th July 2012. Interested candidates can contact: train...@credativ.in [...] Are these paid courses? If so, please mark such posts with a Commercial tag in the subject line, especially if you are going to be posting this many times. Thanks. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Sort names in a list by order of importance
On 24 April 2012 12:06, S Pratap Singh kdari...@gmail.com wrote: I need to sort list with names and without loosing the alphabet case (lower or upper). In each list last name is important and should get priority in sorting. If there are two or more name similar to the last name in the list. Then the last name should be printed first before another similar names. Also we need to sort the name based on the initials (sir name). If the name does not have initial then the first name should be considered as initial. There are no asterisks in the list mylist = [Alan,aLan,alAn,alaN,ALan,AlAn,AlaN,aLAn,aLaN,*alAN*] I just highlighted the last name in the list as this is very important name and it should be printed before any other similar name in the list. Please do not do that when you are presenting things as code, or at least say what you mean. Let me know if this makes sense to you. Not completely. How is your desired sort order of [ *alAN*, aLaN, aLAn, AlaN, AlAn, ALan, alaN, alAn, aLan, Alan ] defined? I cannot see a logic to the order. Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers