SNI support in python 2.7 for Locust load tests

2014-09-30 Thread Reddy
Hello,

At the beginning - welcome everyone, as this is my first post here. I'm not an 
active Python developer now, but I have general knowledge of the language. 

I'm trying to use locust (http://locust.io/) to run load test of one site we're 
developing. Everything was running nice and smooth until we switch the servers 
to use SNI. SNI is not officially supported in python 2.7.5 but Locust doesn't 
work on python3 as it uses gevent which AFAIK are supported for python2 only. I 
finally managed to run our scripts on local Ubuntu after upgrading python to 
2.7.8 from utopic repository but I can't replicate the same on target CentOS 
where the scripts are supposed to be executed. I tried compiling python from 
http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tar.xz, I even tried 
unpacking sources of Ubuntu python2.7 package (from 
http://se.archive.ubuntu.com/ubuntu/pool/main/p/python2.7/python2.7_2.7.8.orig.tar.gz),
 patching them with TLS1_1 and TLS1_2 support from  
https://bugs.python.org/file30761/python-2.7.5-tls1.1-and-tls1.2.patch) and 
still no luck. I do monkey patch in Locust startup file according to 
http://stackoverflow.com/a/19477363 (oth
 erwise it wouldn't work on Ubuntu as well) but still I get error stack as 
attached below. I also checked with pip list that all python packages have the 
same versions on both systems. Any idea what I'm missing on the target load 
test system which I have in Ubuntu? 

Regards,
Reddy

...
[2014-09-30 14:19:41,771] ip-x-x-x-x/ERROR/stderr: File 
"/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 503, in put
[2014-09-30 14:19:41,771] ip-x-x-x-x/ERROR/stderr: return self.request('PUT', 
url, data=data, **kwargs)
[2014-09-30 14:19:41,771] ip-x-x-x-x/ERROR/stderr: File 
"/usr/local/lib/python2.7/site-packages/locust/clients.py", line 111, in request
[2014-09-30 14:19:41,772] ip-x-x-x-x/ERROR/stderr: response = 
self._send_request_safe_mode(method, url, **kwargs)
[2014-09-30 14:19:41,772] ip-x-x-x-x/ERROR/stderr: File 
"/usr/local/lib/python2.7/site-packages/locust/clients.py", line 155, in 
_send_request_safe_mode
[2014-09-30 14:19:41,772] ip-x-x-x-x/ERROR/stderr: return 
requests.Session.request(self, method, url, **kwargs)
[2014-09-30 14:19:41,773] ip-x-x-x-x/ERROR/stderr: File 
"/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 451, in 
request
[2014-09-30 14:19:41,773] ip-x-x-x-x/ERROR/stderr: resp = self.send(prep, 
**send_kwargs)
[2014-09-30 14:19:41,773] ip-x-x-x-x/ERROR/stderr: File 
"/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 557, in send
[2014-09-30 14:19:41,774] ip-x-x-x-x/ERROR/stderr: r = adapter.send(request, 
**kwargs)
[2014-09-30 14:19:41,774] ip-x-x-x-x/ERROR/stderr: File 
"/usr/local/lib/python2.7/site-packages/requests/adapters.py", line 362, in send
[2014-09-30 14:19:41,775] ip-x-x-x-x/ERROR/stderr: timeout=timeout
[2014-09-30 14:19:41,775] ip-x-x-x-x/ERROR/stderr: File 
"/usr/local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py",
 line 516, in urlopen
[2014-09-30 14:19:41,775] ip-x-x-x-x/ERROR/stderr: body=body, headers=headers)
[2014-09-30 14:19:41,776] ip-x-x-x-x/ERROR/stderr: File 
"/usr/local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py",
 line 308, in _make_request
[2014-09-30 14:19:41,776] ip-x-x-x-x/ERROR/stderr: conn.request(method, url, 
**httplib_request_kw)
[2014-09-30 14:19:41,776] ip-x-x-x-x/ERROR/stderr: File 
"/usr/local/lib/python2.7/httplib.py", line 995, in request
[2014-09-30 14:19:41,777] ip-x-x-x-x/ERROR/stderr: self._send_request(method, 
url, body, headers)
[2014-09-30 14:19:41,777] ip-x-x-x-x/ERROR/stderr: File 
"/usr/local/lib/python2.7/httplib.py", line 1029, in _send_request
[2014-09-30 14:19:41,778] ip-x-x-x-x/ERROR/stderr: self.endheaders(body)
[2014-09-30 14:19:41,778] ip-x-x-x-x/ERROR/stderr: File 
"/usr/local/lib/python2.7/httplib.py", line 991, in endheaders
[2014-09-30 14:19:41,778] ip-x-x-x-x/ERROR/stderr: 
self._send_output(message_body)
[2014-09-30 14:19:41,779] ip-x-x-x-x/ERROR/stderr: File 
"/usr/local/lib/python2.7/httplib.py", line 848, in _send_output
[2014-09-30 14:19:41,779] ip-x-x-x-x/ERROR/stderr: self.send(message_body)
[2014-09-30 14:19:41,779] ip-x-x-x-x/ERROR/stderr: File 
"/usr/local/lib/python2.7/httplib.py", line 817, in send
[2014-09-30 14:19:41,780] ip-x-x-x-x/ERROR/stderr: self.sock.sendall(datablock)
[2014-09-30 14:19:41,792] ip-x-x-x-x/ERROR/stderr: File 
"/usr/local/lib/python2.7/site-packages/requests/packages/urllib3/contrib/pyopenssl.py",
 line 203, in sendall
[2014-09-30 14:19:41,793] ip-x-x-x-x/ERROR/stderr: return 
self.connection.sendall(data)
[2014-09-30 14:19:41,793] ip-x-x-x-x/ERROR/stderr: File 
"build/bdist.linux-x86_64/egg/OpenSSL/SSL.py", line 977, in sendall
[

Re: SNI support in python 2.7 for Locust load tests

2014-10-01 Thread Reddy
Hi,

> Reddy  writes:
> > ...
> > I'm trying to use locust (http://locust.io/) to run load test of one site 
> > we're developing. Everything was running nice and smooth until we switch 
> > the servers to use SNI. SNI is not officially supported in python 2.7.5

> you have two options:
> 
> Python 2.7.9 implements PEP 466 "Network Security Enhancements for
> Python 2.7.x" including TLS 1.1, 1.2 and SNI support. 2.7.9 will be
> released shortly. You could try the 2.7 branch from hg.python.org.
> 
> Use PyOpenSSL instead of Python's ssl module. It supports SNI, too.

> A recent post in this list regarding missing SNI support in Python 2.x
> got as a suggestion to use the "backports.ssl" package on PyPI.

Thanks Christian and Dieter for your prompt responses!
I tried yesterday with Python built from 
https://hg.python.org/cpython/archive/9b4673d7b046.tar.gz. I also do use 
pyOpenSSL as described at http://stackoverflow.com/a/19477363 so I used pip to 
install pyOpenSSL, ndg-httpsclient and pyasn1 as well as patched locust startup 
file with the following:

from urllib3.contrib import pyopenssl
pyopenssl.inject_into_urllib3()

I also tried adding the following:
from functools import partial
ssl.wrap_socket = partial(ssl.wrap_socket, ssl_version=ssl.PROTOCOL_TLSv1)

Finally, I've just tried with:
/usr/local/bin/pip2.7 install backports.ssl

and patching the lucust file with:

import backports.ssl as ssl
import backports.ssl.monkey as monkey
import requests
monkey.patch()

I've also added verify=False to my locust test scripts to disable certificate 
verification according to http://docs.locust.io/en/latest/api.html

...And I still get exactly the same error:

[2014-09-30 14:19:41,793] ip-x-x-x-x/ERROR/stderr: File 
"build/bdist.linux-x86_64/egg/OpenSSL/SSL.py", line 977, in sendall
[2014-09-30 14:19:41,793] ip-x-x-x-x/ERROR/stderr: File 
"build/bdist.linux-x86_64/egg/OpenSSL/SSL.py", line 849, in _raise_ssl_error
[2014-09-30 14:19:41,794] ip-x-x-x-x/ERROR/stderr: OpenSSL.SSL
[2014-09-30 14:19:41,794] ip-x-x-x-x/ERROR/stderr: .
[2014-09-30 14:19:41,794] ip-x-x-x-x/ERROR/stderr: WantWriteError

Now I'm starting to think it's something else than SNI, but all those scripts 
were working nice before and the only change done was turning on the SNI on 
tested servers... 

Any idea what my actually cause this WantWriteError?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: SNI support in python 2.7 for Locust load tests

2014-10-01 Thread Reddy
Hi,

> > Reddy  writes:
> > > ...
> > > I'm trying to use locust (http://locust.io/) to run load test of one site 
> > > we're developing. Everything was running nice and smooth until we switch 
> > > the servers to use SNI. SNI is not officially supported in python 2.7.5
> 
> > you have two options:
> > 
> > Python 2.7.9 implements PEP 466 "Network Security Enhancements for
> > Python 2.7.x" including TLS 1.1, 1.2 and SNI support. 2.7.9 will be
> > released shortly. You could try the 2.7 branch from hg.python.org.
> > 
> > Use PyOpenSSL instead of Python's ssl module. It supports SNI, too.
> 
> > A recent post in this list regarding missing SNI support in Python 2.x
> > got as a suggestion to use the "backports.ssl" package on PyPI.
> 
> Thanks Christian and Dieter for your prompt responses!
> I tried yesterday with Python built from 
> https://hg.python.org/cpython/archive/9b4673d7b046.tar.gz. I also do use 
> pyOpenSSL as described at http://stackoverflow.com/a/19477363 so I used pip 
> to install pyOpenSSL, ndg-httpsclient and pyasn1 as well as patched locust 
> startup file with the following:
> 
> from urllib3.contrib import pyopenssl
> pyopenssl.inject_into_urllib3()
> 
> I also tried adding the following:
> from functools import partial
> ssl.wrap_socket = partial(ssl.wrap_socket, ssl_version=ssl.PROTOCOL_TLSv1)
> 
> Finally, I've just tried with:
> /usr/local/bin/pip2.7 install backports.ssl
> 
> and patching the lucust file with:
> 
> import backports.ssl as ssl
> import backports.ssl.monkey as monkey
> import requests
> monkey.patch()
> 
> I've also added verify=False to my locust test scripts to disable certificate 
> verification according to http://docs.locust.io/en/latest/api.html
> 
> ...And I still get exactly the same error:
> 
> [2014-09-30 14:19:41,793] ip-x-x-x-x/ERROR/stderr: File 
> "build/bdist.linux-x86_64/egg/OpenSSL/SSL.py", line 977, in sendall
> [2014-09-30 14:19:41,793] ip-x-x-x-x/ERROR/stderr: File 
> "build/bdist.linux-x86_64/egg/OpenSSL/SSL.py", line 849, in _raise_ssl_error
> [2014-09-30 14:19:41,794] ip-x-x-x-x/ERROR/stderr: OpenSSL.SSL
> [2014-09-30 14:19:41,794] ip-x-x-x-x/ERROR/stderr: .
> [2014-09-30 14:19:41,794] ip-x-x-x-x/ERROR/stderr: WantWriteError
> 
> Now I'm starting to think it's something else than SNI, but all those scripts 
> were working nice before and the only change done was turning on the SNI on 
> tested servers... 
> 
> Any idea what my actually cause this WantWriteError?
> -- 

I think I have a clue what's wrong. By default using:
/usr/local/bin/pip2.7 install pyOpenSSL ndg-httpsclient pyasn1
gives me pyOpenSSL version 0.14. When I downgrade it to 0.13 with
/usr/local/bin/pip2.7 install pyOpenSSL==0.13
everything works nice and smooth. Interestingly, on my local Ubuntu I do have 
0.14 version of that package and it works well there...
I noticed that dowgrading it to 0.13 buids 'OpenSSL.crypto' extension and that 
does not happen when installing v. 0.14 so I guess there's simply a connection 
to openssl missing somehow there in 0.14. According to 
https://github.com/pyca/pyopenssl/releases there was a big change there:
"Second, pyOpenSSL is no longer implemented in C as a collection of extension 
modules using the Python/C API. Instead, pyOpenSSL is now a pure-Python project 
with a dependency on a new project, http://github.com/pyca/cryptography, which 
provides (among other things) a cffi-based interface to OpenSSL."
but I also have the most recent version of cryptography (0.6) installed there. 
And again - it works on local Ubuntu. Weird.

I guess I'll just stick to pyOpenSSL==0.13 for the time being, unless somebody 
gives me a hint what I'm doing wrong with 0.14 :)

Br,
Reddy

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: idiom for RE matching

2007-07-19 Thread Reddy

On 7/19/07, Gordon Airporte <[EMAIL PROTECTED]> wrote:


I have some code which relies on running each line of a file through a
large number of regexes which may or may not apply. For each pattern I
want to match I've been writing

gotit = mypattern.findall(line)




Try to use iterator function finditer instead of findall. To see the
difference run below code by calling findIter or findAll function one at a
time in for loop.  You can have achieve atleast 4x better performance.

---
import re
import time

m = re.compile(r'(\d+/\d+/\d+)')
line = "Today's date is 21/07/2007 then yesterday's  20/07/2007"

def findIter(line):
   m.finditer(line)
   glist = [x.group(0) for x in g]

def findAll(line):
   glist = m.findall(line)

start = time.time()
for i in xrange(100):
   #findIter(line)
   findAll(line)
end = time.time()

print end-start


-- 
http://mail.python.org/mailman/listinfo/python-list

This group contains information about IT Requirements in USA as well as Hotlist of Candidates from the participating members

2008-09-06 Thread reddy
This group contains information about IT Requirements in USA as well
as Hotlist of Candidates from the participating members



CLICK & REGISTER U GET MORE DEDAILS


   *
  *  http://homologie.blogspot.com/*
*   http://germanfriendfinder.com/go/g107-ppc *
  *  http://amigos.com/go/g106-pmem  *
 
--
http://mail.python.org/mailman/listinfo/python-list


Send Msg To Specific Tcp Client from Tcp Server Python

2016-08-10 Thread Anil reddy reddy M
I was written a simple tcp server in python, which is nicely communicating with 
multiple tcp clients. My Tcp Server can accept multiple clients at time, each 
client as a new thread. I want send message to specific tcp client after some 
time.
I can client Address from   connction, addr = socket.accept(), but i am not 
able send msg to client with client  IP.POrT. I would be thankfull for any help 
i get

  
   
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Send Msg To Specific Tcp Client from Tcp Server Python

2016-08-10 Thread Anil reddy reddy M
On Thursday, August 11, 2016 at 11:36:47 AM UTC+5:30, dieter wrote:
> Anil reddy reddy M  writes:
> 
> > I was written a simple tcp server in python, which is nicely communicating 
> > with multiple tcp clients. My Tcp Server can accept multiple clients at 
> > time, each client as a new thread. I want send message to specific tcp 
> > client after some time.
> > I can client Address from   connction, addr = socket.accept(), but i am not 
> > able send msg to client with client  IP.POrT. I would be thankfull for any 
> > help i get
> 
> TCP channels are bidirectional: you can send messages in both
> directions. Thus, writing to the server's socket (for a specific client)
> sends the written data to the client.

Hi,
Thanks for your reply, But how can i find client socketfd when i want send 
message to specific client.I can store connected client ip, port in database. 
how can use that ip, port when i want send.

  Sincerely
   Anil,
-- 
https://mail.python.org/mailman/listinfo/python-list


Python Magazine

2013-05-24 Thread DRJ Reddy
Planning to start a python online chronicle.What you want to see in it. :)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Magazine

2013-05-24 Thread DRJ Reddy

> Issue 1:

> "Whitespace as syntax: mistake or magic?"
Thanks Roy :)

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Magazine

2013-05-24 Thread DRJ Reddy
On Saturday, May 25, 2013 9:08:28 AM UTC+5:30, zipher wrote:
> I always liked the daily Python-URL from Dr. Dobbs.
 
> quote of the week

Thanks zipher we have already planned to continue Python-URL and quote of the 
week.
We will plan for other things that you have mentioned.
Thanks again :)

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Magazine

2013-05-24 Thread DRJ Reddy
On Saturday, May 25, 2013 9:13:56 AM UTC+5:30, Carlos Nepomuceno wrote:
> In-depth articles about Python! Like security analisys of modules, packages, 
> frameworks, everything Python related.
> 
> Performance benchmarks. How a Python technology/solution compares to other 
> competitor technologies.
> 
> Python competitions/contests/challenges!

Thankyou for your suggestions. :)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Magazine

2013-05-24 Thread DRJ Reddy
This is what i love with python community faster responses. :)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Magazine

2013-05-31 Thread DRJ Reddy
Hello all,
Was busy with work. Finally finished the job of registering the domain name.
Will be live soon. The url is http://pythonmagazine.org. Hope we will be live 
soon.
Regards,
DRJ.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Magazine

2013-06-05 Thread DRJ Reddy
On Saturday, June 1, 2013 1:45:06 PM UTC+5:30, Carlos Nepomuceno wrote:

> Nice! Wish you luck!
> 
> Do you have sponsors? Advertisers? What's the plan?
Thanks Carlos,
Right now we haven't engaged with sponsors or advertisers. Thinking whether 
to have a community magazine or go with the same way as previous ones some sort 
of commercialization.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Magazine

2013-06-05 Thread DRJ Reddy

> Do you have other magazines? Which ones? How are you going to supply contents?

We don't have other magazines. I was referring to old python magazines which 
terminated now. Portable documents(PDF , EPUB or MOBI) for now is being planned.
Regards,
DRJ.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Magazine

2013-06-05 Thread DRJ Reddy
> The real problem is the ongoing supply of content. If you can publish
> 
> on a regular schedule (weekly?) with interesting content, you'll have
> 
> a highly successful magazine... but if you have to provide all that
> 
> content yourself, you'll burn out. Try to line up a couple of backup
> 
> writers or columnists to help out - and no, I'm not offering, I have
> 
> way too much happening already :) Though the number of words I've
> 
> typed into python-list today would probably be enough for a month's
> 
> worth of newsletters...
> 
> 
> 
> Let's have more of these threads that are actually Python-related!
> 
> 
> 
> ChrisA

Dear ChrisA,
Currently we are a team of three. We are planning to have contect 
categorized into topics like
☺ Some application made of python(command line program or a GUI program) that 
we make using a python module(planning to cover as many modules as possible) 
ie; of included batteries of python.
☺ Python in Security ie; Some scripts that we can write in python like a 
dictionary attack tool
☺ One for covering Tkinter.
☺ One small Game using python.
☺ Python Facts,Python Quotes, Python PersonalitY (a python personnel bio or an 
interview), Python video(about a python video from Python Conferences)
☺ Python articles Guest as well as our own.
☺ Python Tutorials.
☺ Python Place( A place where python is being used for production).
☺ If we are not overloading magazine we would also cover about Python tools 
like say Ninja-IDE(an IDE for Python extensively written in Python).
After a few days we are planning to cover
☺ Python in cloud.(Open Stack)
☺ Network Programming.(probably Twisted framework)
☺ Database programming with SQLite.
☺ Python Puzzles(some programming Questions).
☺ Python Webframework probably Django.
We welcome further suggestions from the community.
Regards,
DRJ and Team.
-- 
http://mail.python.org/mailman/listinfo/python-list


Contents of python magazine

2013-06-07 Thread DRJ Reddy
Hello pythonistas,
☺ Some application made of python(command line program or a GUI program) that 
we make using a python module(planning to cover as many modules as possible) 
ie; of included batteries of python.
☺ Python in Security ie; Some scripts that we can write in python like a 
dictionary attack tool
☺ One for covering Tkinter.
☺ One small Game using python.
☺ Python Facts,Python Quotes, Python PersonalitY (a python personnel bio or an 
interview), Python video(about a python video from Python Conferences)
☺ Python articles Guest as well as our own.
☺ Python Tutorials.
☺ Python Place( A place where python is being used for production).
☺ If we are not overloading magazine we would also cover about Python tools 
like say Ninja-IDE(an IDE for Python extensively written in Python).
After a few days we are planning to cover
☺ Python in cloud.(Open Stack)
☺ Network Programming.(probably Twisted framework)
☺ Database programming with SQLite.
☺ Python Puzzles(some programming Questions).
☺ Python Webframework probably Django.
We welcome further suggestions from the community.
Regards, 
DRJ and Team.
-- 
http://mail.python.org/mailman/listinfo/python-list


we want python software

2017-12-05 Thread Jyothiswaroop Reddy
Sir,
I am b.tech student I would like to learn python. So please send the 
python software.
Thanking you sir.

Sent from Mail for Windows 10

-- 
https://mail.python.org/mailman/listinfo/python-list


System error while Installing Python 3.7.4 (64 bit).

2019-10-22 Thread svenkatabhargava reddy
Hi Team Python,

Getting system error while trying to install python 3.7.4 version, also
attaching the screen shot of error along with the message. Hoping team will
come back soon with the solution.
[image: image.png]


Thanks and Regards,
S.V.Bhargava Reddy.
-- 
https://mail.python.org/mailman/listinfo/python-list


error in running python

2020-03-31 Thread Santosh Reddy
i installed python and when i open the app, i get this

the code execution cannot proceed because python38.dll was not found.
reinstalling the proram may fix this problem.

please help me in this one.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pymem.h In function '__declspec'

2005-03-08 Thread Cathy Reddy
Thank you very much with your suggestion. I installed the python intepreter from SUSE CD but downloaded the sources of python from the python website. It seems like it created the mismatches here. After I installed the python source rpm from SUSE CD, I was able to pass where I had errors. Jeff Epler <[EMAIL PROTECTED]> wrote:
What does this command print?gcc -c -I/usr/Python-2.3.3/Include -x c -o /dev/null \/usr/Python-2.3.3/Include/pymem.hIf it prints an error like the one you included in this message, thenthe set of header files in /usr/Python-2.3.3/Include is damaged,incomplete, or wrong for your compiler environment. If the files in/usr/Python-2.3.3 are from SUSE, then contact your vendor.If it doesn't give an error, but the build of your "application RPM"does, then investigate the compiler defines that are present in theapplication that aren't on the above commandline. For instance, I wasable to get errors like yours by using inappropriate compileroptions:$ gcc -DPy_ENABLE_SHARED -DHAVE_DECLSPEC_DLL -c -x c -o /dev/null \/usr/include/python2.3/Python.hIn file included from /usr/include/python2.3/Python.h:67:/usr/include/python2.3!
 /pymem.h:
 In function `__declspec':/usr/include/python2.3/pymem.h:51: error: syntax error before "__declspec"You're right that __declspec has something to do with Windows DLLs.Normally, Python uses the macro 'PyAPI_FUNC' to declare all functions inits header files. For certain compilers (msvc, cygwin, mingw) it'sappropriate to use the __declspec extension to make the Python sharedlibrary work properly. For other compilers, PyAPI_FUNC doesn't doanything special. It's through the presence of absence of defines likePy_ENABLE_SHARED and HAVE_DECLSPEC_DLL that Python decides how to definePyAPI_FUNC, and this little detail is usually below the radar.Jeff
		Celebrate Yahoo!'s 10th Birthday!  
Yahoo! Netrospective: 100 Moments of the Web -- 
http://mail.python.org/mailman/listinfo/python-list

[no subject]

2016-03-11 Thread Swetha Reddy
Hi, i just downloaded the python software. when i search for it in my
downloads, a folder called python 3.5.1 ( 32 bit ) Setup is seen. But when
i try to open it, it has only three options : Modify, Repair and uninstall.
there are no other files of python in my computer except this. Where can i
get the python IDE if thats what its called, the place where you get to
type and code and create programs? please reply to thins.
-- 
https://mail.python.org/mailman/listinfo/python-list


GAPI -- Sharing a post to Social Networking Pages from my App

2016-03-21 Thread Karthik Reddy
Hi Experts,

I am trying to post on facebook and google plus  page  from my application. I 
am using facebook-sdk an d I am able to post using local machine but I am not 
able to post from dev server.

Can Anyone Please help me on this.


Thanks,
Karthik

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: GAPI -- Sharing a post to Social Networking Pages from my App

2016-03-22 Thread Karthik Reddy
On Tuesday, March 22, 2016 at 9:54:53 AM UTC+5:30, Mark Lawrence wrote:
> On 22/03/2016 04:14, Karthik Reddy wrote:
> > Hi Experts,
> >
> > I am trying to post on facebook and google plus  page  from my application. 
> > I am using facebook-sdk an d I am able to post using local machine but I am 
> > not able to post from dev server.
> >
> > Can Anyone Please help me on this.
> >
> > Thanks,
> > Karthik
> >
> 
> Please state your OS and Python version, the code that you've tried and 
> exactly what went wrong, including the full traceback if there is one.
> 
> -- 
> My fellow Pythonistas, ask not what our language can do for you, ask
> what you can do for our language.
> 
> Mark Lawrence

Hi Lawrence Thank you for your quick reply  .I am using Ubuntu 14.04 and python 
2.7.6 version.


In Template I have written


publish


{% block google_script %}

window.___gcfg = {
lang: 'en',
parsetags: 'onload',
isSignedOut: true
};

// var sour =  document.getElementById("1");
// // console.log(sour)
// var idd=document.getElementById("1").id;
// console.log(idd)
function(){ window.open = $("#sharePost").click(); };


https://apis.google.com/js/platform.js"</a>; async defer>
{% endblock %}

{% block share %}


  var options = {
contenturl: '<a  rel="nofollow" href="http://localhost:8000">http://localhost:8000</a>',
clientid: 'X.apps.googleusercontent.com',
cookiepolicy: 'single_host_origin',
prefilltext: 'New project is added',
calltoactionurl : '<a  rel="nofollow" href="https://plus.google.com/u/0/112729364286841783635/posts">https://plus.google.com/u/0/112729364286841783635/posts</a>' 
   
  };
  // Call the render method when appropriate within your app to display
  // the button.
  gapi.interactivepost.render('sharePost', options);
  console.log(new Error().stack);

{% endblock %}

{% block google_style %}

iframe[src^="<a  rel="nofollow" href="https://apis.google.com/u/0/_/widget/oauthflow/toast"">https://apis.google.com/u/0/_/widget/oauthflow/toast"</a>;] {
display: none;
}

{% endblock %}


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: GAPI -- Sharing a post to Social Networking Pages from my App

2016-03-22 Thread Karthik Reddy
On Tuesday, March 22, 2016 at 9:54:53 AM UTC+5:30, Mark Lawrence wrote:
> On 22/03/2016 04:14, Karthik Reddy wrote:
> > Hi Experts,
> >
> > I am trying to post on facebook and google plus  page  from my application. 
> > I am using facebook-sdk an d I am able to post using local machine but I am 
> > not able to post from dev server.
> >
> > Can Anyone Please help me on this.
> >
> > Thanks,
> > Karthik
> >
> 
> Please state your OS and Python version, the code that you've tried and 
> exactly what went wrong, including the full traceback if there is one.
> 
> -- 
> My fellow Pythonistas, ask not what our language can do for you, ask
> what you can do for our language.
> 
> Mark Lawrence

The error I am getting is "Uncaught ReferenceError: gapi is not defined"
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: GAPI -- Sharing a post to Social Networking Pages from my App

2016-03-22 Thread Karthik Reddy
On Tuesday, March 22, 2016 at 4:48:37 PM UTC+5:30, Steven D'Aprano wrote:
> On Tue, 22 Mar 2016 09:37 pm, Karthik Reddy wrote:
> 
> > The error I am getting is "Uncaught ReferenceError: gapi is not defined"
> 
> 
> Have you tried googling for it? That's a Javascript error:
> 
> https://duckduckgo.com/html/?q=uncaught+reference+error+gapi+is+not+defined
> 
> 
> 
> -- 
> Steven
Yup I googled it I am not getting where I need to modify
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: GAPI -- Sharing a post to Social Networking Pages from my App

2016-03-22 Thread Karthik Reddy
On Tuesday, March 22, 2016 at 4:55:40 PM UTC+5:30, Karthik Reddy wrote:
> On Tuesday, March 22, 2016 at 4:48:37 PM UTC+5:30, Steven D'Aprano wrote:
> > On Tue, 22 Mar 2016 09:37 pm, Karthik Reddy wrote:
> > 
> > > The error I am getting is "Uncaught ReferenceError: gapi is not defined"
> > 
> > 
> > Have you tried googling for it? That's a Javascript error:
> > 
> > https://duckduckgo.com/html/?q=uncaught+reference+error+gapi+is+not+defined
> > 
> > 
> > 
> > -- 
> > Steven
> Yup I googled it I am not getting where I need to modify

Is my approach is correct or if not Is there any other approach 

Please help me with this.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: GAPI -- Sharing a post to Social Networking Pages from my App

2016-03-22 Thread Karthik Reddy
On Tuesday, March 22, 2016 at 4:48:37 PM UTC+5:30, Steven D'Aprano wrote:
> On Tue, 22 Mar 2016 09:37 pm, Karthik Reddy wrote:
> 
> > The error I am getting is "Uncaught ReferenceError: gapi is not defined"
> 
> 
> Have you tried googling for it? That's a Javascript error:
> 
> https://duckduckgo.com/html/?q=uncaught+reference+error+gapi+is+not+defined
> 
> 
> 
> -- 
> Steven

Hi I resolved the error but I am not able to post my post .
I tried 
https://developers.google.com/+/domains/authentication/#authorizing_requests_with_oauth_20

I am getting the below error When i copied the url.

Error: invalid_client

The OAuth client was not found.

Even i gave Client_id correctly

Thanks,
Karthik 

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: GAPI -- Sharing a post to Social Networking Pages from my App

2016-03-22 Thread Karthik Reddy
On Wednesday, March 23, 2016 at 9:43:21 AM UTC+5:30, Karthik Reddy wrote:
> On Tuesday, March 22, 2016 at 4:48:37 PM UTC+5:30, Steven D'Aprano wrote:
> > On Tue, 22 Mar 2016 09:37 pm, Karthik Reddy wrote:
> > 
> > > The error I am getting is "Uncaught ReferenceError: gapi is not defined"
> > 
> > 
> > Have you tried googling for it? That's a Javascript error:
> > 
> > https://duckduckgo.com/html/?q=uncaught+reference+error+gapi+is+not+defined
> > 
> > 
> > 
> > -- 
> > Steven
> 
> Hi I resolved the error but I am not able to post my post .
> I tried 
> https://developers.google.com/+/domains/authentication/#authorizing_requests_with_oauth_20
> 
> I am getting the below error When i copied the url.
> 
> Error: invalid_client
> 
> The OAuth client was not found.
> 
> Even i gave Client_id correctly
> 
> Thanks,
> Karthik
Hi Steven I resolved this error also Now I am getting a pop up for google 
sharing but If click on share button its not sharing.Any help please
-- 
https://mail.python.org/mailman/listinfo/python-list


Beginner

2014-11-19 Thread Karthik Reddy
Hi all 

I am python beginner I am trying the below code and getting incorrect syntax in 
python (3.3.2)

number = 23
running = True
while running:
guess = int(raw_input('Enter an integer : '))
if guess == number:
print ("Congratulations, you guessed it.")
running = False # this causes the while loop to stop
elif guess < number:
print ("No, it is a little higher than that.")
else:
print ("No, it is a little lower than that.")
else:
print ("The while loop is over.")
# Do anything else you want to do here
print ("Done")

Please help me with this 

Thank you in advance
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Beginner

2014-11-20 Thread Karthik Reddy
Now Its working 

Thanks a lot Steven
-- 
https://mail.python.org/mailman/listinfo/python-list


python

2014-02-24 Thread Karthik Reddy
I worked as a weblogic administrator and now i am changing to development and i 
am very much interested in python . please suggest me what are the 
things i need to learn more  rather than python to get an I.T job. I came to 
know about  Django but i am in a confusion please help me .
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: python

2014-02-25 Thread Karthik Reddy
Thank you,

but from by reaserch i got these requirements ..

Python, django, Twisted, MySQL, PyQt, PySide, xPython.

 *Technical proficiency with Python and Django.
 *Technical proficiency in JavaScript.
 *Experience with MySQL / PgSQL.
 *Unix/Linux expertise.
 *Experience with MVC design patterns and solid algorithm skills.

Core Python, DJango Framework, Web2Py, Google App engine, CherryPy ( Basic 
Introduction)

The problem for me is whether i have to learn all these technologies to work as 
a python developer..



  
On Tuesday, February 25, 2014 12:58:15 AM UTC+5:30, CM wrote:
> On Monday, February 24, 2014 3:31:11 AM UTC-5, Karthik Reddy wrote:
> 
> > I worked as a weblogic administrator and now i am changing to development 
> > and i am very much interested in python . please suggest me what 
> > are the things i need to learn more  rather than python to get an I.T job. 
> > I came to know about  Django but i am in a confusion please help me 
> > .
> 
> 
> 
> I recommend you look at job advertisements in areas you'd like to work (both
> 
> areas of the world and areas within IT) and see what they seem to want.
> 
> 
> 
> Also, consider more informative subject lines to future posts.  :D
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: python

2014-02-26 Thread Karthik Reddy
On Monday, February 24, 2014 2:01:11 PM UTC+5:30, Karthik Reddy wrote:
> I worked as a weblogic administrator and now i am changing to development and 
> i am very much interested in python . please suggest me what are the 
> things i need to learn more  rather than python to get an I.T job. I came to 
> know about  Django but i am in a confusion please help me .


Thank you for guidance 

-- 
https://mail.python.org/mailman/listinfo/python-list


Hi Guys... Reading XML using Jython code

2014-10-09 Thread Venugopal Reddy
Am new to python and Jython...

Kindly help me on My issue please !

My Issue is:

XML parsing using Jython..

I am sucessfully reading XML file using xml.etree.ElementTree package .. 
But I have a issue in below scenario . this scenario my code is not working.

In my XML file , One main node is there and Multiple child tags are there. But 
In Child tags , same name repeated twice (like  tag repeated twice)

This scenario , this package can not read .. 

How can I read very first come tag (means it should read first come  
node value only .leave the second come  node value)


Please help me on this
-- 
https://mail.python.org/mailman/listinfo/python-list


Jython or Pyton issue-- Kindly Help me....

2014-10-13 Thread Venugopal Reddy
Dear All,

How to write a program for reading or parsing the XML file in Sub root Wise.

For ex:

Below XMl, I want to read/ parse first country details and here also two year 
tag values are there.. Here I need to read/parse first year value only measn 
'2008' Only..After that I need to read second country details.

Please help me .. i am struggling to get this solution..




1
2008
2009>
141100




4
2011
59900



68
2011
13600



 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Jython or Pyton issue-- Kindly Help me....

2014-10-14 Thread Venugopal Reddy
Ok, I will explain my problem in details :

I have below XML:

 
 
 
1 
2008 
2009> 
141100 
 
 
 
 
4 
2011 
59900 
 
 
 
68 
2011 
13600 
 
 
 
 


>From I want output below format:

CountrynameRankYeargdppc 
Liechtenstein   1  2008141100 
Singapore   4  201159900 
Panama  68 201113600

Please help how to do it..


On Monday, October 13, 2014 9:14:27 PM UTC+5:30, Ian wrote:
> On Mon, Oct 13, 2014 at 5:39 AM, Venugopal Reddy
> 
>  wrote:
> 
> > Dear All,
> 
> >
> 
> > How to write a program for reading or parsing the XML file in Sub root Wise.
> 
> 
> 
> I don't know what "Sub root Wise" is. You can find an overview of
> 
> Python's XML parsing interfaces at
> 
> https://docs.python.org/2/library/xml.html. I would recommend using
> 
> the ElementTree API unless you have a specific reason to use something
> 
> else.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Jython or Pyton issue-- Kindly Help me....

2014-10-14 Thread Venugopal Reddy
Actuvally am having below XML File:


http://schemas.xmlsoap.org/soap/envelope/";>



13001
2014
12
178   
W78
41859
0
B


181
LIGHT TRUCK WHEELBASES  
  
P
AA5


15615
AA5K8
178 /4521MM 
WHEELBASE 
false

false



181
LIGHT TRUCK WHEELBASES  
  
P
AA5


15615
AA5K8_second 
time
178 /4521MM 
WHEELBASE 
false

false



13001
2014
12
190   
W90
41860
0
B


181
LIGHT TRUCK WHEELBASES  
  
P
AA5


15616
AA5MA
190 /4826MM 
WHEELBASE 
false

false







My expected Output is:


WersCode
AA5K8
AA5MA

== For this I have used below Code:

mport glob   
import xml.etree.ElementTree as ET

Fatfile = open('#Var_SOE_VLIS_Response_Output\\Sales_to_Wers_Code2.txt', 'a')
try:
   tree = ET.parse('#Var_ENG_Response_Files\\SoapResponse1.xml')
   Fatfile.write('')
   WersCodeList = 
tree.findall('./{urn:ford/VehicleOrder/LegacyFeatureMapping/v2.0}PortInstalledOptionFeature')
   Fatfile.write('\n')
  # x = len(WersCodeList)
  # Fatfile.write(x)
   Fatfile.write('\n333')
   for WersCode in WersCodeList :
 Fatfile.write('\n444')
 WersCode = 
WersCode.find('.//{urn:ford/VehicleOrder/LegacyFeatureMapping/v2.0}WersCode')
 Fatfile.write('\n')
 Fatfile.write(WersCode.text)
except :
Fatfile.write(' \nsorry') 
Fatfile.write(' \nSuccess') 



But I could not able to get the WersCode List using Findall.

Please please please help on this .. am struggling sice one week sir...





On Tuesday, October 14, 2014 4:14:19 PM UTC+5:30, Peter Otten wrote:
> Venugopal Reddy wrote:
> 
> 
> 
> > Ok, I will explain my problem in details :
> 
> > 
> 
> > I have below XML:
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 1
> 
> > 2008
> 
> > 2009>
> 
> > 141100
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 4
> 
> > 2011
> 
> > 59900
> 
> > 
> 
> > 
> 
> > 
> 
> > 68
> 
> > 2011
> 
> > 13600
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > From I want output below format:
> 
> > 
> 
> > CountrynameRankYeargdppc
> 
> > Liechtenstein   1  2008141100
> 
> > Singapore   4  201159900
> 
>

Re: Jython or Pyton issue-- Kindly Help me....

2014-10-15 Thread Venugopal Reddy
Thanks for Help Sir,

Am using " for feature in tree.findall( 

".//{urn:ford/interface/VehicleOrder/LegacyFeatureMapping/v2}PortInstalledOptionFeature"):
 ) "

Please sir help me

Here  also  this findall Method is not return any list values.


On Wednesday, October 15, 2014 1:03:00 PM UTC+5:30, Peter Otten wrote:
> Venugopal Reddy wrote:
> 
> 
> 
> > Actuvally am having below XML File:
> 
> > 
> 
> > 
> 
> >  
> > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";> 
> 
> >  
> > xmlns:a="urn:ford/VehicleOrder/LegacyFeatureMapping/v2.0"
> 
> > xmlns:b="urn:ford/VehicleOrder/SingleOrderEdit/v1.0"
> 
> > xmlns:c="urn:ford/interface/VehicleOrder/LegacyFeatureMapping/v2">
> 
> >  13001
> 
> > 2014 12
> 
> > 178   
> 
> > W78
> 
> > 41859
> 
> > 0
> 
> > B
> 
> > 
> 
> > 
> 
> > 181
> 
> > LIGHT TRUCK WHEELBASES
> 
> > P
> 
> > AA5
> 
> > 
> 
> > 15615
> 
> > AA5K8
> 
> > 178 /4521MM WHEELBASE 
> 
> > false
> 
> > false
> 
> > 
> 
> > 
> 
> > 
> 
> > 181
> 
> > LIGHT TRUCK WHEELBASES
> 
> > P
> 
> > AA5
> 
> > 
> 
> > 15615
> 
> > AA5K8_second time
> 
> > 178 /4521MM WHEELBASE 
> 
> > false
> 
> > false
> 
> > 
> 
> > 
> 
> > 
> 
> > 13001
> 
> > 2014
> 
> > 12
> 
> > 190   
> 
> > W90
> 
> > 41860
> 
> > 0
> 
> > B
> 
> > 
> 
> > 
> 
> > 181
> 
> > LIGHT TRUCK WHEELBASES
> 
> > P
> 
> > AA5
> 
> > 
> 
> > 15616
> 
> > AA5MA
> 
> > 190 /4826MM WHEELBASE 
> 
> > false
> 
> > false
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > My expected Output is:
> 
> > 
> 
> > 
> 
> > WersCode
> 
> > AA5K8
> 
> > AA5MA
> 
> > 
> 
> > == For this I have used below Code:
> 
> > 
> 
> > mport glob
> 
> > import xml.etree.ElementTree as ET
> 
> > 
> 
> > Fatfile = open('#Var_SOE_VLIS_Response_Output\\Sales_to_Wers_Code2.txt',
> 
> > 'a') try:
> 
> >tree = ET.parse('#Var_ENG_Response_Files\\SoapResponse1.xml')
> 
> >Fatfile.write('')
> 
> >WersCodeList =
> 
> >
> 
> tree.findall('./{urn:ford/VehicleOrder/LegacyFeatureMapping/v2.0}PortInstalledOptionFeature')
> 
> >Fatfile.write('\n')
> 
> >   # x = len(WersCodeList)
> 
> >   # Fatfile.write(x)
> 
> >Fatfile.write('\n333')
> 
> >for WersCode in WersCodeList :
> 
> >  Fatfile.write('\n444')
> 
> >  WersCode =
> 
> >  
> 
> WersCode.find('.//{urn:ford/VehicleOrder/LegacyFeatureMapping/v2.0}WersCode')
> 
> >  Fatfile.write('\n') Fatfile.write(WersCode.text)
> 
> > except :
> 
> > Fatfile.write(' \nsorry')
> 
> > Fatfile.write(' \nSuccess')
> 
> > 
> 
> > 
> 
> > 
> 
> > But I could not able to get the WersCode List using Findall.
> 
> 
> 
> - The namespace is not correct
> 
> - "./" finds only direct children
> 
> 
> 
> Try something like
> 
> 
> 
> for feature in tree.findall(
> 
> 
> ".//{urn:ford/interface/VehicleOrder/LegacyFeatureMapping/v2}PortInstalledOptionFeature"):
> 
> code = feature.find(
> 
> ".//{urn:ford/VehicleOrder/LegacyFeatureMapping/v2.0}WersCode")
> 
> print(code.text)
> 
> 
> 
> 
> 
> > Please please please help on this .. am struggling sice one week sir...
> 
> 
> 
> ... and it's all your fault because you offered a task to do for you instead 
> 
> of some code we could help you fix.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python not starting

2013-05-05 Thread DRJ Reddy
On Sunday, May 5, 2013 7:21:59 PM UTC+5:30, Roy Smith wrote:
> In article <9ace60b8-a07d-41bc-ac9f-507f6c61f...@googlegroups.com>,
> 
>  rama29...@gmail.com wrote:
> 
> 
> 
> > I was using python from over an year and half.Suddenly from yesterday i'm 
> 
> > unable to run it.
> 
> > The error is as follows
> 
> > Traceback (most recent call last):
> 
> >   File "C:\Python27\lib\site.py", line 563, in 
> 
> > main()
> 
> >   File "C:\Python27\lib\site.py", line 546, in main
> 
> > known_paths = addsitepackages(known_paths)
> 
> >   File "C:\Python27\lib\site.py", line 324, in addsitepackages
> 
> > if os.path.isdir(sitedir):
> 
> >   File "C:\Python27\lib\genericpath.py", line 44, in isdir
> 
> > return stat.S_ISDIR(st.st_mode)
> 
> > AttributeError: 'module' object has no attribute 'S_ISDIR'
> 
> 
> 
> Just a wild guess, but did you happen to create a module of your own 
> 
> named "stat", which is getting imported instead of the one from the 
> 
> library?
> 
> 
> 
> Try doing:
> 
> 
> 
> >>> print stat.__file__
> 
> 
> 
> and see what it says.

Even from command prompt i can't start python.The error is coming up.Python in 
Windows7 box.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python not starting

2013-05-05 Thread DRJ Reddy
On Sunday, May 5, 2013 7:46:48 PM UTC+5:30, Roy Smith wrote:
> > On Sunday, May 5, 2013 7:21:59 PM UTC+5:30, Roy Smith wrote:
> 
> > > In article <9ace60b8-a07d-41bc-ac9f-507f6c61f...@googlegroups.com>,
> 
> 
> 
> > > Just a wild guess, but did you happen to create a module of your own 
> 
> > > named "stat", which is getting imported instead of the one from the 
> 
> > > library?
> 
> 
> 
> In article ,
> 
>  DRJ Reddy  wrote:
> 
> > Even from command prompt i can't start python.The error is coming up.Python 
> 
> > in Windows7 box.
> 
> 
> 
> I don't know Windows, but my guess is still that it's finding some other 
> 
> file called stat.py before it's finding the system library one.  Try 
> 
> doing a file system search for all files named "stat.py" and see what 
> 
> you find.  On unix, I would do "find / -name stat.py".  I assume there's 
> 
> something similar on Windows.
> 
> 
> 
> The other thing I would try is tracing the python process as it starts 
> 
> up.  On unix, I would do something like "strace -e trace=file python" 
> 
> and see if it's finding a stat.py in some unexpected place.  Again, I 
> 
> can only assume there's something similar on Windows.
> 
> 
> 
> Oh, and please don't post with Google Groups.  It double-spaces 
> 
> everything and makes your message really difficult to read.

I found a stat.py in python27/idlelib i haven't created one.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python not starting

2013-05-05 Thread DRJ Reddy
On Sunday, May 5, 2013 7:56:58 PM UTC+5:30, Mark Lawrence wrote:
> On 05/05/2013 15:00, DRJ Reddy wrote:
> 
> > On Sunday, May 5, 2013 7:21:59 PM UTC+5:30, Roy Smith wrote:
> 
> >> In article <9ace60b8-a07d-41bc-ac9f-507f6c61f...@googlegroups.com>,
> 
> >>
> 
> >>   rama29...@gmail.com wrote:
> 
> >>
> 
> >>> I was using python from over an year and half.Suddenly from yesterday i'm
> 
> >>> unable to run it.
> 
> >>> The error is as follows
> 
> >>
> 
> >>> Traceback (most recent call last):
> 
> >>>File "C:\Python27\lib\site.py", line 563, in 
> 
> >>>  main()
> 
> >>>File "C:\Python27\lib\site.py", line 546, in main
> 
> >>>  known_paths = addsitepackages(known_paths)
> 
> >>>File "C:\Python27\lib\site.py", line 324, in addsitepackages
> 
> >>>  if os.path.isdir(sitedir):
> 
> >>>File "C:\Python27\lib\genericpath.py", line 44, in isdir
> 
> >>>  return stat.S_ISDIR(st.st_mode)
> 
> >>> AttributeError: 'module' object has no attribute 'S_ISDIR'
> 
> >>
> 
> >> Just a wild guess, but did you happen to create a module of your own
> 
> >> named "stat", which is getting imported instead of the one from the
> 
> >> library?
> 
> >>
> 
> >> Try doing:
> 
> >>>>> print stat.__file__
> 
> >>
> 
> >> and see what it says.
> 
> >
> 
> > Even from command prompt i can't start python.The error is coming up.Python 
> > in Windows7 box.
> 
> >
> 
> 
> 
> Place the call to print stat.__file__ in the file genericpath.py 
> 
> immediately before the line that gives the attribute error.
> 
> 
> 
> Would you also be kind enough to read and use the guidance given in the 
> 
> link in my signature.  My eyesight is bad enough without parsing double 
> 
> spaced stuff courtesy of google groups, thanks.
> 
> 
> 
> -- 
> 
> If you're using GoogleCrap� please read this 
> 
> http://wiki.python.org/moin/GoogleGroupsPython.
> 
> 
> 
> Mark Lawrence

Sorry for double spaced stuff,how can i get rid of it.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python not starting

2013-05-05 Thread DRJ Reddy
On Sunday, May 5, 2013 8:30:59 PM UTC+5:30, Chris Angelico wrote:
> On Mon, May 6, 2013 at 12:16 AM, Roy Smith  wrote:
> 
> > In article ,
> 
> >  DRJ Reddy  wrote:
> 
> >> Even from command prompt i can't start python.The error is coming up.Python
> 
> >> in Windows7 box.
> 
> >
> 
> > I don't know Windows, but my guess is still that it's finding some other
> 
> > file called stat.py before it's finding the system library one.  Try
> 
> > doing a file system search for all files named "stat.py" and see what
> 
> > you find.  On unix, I would do "find / -name stat.py".  I assume there's
> 
> > something similar on Windows.
> 
> 
> 
> Or alternatively, disable site.py by invoking python -S, and then
> 
> manually import stat and see what its file is.
> 
> 
> 
> ChrisA

Thanks all of you,i have done it,by disabling,but what is the permanent 
solution.How can i start python idle 
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python not starting

2013-05-05 Thread DRJ Reddy
Chris i have seen stat.__file__. It gives me 'C:\\Python27\\lib\\stat.pyc'. 
What should i do now.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: learning python

2013-05-05 Thread DRJ Reddy
A byte of python with learning python by Mark Lutz is a good combination.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python not starting

2013-05-05 Thread DRJ Reddy
I did read and understood that while replying if > is there we will get a blank 
line unnecessarily.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python not starting

2013-05-06 Thread DRJ Reddy
> How did you get duplicate genericpath.pyc and stat.pyc files?
> If they were duplicates, why didn't they have the right code in them?
> It's probably not worth spending any more time investigating, but it is  
> still rather mysterious.
> Steven

When i was running idle on 4th of May,some error came out saying Idle 
sub-process error i don't remember it correctly,but i wonder how my windows box 
kept both the files and always loaded the older one instead of new one :D.
-- 
http://mail.python.org/mailman/listinfo/python-list


openings on java with japanese language

2005-12-14 Thread suresh . reddy
send your profile to [EMAIL PROTECTED]

Job Code: JJ1

Job Description:

 Skills: Experience in Java, J2EE, Struts and servlets.

 This is for onsite (Japan) and should be proficient at
Japanese Knowledge (Level 3/4).

Number of positions : 6


Experience:

3-5 years on Real time experience on Struts and servlets.

-- 
http://mail.python.org/mailman/listinfo/python-list


Help me plsss...

2009-06-30 Thread Harsha Reddy
Hi All,
 
Environment :-  Solaris
Python Version :-   ActivePython 2.4.3 Build 11 (ActiveState Software 
Inc.) based on
Python 2.4.3 (#1, Apr  3 2006, 18:34:02) [C] on 
sunos5
Oracle version :-   10.2.0.3 

Below is the library path

echo $LD_LIBRARY_PATH
/data/lgcmsp1/apps/dbus_3_0_8_14/vitria.3.1/SPARC_5.8/6.0/lib:/data/lgcmsp1/apps/dbus_3_0_8_14/SPARC_5.8/6.0/lib::/data/lgcmsp1/apps/dbus_3_0_8_14/SPARC_5.8/6.0/lib:/data/lgcmsp1/apps/dbus_3_0_8_14/vitria.3.1/SPARC_5.8/6.0/lib:
/data/oracle/product/10.2.0.3/lib


Issue :-

We have been recently migrated from 9i to 10g database and also from AIX 
to Solaris.

When we were using 9i i can able to import cx_oracle library...

But now iam in Solaris and 10g database and same when iam trying to do 
that below is the error iam getting...

newprd$ python
ActivePython 2.4.3 Build 11 (ActiveState Software Inc.) based onPython 
2.4.3 (#1, Apr  3 2006, 18:34:02) [C] on sunos5Type "help", "copyright", 
"credits" or "license" for more information.

>>> import cx_Oracle
Traceback (most recent call last):
  File "", line 1, in ?
ImportError: ld.so.1: python: fatal: libclntsh.so.9.0: open failed: No 
such file or directory

Does it mean that cx_oracle library not there (or) if you see the error 
it's trying to get 9i libraries fatal: libclntsh.so.9.0.



PLs help meee ...
Cheers,
Harsha.

FXPCA & GCMS & CLS SUPPORT 
Phone : +91-80-4187 3075 
FXPCA HOTLINE : +91-80-64522431 GCMS & CLS HOTLINE : +91-80-6450 8482 

P.S.: Please ensure all your FXPCA queries are CC'd to 
fxpca_supp...@list.db.com & GCMS related queries are CC'd to 
"gcms_it_supp...@dmg UK" & CLS related queries are CC'd to CLS_IT_SUPPORT 
to get a quicker response in case of my absence

 


--
 

?This mail is transmitted to you on behalf of HCL Technologies" 
"Diese Post wird Ihnen im Namen der HCL Technologies übermittelt" 
---
 



---

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and delete this e-mail. Any unauthorized copying, 
disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional 
EU corporate and regulatory disclosures.-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Help me plsss...

2009-06-30 Thread Harsha Reddy
Hi Marc,

Thanks for the repl...

Ican see below in /data/oracle/product/10.2.0.3/lib

newprd$ ls -ltr libclntsh*
-rwxrwxr-x   1 oracle   dba  24048416 Apr 29 10:49 libclntsh.so.10.1
lrwxrwxrwx   1 oracle   dba   51 Apr 29 10:49 libclntsh.so -> 
/data/oracle/product/10.2.0.3/lib/libclntsh.so.10.1

Cheers,
Harsha.

FXPCA & GCMS & CLS SUPPORT 
Phone : +91-80-4187 3075 
FXPCA HOTLINE : +91-80-64522431 GCMS & CLS HOTLINE : +91-80-6450 8482 

P.S.: Please ensure all your FXPCA queries are CC'd to 
fxpca_supp...@list.db.com & GCMS related queries are CC'd to 
"gcms_it_supp...@dmg UK" & CLS related queries are CC'd to CLS_IT_SUPPORT 
to get a quicker response in case of my absence

 


--
 

?This mail is transmitted to you on behalf of HCL Technologies" 
"Diese Post wird Ihnen im Namen der HCL Technologies übermittelt" 
---
 




Marco Bizzarri  
30/06/2009 17:40

To
Harsha Reddy/ext/db...@dbemea
cc
python-list@python.org
Subject
Re: Help me plsss...






Of course, you're sure that under

/data/oracle/product/10.2.0.3/lib


you can find

libclntsh.so.9.0

Regards
Marco



On Tue, Jun 30, 2009 at 1:45 PM, Harsha Reddy  wrote:
>
> Hi All,
>
> Environment :- Solaris
> Python Version :- ActivePython 2.4.3 Build 11 (ActiveState 
Software Inc.) based on
> Python 2.4.3 (#1, Apr  3 2006, 18:34:02) [C] on 
sunos5
> Oracle version :- 10.2.0.3
>
> Below is the library path
>
> echo $LD_LIBRARY_PATH
> 
/data/lgcmsp1/apps/dbus_3_0_8_14/vitria.3.1/SPARC_5.8/6.0/lib:/data/lgcmsp1/apps/dbus_3_0_8_14/SPARC_5.8/6.0/lib::/data/lgcmsp1/apps/dbus_3_0_8_14/SPARC_5.8/6.0/lib:/data/lgcmsp1/apps/dbus_3_0_8_14/vitria.3.1/SPARC_5.8/6.0/lib:/data/oracle/product/10.2.0.3/lib
>
>
> Issue :-
>
> We have been recently migrated from 9i to 10g database and also from AIX 
to Solaris.
>
> When we were using 9i i can able to import cx_oracle library...
>
> But now iam in Solaris and 10g database and same when iam trying to do 
that below is the error iam getting...
>
> newprd$ python
> ActivePython 2.4.3 Build 11 (ActiveState Software Inc.) based onPython 
2.4.3 (#1, Apr  3 2006, 18:34:02) [C] on sunos5Type "help", "copyright", 
"credits" or "license" for more information.
>
> >>> import cx_Oracle
> Traceback (most recent call last):
>   File "", line 1, in ?
> ImportError: ld.so.1: python: fatal: libclntsh.so.9.0: open failed: No 
such file or directory
>
> Does it mean that cx_oracle library not there (or) if you see the error 
it's trying to get 9i libraries fatal: libclntsh.so.9.0.
>
>
>
> PLs help meee ...
> Cheers,
> Harsha.
>
> FXPCA & GCMS & CLS SUPPORT
> Phone : +91-80-4187 3075
> FXPCA HOTLINE : +91-80-64522431 GCMS & CLS HOTLINE : +91-80-6450 8482
> 

> P.S.: Please ensure all your FXPCA queries are CC'd to 
fxpca_supp...@list.db.com & GCMS related queries are CC'd to 
"gcms_it_supp...@dmg UK" & CLS related queries are CC'd to CLS_IT_SUPPORT 
to get a quicker response in case of my absence
> 

>
> 
--
> ?This mail is transmitted to you on behalf of HCL Technologies"
> "Diese Post wird Ihnen im Namen der HCL Technologies übermittelt"
> 
---
>
> ---
>
> This e-mail may contain confidential and/or privileged information. If 
you are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and delete this e-mail. Any 
unauthorized copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.
>
> Please refer to http://www.db.com/en/content/eu_disclosures.htm for 
additional EU corporate and regulatory disclosures.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



--
Marco Bizzarri
http://

Re: Help me plsss...

2009-06-30 Thread Harsha Reddy
Hi Marc,

Thanks for the repl...

Ican see below in /data/oracle/product/10.2.0.3/lib

newprd$ ls -ltr libclntsh*
-rwxrwxr-x   1 oracle   dba  24048416 Apr 29 10:49 libclntsh.so.10.1
lrwxrwxrwx   1 oracle   dba   51 Apr 29 10:49 libclntsh.so -> 
/data/oracle/product/10.2.0.3/lib/libclntsh.so.10.1

Cheers,
Harsha.

FXPCA & GCMS & CLS SUPPORT 
Phone : +91-80-4187 3075 
FXPCA HOTLINE : +91-80-64522431 GCMS & CLS HOTLINE : +91-80-6450 8482 

P.S.: Please ensure all your FXPCA queries are CC'd to 
fxpca_supp...@list.db.com & GCMS related queries are CC'd to 
"gcms_it_supp...@dmg UK" & CLS related queries are CC'd to CLS_IT_SUPPORT 
to get a quicker response in case of my absence

 


--
 

?This mail is transmitted to you on behalf of HCL Technologies" 
"Diese Post wird Ihnen im Namen der HCL Technologies übermittelt" 
---
 




Marco Bizzarri  
30/06/2009 17:40

To
Harsha Reddy/ext/db...@dbemea
cc
python-list@python.org
Subject
Re: Help me plsss...






Of course, you're sure that under

/data/oracle/product/10.2.0.3/lib


you can find

libclntsh.so.9.0

Regards
Marco



On Tue, Jun 30, 2009 at 1:45 PM, Harsha Reddy  wrote:
>
> Hi All,
>
> Environment :- Solaris
> Python Version :- ActivePython 2.4.3 Build 11 (ActiveState 
Software Inc.) based on
> Python 2.4.3 (#1, Apr  3 2006, 18:34:02) [C] on 
sunos5
> Oracle version :- 10.2.0.3
>
> Below is the library path
>
> echo $LD_LIBRARY_PATH
> 
/data/lgcmsp1/apps/dbus_3_0_8_14/vitria.3.1/SPARC_5.8/6.0/lib:/data/lgcmsp1/apps/dbus_3_0_8_14/SPARC_5.8/6.0/lib::/data/lgcmsp1/apps/dbus_3_0_8_14/SPARC_5.8/6.0/lib:/data/lgcmsp1/apps/dbus_3_0_8_14/vitria.3.1/SPARC_5.8/6.0/lib:/data/oracle/product/10.2.0.3/lib
>
>
> Issue :-
>
> We have been recently migrated from 9i to 10g database and also from AIX 
to Solaris.
>
> When we were using 9i i can able to import cx_oracle library...
>
> But now iam in Solaris and 10g database and same when iam trying to do 
that below is the error iam getting...
>
> newprd$ python
> ActivePython 2.4.3 Build 11 (ActiveState Software Inc.) based onPython 
2.4.3 (#1, Apr  3 2006, 18:34:02) [C] on sunos5Type "help", "copyright", 
"credits" or "license" for more information.
>
> >>> import cx_Oracle
> Traceback (most recent call last):
>   File "", line 1, in ?
> ImportError: ld.so.1: python: fatal: libclntsh.so.9.0: open failed: No 
such file or directory
>
> Does it mean that cx_oracle library not there (or) if you see the error 
it's trying to get 9i libraries fatal: libclntsh.so.9.0.
>
>
>
> PLs help meee ...
> Cheers,
> Harsha.
>
> FXPCA & GCMS & CLS SUPPORT
> Phone : +91-80-4187 3075
> FXPCA HOTLINE : +91-80-64522431 GCMS & CLS HOTLINE : +91-80-6450 8482
> 

> P.S.: Please ensure all your FXPCA queries are CC'd to 
fxpca_supp...@list.db.com & GCMS related queries are CC'd to 
"gcms_it_supp...@dmg UK" & CLS related queries are CC'd to CLS_IT_SUPPORT 
to get a quicker response in case of my absence
> 

>
> 
--
> ?This mail is transmitted to you on behalf of HCL Technologies"
> "Diese Post wird Ihnen im Namen der HCL Technologies übermittelt"
> 
---
>
> ---
>
> This e-mail may contain confidential and/or privileged information. If 
you are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and delete this e-mail. Any 
unauthorized copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.
>
> Please refer to http://www.db.com/en/content/eu_disclosures.htm for 
additional EU corporate and regulatory disclosures.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



--
Marco Bizzarri
http://

python 6 compilation failure on RHEL

2012-08-20 Thread Ganesh Reddy K
Hi All,

We are trying python 2.6 installation on an RHEL PC ,

whose 'uname -a' is (Linux  2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38
EST 2008 x86_64 x86_64 x86_64 GNU/Linux )


But, python compilation is not successfully done and showing a failure
log.  Below is the capture  of the same. Please see failure log shown
in the bottom of this mail.
How to solve the failure modules  mentioned in the log ( bsddb185,
dl ,  imageop, sunaudiodev )

Please guide me to proceed further.

== capture begin =
cd   Python- 2.6.6

# ./configure
checking for --enable-universalsdk... no
checking for --with-universal-archs... 32-bit
checking MACHDEP... linux2
checking EXTRAPLATDIR...
checking machine type as reported by uname -m... x86_64
checking for --without-gcc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for --with-cxx-main=... no
checking for g++... g++
configure: WARNING:

  By default, distutils will build C++ extension modules with "g++".
  If this is not intended, then set CXX on the configure command line.

checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for --with-suffix...
checking for case-insensitive build directory... no
checking LIBRARY... libpython$(VERSION).a
checking LINKCC... $(PURIFY) $(MAINCC)
checking for --enable-shared... no
checking for --enable-profiling...
checking LDLIBRARY... libpython$(VERSION).a
checking for ranlib... ranlib
checking for ar... ar
checking for svnversion... found
checking for a BSD-compatible install... /usr/bin/install -c
checking for --with-pydebug... no
checking whether gcc accepts -fno-strict-aliasing... yes
checking whether gcc accepts -OPT:Olimit=0... no
checking whether gcc accepts -Olimit 1500... no
checking whether gcc supports ParseTuple __format__... no
checking whether pthreads are available without options... no
checking whether gcc accepts -Kpthread... no
checking whether gcc accepts -Kthread... no
checking whether gcc accepts -pthread... yes
checking whether g++ also accepts flags for thread support... yes
checking for ANSI C header files... (cached) yes
checking asm/types.h usability... yes
checking asm/types.h presence... yes
checking for asm/types.h... yes
checking conio.h usability... no
checking conio.h presence... no
checking for conio.h... no
checking curses.h usability... yes
checking curses.h presence... yes
checking for curses.h... yes
checking direct.h usability... no
checking direct.h presence... no
checking for direct.h... no
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking io.h usability... no
checking io.h presence... no
checking for io.h... no
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking process.h usability... no
checking process.h presence... no
checking for process.h... no
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking shadow.h usability... yes
checking shadow.h presence... yes
checking for shadow.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking for stdint.h... (cached) yes
checking stropts.h usability... yes
checking stropts.h presence... yes
checking for stropts.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for

RE: Python Software Installation - Failed

2017-12-28 Thread Kirankumar Reddy Polu
Hi,

I am trying to install Python 3.6.4 in my laptop. I am getting the following 
error. I also attached failure log as well in the mail. I could not change the 
path. It is automatically installing in C drive. Might be, this is restricted 
drive, so we got errors. I am not sure, but let me know as well to do the path 
changes at D drive.

Please suggest me to do the installation steps without failures of the attached 
logs.

[cid:image001.png@01D37FFA.E81295C0]


Regards,
Kiran Polu


Disclaimer:  This message and the information contained herein is proprietary 
and confidential and subject to the Tech Mahindra policy statement, you may 
review the policy at http://www.techmahindra.com/Disclaimer.html 
 externally 
http://tim.techmahindra.com/tim/disclaimer.html 
 internally within 
TechMahindra.


-- 
https://mail.python.org/mailman/listinfo/python-list


Python Enhancement Proposal for List methods

2018-10-22 Thread Siva Sukumar Reddy
Hey everyone,

I am really new to Python contribution community want to propose below
methods for List object. Forgive me if this is not the format to send an
email.

1. *list.replace( item_to_be_replaced, new_item )*: which replaces all the
occurrences of an element in the list instead of writing a new list
comprehension in place.
2. *list.replace( item_to_be_replaced, new_item, number_of_occurrences )*:
which replaces the occurrences of an element in the list till specific
number of occurrences of that element. The number_of_occurrences can
defaulted to 0 which will replace all the occurrences in place.
3. *list.removeall( item_to_be_removed )*: which removes all the
occurrences of an element in a list in place.

What do you think about these features?
Are they PEP-able? Did anyone tried to implement these features before?
Please let me know.

Thank you,
Sukumar
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: installing modules problem

2018-11-08 Thread Siva Sukumar Reddy
Also make sure that the Pythonpath contains the folder where the modules
are installed in your machine. - site packages folder.

On Thu 8 Nov, 2018, 16:28 Thomas Jollans  On 2018-11-08 06:04, Ian K. wrote:
> > Hello,
> >
> > My name is Ian Kilty and I have been having trouble with pip. I have pip
> > installed, and I have tried to install modules they say they are
> installed
> > in cmd, but when I go into python and import the module, it can't find
> it.
> > I hope there is a simple solution to this problem, please let me know as
> > soon as possible.
> >
> > -- from Not A User because I don't want to be made fun of in Tron --
> >
>
> Hi!
>
> some questions:
>
>  - is there any chance you have multiple versions of python installed?
>Could you be using the wrong pip?
>  - what operating system are you using?
>  - what are you trying to install and use?
>  - how exactly are you trying to install and import this module? (exact
>commands, exact copy-pasted output)
>
> -- Thomas
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Fwd: Installation Errors

2019-09-05 Thread venu gopal reddy
Hi Python Support Team,

I have subscribed now and re-sending my query. Please suggest.

I have an Issue installing python 3.7 on my work computer. It says core.msi
package not found during installation. Can you please help me with steps to
resolve this issue?

Thank you,
Venu
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-15 Thread Uday S Reddy
Mark Janssen writes:

> After the 2001 "type/class unification" , it went towards Alan Kay's ideal
> of "everything is an object"
> 
> As a contrast, this is very distinct from C++, where everything is
> concretely rooted in the language's type model which in *itself* is
> rooted (from it's long history) in the CPU architecture. ...
> 
> My question is:  Is there something in the Computer Science literature
> that has noticed this distinction/development in programming language
> design and history?

In programming language theory, there is no law to the effect that
"everything" should be of one kind or another.  So, we would not go with
Alan Kay's ideal.

Having said that, theorists do want to unify concepts wherever possible and
wherever they make sense.  Imperative programming types, which I will call
"storage types", are semantically the same as classes.  Bare storage types
have predefined operations for 'getting' and 'setting' whereas classes allow
user-defined operations.  So, the distinction made between them in typical
programming languages is artificial and implementation-focused.  C and C++
are especially prone to this problem because they were designed for writing
compilers and operating systems where proximity to the machine architecture
seems quite necessary.  The higher-level languages such as Java are moving
towards abolishing the distinction.  Scala might be the best model in this
respect, though I do not know its type system fully.

Here are a couple of references in theoretical work that might be helpful in
understanding these connections:

- John Reynolds, The Essence of Algol, in de Bakker and van Vliet (eds)
Algorithmic Languages, 1981.  Also published in O'Hearn and Tennent (eds)
Algol-like Languages, Vol. A, 1997.

- Uday Reddy, Objects and Classes in Algol-like Languages, Information and
Computation, 172:63-97, 2002. (previously in FOOL workshop 1998.)
http://www.cs.bham.ac.uk/~udr/papers/classes.pdf

However, there are properties that are special to storage types, which are
not shared by all class types.  Sometimes, they simplify some theoretical
aspects.  It is not uncommon for authors to make a distinction between
storage types and general types.  An example is one of our own papers:

- Swarup, Reddy and Ireland: Assignments for applicative languages, FPCA
1991. http://www.cs.bham.ac.uk/~udr/papers/assign.pdf

Cheers,
Uday Reddy
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-17 Thread Uday S Reddy
Mark Janssen writes:

> > Having said that, theorists do want to unify concepts wherever possible
> > and wherever they make sense.  Imperative programming types, which I
> > will call "storage types", are semantically the same as classes.
> 
> I like that word "storage type", it makes it much clearer what one is
> referring to.

Indeed.  However, this is not the only notion of type in imperative
programming languages.  For example, a function type in C or its descendants
is not there to describe storage, but to describe the interface of an
abstraction.  I will use Reynolds's term "phrase types" to refer to such
types.  Reynolds's main point in "The Essence of Algol" was to say that
phrase types are much more general, and a language can be built around them
in a streamlined way.  Perhaps "Streamlining Algol" would have been a more
descriptive title for his paper.  Nobody should be designing an imperative
programming language without having read "The Essence of Algol", but they
do.

Whether storage types (and their generalization, class types) should be
there in a type system at all is an open question.  I can think of arguments
both ways.  In Java, classes are types.  So are interfaces (i.e., phrase
types).  I think Java does a pretty good job of combining the two
in a harmonious way.

If you have trouble getting hold of "The Essence of Algol", please write to
me privately and I can send you a scanned copy.  The Handout 5B in my
"Principles of Programming Languages" lecture notes is a quick summary of
the Reynolds's type system.

  http://www.cs.bham.ac.uk/~udr/popl/index.html

> I feel like I'm having to "come up to speed" of the academic
> community, but wonder how and why this large chasm happened between
> the applied community and the theoretical.   In my mind, despite the
> ideals of academia, students graduate and they inevitably come to work
> on Turing machines of some kind (Intel hardware, for example,
> currently dominates).  If this is not in some way part of some
> "ideal", why did the business community adopt and deploy these most
> successfully?  Or is it, in some *a priori* way, not possible to apply
> the abstract notions in academia into the real-world?

The chasms are too many, not only between theoretical and applied
communities, but within each of them.  My feeling is that this is
inevitable.  Our field progresses too fast for people to sit back, take
stock of what we have and reconcile the multiple points of view.

There is nothing wrong with "Turing machines".  But the question in
programming language design is how to integrate the Turing machine concepts
with all the other abstractions we need (functions/procedures, modules,
abstract data types etc.), i.e., how to fit the Turing machine concepts into
the "big picture".  That is not an easy question to resolve, and there isn't
a single way of doing it.  So you see multiple approaches being used in the
practical programming languages, some cleaner than the others.

The abstract notions of academia do make it into the real world, but rather
more slowly than one would hope.  Taking Java for example, the initial
versions of Java treated interfaces in a half-hearted way, ignored
generics/polymorphism, and ignored higher-order functions.  But all of them
are slowly making their way into Java, with pressure not only from the
academic community but also through competition from other "practical"
languages like Python, C# and Scala.  If this kind of progress continues,
that is the best we can hope for in a fast-paced field like ours.

Cheers,
Uday Reddy

-- 
Prof. Uday ReddyTel: +44 121 414 2740 
Professor of Computer Science   Fax: +44 121 414 4281
School of Computer Science  
University of BirminghamEmail: u.s.re...@cs.bham.ac.uk  
Edgbaston   
Birmingham B15 2TT  Web: http://www.cs.bham.ac.uk/~udr
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-17 Thread Uday S Reddy
Mark Janssen writes:

> From:  en.wikipedia.org: Programming_paradigm:
> 
> "A programming paradigm is a fundamental style of computer
> programming. There are four main paradigms: object-oriented,
> imperative, functional and declarative. Their foundations are distinct
> models of computation: Turing machine for object-oriented and
> imperative programming, lambda calculus for functional programming,
> and first order logic for logic programming."
> 
> While I understand the interest in purely theoretical models, I wonder
> two things:  1)  Are these distinct models of computation valid?  And,
> 2) If so, shouldn't a theory of types announce what model of
> computation they are working from?

These distinctions are not fully valid.  

- Functional programming, logic programming and imperative programming are
three different *computational mechanisms*.

- Object-orientation and abstract data types are two different ways of
building higher-level *abstractions*.

The authors of this paragraph did not understand that computational
mechanisms and higher-level abstractions are separate, orthogonal dimensions
in programming language design.  All six combinations, obtained by picking a
computational mechanism from the first bullet and an abstraction mechanism
from the second bullet, are possible.  It is a mistake to put
object-orientation in the first bullet.  Their idea of "paradigm" is vague
and ill-defined.

Cheers,
Uday Reddy
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-19 Thread Uday S Reddy
Mark Janssen writes:

> The main thing that I notice is that there is a heavy "bias" in
> academia towards mathematical models.  I understand that Turing
> Machines, for example, were originally abstract computational concepts
> before there was an implementation in hardware, so I have some
> sympathies with that view, yet, should not the "Science" of "Computer
> Science" concern itself with how to map these abstract computational
> concepts into actual computational hardware?

I think there is some misunderstanding here.  Being "mathematical" in
academic work is a way of making our ideas rigorous and precise, instead of
trying to peddle wooly nonsense.  Providing a mathematical description does
not imply in any way that these ideas are not implementable on machines.  In
fact, very often these mathematical descriptions state precisely how to
implement the concepts (called operational semantics), but using
mathematical notation instead of program code.  The mathematical notation
used here is usually no more than high school set theory, used in a
stylized way.

In contrast, there are deeper "mathematical models" (called denotational
semantics and axiomatic semantics) which are invented to describe how
programming language features work in a deep, intrinsic way.  This is
similar to, for instance, how Physics invents mathematical models to capture
how the nature around us works.  Physicists don't need to "implement"
nature.  It has already been "implemented" for us before we are born.
However, to understand how it works, and how to design systems using
physical materials in a predictable way, we need the mathematical models
that Physics has develeped.

Similarly, the mathematical models of programming languages help us to
obtain a deep understanding of how languages work and how to build systems
in a predictable, reliable way.  It seems too much to expect, at the present
stage of our field, that all programmers should understand the mathematical
models.  But I would definitely expect that programming language designers
who are trying to build new languages should understand the mathematical
models.  Otherwise, they would be like automotive engineers trying to build
cars without knowing any Mechanics.

Cheers,
Uday Reddy

-- 
Prof. Uday ReddyTel: +44 121 414 2740 
Professor of Computer Science   Fax: +44 121 414 4281
School of Computer Science  
University of BirminghamEmail: u.s.re...@cs.bham.ac.uk  
Edgbaston   
Birmingham B15 2TT  Web: http://www.cs.bham.ac.uk/~udr
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: tallying occurrences in list

2010-06-05 Thread Sreenivas Reddy Thatiparthy
On Jun 4, 11:14 am, kj  wrote:
> Task: given a list, produce a tally of all the distinct items in
> the list (for some suitable notion of "distinct").
>
> Example: if the list is ['a', 'b', 'c', 'a', 'b', 'c', 'a', 'b',
> 'c', 'a'], then the desired tally would look something like this:
>
> [('a', 4), ('b', 3), ('c', 3)]
>
> I find myself needing this simple operation so often that I wonder:
>
> 1. is there a standard name for it?
> 2. is there already a function to do it somewhere in the Python
>    standard library?
>
> Granted, as long as the list consists only of items that can be
> used as dictionary keys (and Python's equality test for hashkeys
> agrees with the desired notion of "distinctness" for the tallying),
> then the following does the job passably well:
>
> def tally(c):
>     t = dict()
>     for x in c:
>         t[x] = t.get(x, 0) + 1
>     return sorted(t.items(), key=lambda x: (-x[1], x[0]))
>
> But, of course, if a standard library solution exists it would be
> preferable.  Otherwise I either cut-and-paste the above every time
> I need it, or I create a module just for it.  (I don't like either
> of these, though I suppose that the latter is much better than the
> former.)
>
> So anyway, I thought I'd ask. :)
>
> ~K

How about this one liner, if you prefer them;
set([(k,yourList.count(k)) for k in yourList])
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: death of newsgroups (Microsoft closing their newsgroups)

2010-07-16 Thread Uday S Reddy

On 7/13/2010 7:43 PM, Xah Lee wrote:



I use comp.lang.lisp, comp.emacs since about 1999. Have been using
them pretty much on a weekly basis in the past 10 years. Starting
about 2007, the traffic has been increasingly filled with spam, and
the posters are always just the 20 or 30 known faces. I think perhaps
maybe no more than 100 different posters a year. Since this year or
last year, they are some 95% spam.

comp.emacs is pretty much just me.

gnu.emacs.help is not much better. It's pretty much the same
developers and the same few elisp coders, with perhaps 1 new face with
once-per-lifetime post every few days. gnu.emacs.help is doing a bit
better because it is connected to fsf's mailing list.


Doing "better" means having more posts?  I don't believe that having a lot of 
posts is necessarily a measure of goodness.


In my opinion, discussion forums do well when they encourage people to think 
carefully and communicate clearly.  In this respect, I think mailing lists do 
worse, newsgroups better, and web-based forums the best.


Mailing lists seem to turn into talking shops where people get to know each 
other over time and their "public" nature gets lost.  Those who write a lot end 
up dominating them, independent of whether they write any sense or not.  The 
other people get tired and stop reading.  So, you can generate a lot of 
traffic, but its value is dubious.


Newsgroups are much better because they are public and, visibly so.  If 
somebody says something stupid, a lot of people will jump on them.  And, so, 
over time, they develop some quality.  (There is no guarantee, of course.  I 
have also seen a lot of newsgroups, especially in politics, really degenerate 
with opposing factions fighting and dominating everything else.)


Web-based forums, especially those where people have to register, work the best 
in my experience.  They are very visibly public, discouraging people to write 
nonsense.  The difficulty of writing on the web instead of your favorite editor 
hopefully provides some resistance to write.  So, people tend to think more 
than they write.


I used a forum called silentpcforum last year to help me build myself a new 
computer.  There was a lot of high quality information dating back to years, 
which was easy to find and easy to use.


So, if newsgroups die and get replaced by web forums, that would be a move for 
the better.  If they get replaced by mailing lists, that would be a move for 
the worse.


Cheers,
Uday
--
http://mail.python.org/mailman/listinfo/python-list


can i write a assemly language programs in python

2009-07-09 Thread m.reddy prasad reddy
can any one tell me how to write assembly language programs in python...if
no is there any other way to write the programs in python

Reddi prasad reddy
ph.no:09958083797
-- 
http://mail.python.org/mailman/listinfo/python-list


i need immediate help from u

2009-07-09 Thread m.reddy prasad reddy
i m new this community .;
can any one send me the solution for writing the assembly language programs
in python
my mail ID:redd@gmail.com 
-- 
http://mail.python.org/mailman/listinfo/python-list


need to write a assembly progrm

2009-07-10 Thread m.reddy prasad reddy
my aim is to run the assembly programs in python.by that we can use that in
the any labs.because we can run the python in the mobiles also.if we write
assembly programs in the mobile ,the mobile act as a tool kit for the
lab.tell me any other solutions for this
-- 
http://mail.python.org/mailman/listinfo/python-list


Python

2022-02-21 Thread SASI KANTH REDDY GUJJULA
Pip files are not installing after the python 3.10.2 version installing in my 
devise. Please solve this for me.

Sent from Mail for Windows

-- 
https://mail.python.org/mailman/listinfo/python-list