subclassing pyrex extension types in python

2007-01-18 Thread Nitin
self.name1 = name1 self.name2 = name2 When I run this Python code, I get an error "TypeError: 'name2' is an invalid keyword argument for this function" Is there something I need to know about Pyrex extension types and keyword arguments ? I tried to google for this but co

Req: Python Developer : Direct CLient

2011-01-11 Thread nitin
documentation. Workable knowledge of relational databases and NoSQL solutions Thanks Nitin Singhal | RJT Compuquest Inc. 23440 Hawthorne Blvd., Suite 210, Torrance, CA 90505 nsing...@rjtcompuquest.com www.rjtcompuquest.com Direct: 310 961 5807 Voice: 866-978-0384 Ext- 46 Fax: 310-378-6867 -- http

ctypes pointer

2012-02-06 Thread Nitin Bhargava
= [ctypes.POINTER(ctypes.c_wchar_p)] a = ctypes.c_wchar_p('') z = ctypes.pointer(a) n= func(z) print a /* displays "this is a test" */ /* is this correct way to return charater array */ /* will memory allocated in c++ function be freed by python */ /*

Re: Passing array from java to python

2011-06-02 Thread Nitin Pawar
can you execute the java code from python and get the result stored as python variable os.system() On Thu, Jun 2, 2011 at 4:17 PM, loial wrote: > Unfortunately using jpython or json are not options at the moment > -- > http://mail.python.org/mailman/listinfo/python-list > --

Re: How to stop iteration

2011-06-05 Thread Nitin Pawar
space) > print 'The final result is: ', c > > > -- > http://mail.python.org/mailman/listinfo/python-list > > -- Nitin Pawar -- http://mail.python.org/mailman/listinfo/python-list

Re: How good is security via hashing

2011-06-07 Thread Nitin Pawar
etrandbits(128) > > > is this algorithm safe? Is it safe if the process is switched to fastcgi > and the initialization is only carried out once and then say 50 rrr values > are generated. > -- > Robin Becker > > -- > http://mail.python.org/mailman/listinfo/python-list > -- Nitin Pawar -- http://mail.python.org/mailman/listinfo/python-list

Re: The pythonic way equal to "whoami"

2011-06-07 Thread Nitin Pawar
> I'd like to know it, so the program will run with the right privileges. > > Is there any standard function on python, that will do it? > -- > goto /dev/null > -- > http://mail.python.org/mailman/listinfo/python-list > -- Nitin Pawar -- http://mail.python.org/mailman/listinfo/python-list

Re: Running a Python script on a web server

2011-06-07 Thread Nitin Pawar
ers to install a Python interpreter, > they need only install it once and then you can distribute all your > scripts in .py format rather than py2exeing them all. > > Chris Angelico > -- > http://mail.python.org/mailman/listinfo/python-list > -- Nitin Pawar -- http://mail.python.org/mailman/listinfo/python-list

Re: Application monitoring

2011-08-16 Thread Nitin Pawar
t; -- > http://mail.python.org/mailman/listinfo/python-list > -- Nitin Pawar -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting an array of string to array of float

2011-03-25 Thread Nitin Pawar
learned members can kindly suggest any solution? > > Thanks in advance. > Best Regards, > Subhabrata. > -- > http://mail.python.org/mailman/listinfo/python-list > -- Nitin Pawar -- http://mail.python.org/mailman/listinfo/python-list

Re: How to Use Setuptools, Alternatives?

2011-05-30 Thread Nitin Pawar
install the latest version of the package > for your platform. > You may want to add the path to the Scripts folder to your PATH > environment variable so > you can just run easy_install from any current working directory. > > Hope that helps, > > Doug > -- > http://mail.python.org/mailman/listinfo/python-list > -- Nitin Pawar -- http://mail.python.org/mailman/listinfo/python-list

Trouble using telentlib

2005-02-12 Thread Nitin Chaumal
tput and so on. I tried to find docs on telnetlib but in vain. Can somebody guide me please Thanks Nitin -- http://mail.python.org/mailman/listinfo/python-list

Multiple Inheritance __slots__ problem

2004-12-24 Thread Nitin Shukla
ots__ = ( 'z' ) ... Traceback (most recent call last): File "", line 1, in ? TypeError: multiple bases have instance lay-out conflict I need to define slots in these classes and also need to inherit them in Derived class. Nitin -- http://mail.python.org/mailman/listinfo/python-list

Variables with cross-module usage

2009-11-28 Thread Nitin Changlani.
== Output: --- 'place_x' ['place_a', 'place_b', 'place_c'] 'place_no_x' ['place_a', 'place_b', 'place_c'] (*** instead of ['place_no_a', 'place_no_b', 'place_c'] ***) The last line in the output is what's baffling me. Can anyone please help me know if I am doing something wrong? Thanks in advance, Nitin. -- http://mail.python.org/mailman/listinfo/python-list

Re: Variables with cross-module usage

2009-11-28 Thread Nitin Changlani.
indly suggest what is the correct way to go about it? Nitin. > > > > > Hi Nitin, > > > > On Sat, Nov 28, 2009 at 14:36, MRAB wrote: > >> Nitin Changlani. wrote: > >>> three.py > >>> > >>> import one >

Re: Variables with cross-module usage

2009-11-28 Thread Nitin Changlani
indly suggest what is the correct way to go about it? Nitin. -- http://mail.python.org/mailman/listinfo/python-list

Re: Variables with cross-module usage

2009-11-29 Thread Nitin Changlani.
Thanks Dennis and Steve, This explains it all! I will discard using one.a and use one.myList[0] directly, instead. I really appreciate your patience and the elaboration of the concept. Warm Regards, Nitin Changlani. On Sun, Nov 29, 2009 at 1:02 AM, Steven D'Aprano < st...@rem

Re: packaging python code in zip file

2010-12-09 Thread Nitin Pawar
hout the __init__.py file . > I am not sure which is the correct way. > Can somebody advise me as to how I can package it better? > > thanks, > > mark > -- > http://mail.python.org/mailman/listinfo/python-list > -- Nitin Pawar -- http://mail.python.org/mailman/listinfo/python-list

Re: python-parser running Beautiful Soup needs to be reviewed

2010-12-11 Thread Nitin Pawar
d') > > Then we have to use renderContents() to extract the textual contents: > > text = first_td.renderContents() > > ... and the job is done (though we may also want to use strip() to > remove leading and trailing spaces: > > trimmed_text = text.strip() > > Th

Re: O'Reilly Python Certification

2010-12-16 Thread Nitin Pawar
Can someone provide any links or any starting points on how to apply and what are the prerequisites Thanks, Nitin On Thu, Dec 16, 2010 at 12:18 PM, Steve Holden wrote: > On 12/15/2010 4:21 PM, Stefan Sonnenberg-Carstens wrote: > > Am 15.12.2010 22:11, schrieb Steve Holden: > >&g

Re: lxml etree question

2010-12-24 Thread Nitin Pawar
ful. > > Jim > -- > http://mail.python.org/mailman/listinfo/python-list > You can check this http://codespeak.net/pipermail/lxml-dev/2006-February/000920.html -- Nitin Pawar -- http://mail.python.org/mailman/listinfo/python-list

Re: Graphing API,

2011-01-05 Thread Nitin Pawar
you can check pywebgraph On Wed, Jan 5, 2011 at 3:49 PM, Slie wrote: > Is there a graphing API, someone suggests? > -- > http://mail.python.org/mailman/listinfo/python-list > -- Nitin Pawar -- http://mail.python.org/mailman/listinfo/python-list

Re: trouble installing MySQLdb (cygwin) + Bonus question

2011-01-25 Thread Nitin Pawar
Nothing againest mysqlDB but I had tried using it sometimes and found it little difficult to use when you left the connections open idle for sometime . I had used PySQLPool then to solve my issues. Give it a try, I would recommend it. Thanks, nitin On Tue, Jan 25, 2011 at 8:35 PM, Matthew Roth

Re: Would like to add an "upload" facility to my web site

2011-01-31 Thread Nitin Pawar
is: Do I need root access to uploads files?? > > Gracias, > > -Ramon > > -- > You don't need a root access to upload files. You will just need to create a directory where you want to save the uploaded files and grant permission to the username by which the web server is running. In case the file uploads are small the simple upload feature works fine but for larger files you may need to write a chunk read/write api > http://mail.python.org/mailman/listinfo/python-list > -- Nitin Pawar -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie getting desperate with for

2011-02-17 Thread Nitin Pawar
Before I tear out my hair any more (only 3 left) I thought I'd ask here > what I am doing wrong. > > Best Regards > Werner Dahn > -- > http://mail.python.org/mailman/listinfo/python-list > -- Nitin Pawar -- http://mail.python.org/mailman/listinfo/python-list

Re: Python fails on math

2011-02-22 Thread Nitin Pawar
e. The math module? Python, > or the IEEE specifications? > > -- > -- > http://mail.python.org/mailman/listinfo/python-list > -- Nitin Pawar -- http://mail.python.org/mailman/listinfo/python-list

Re: Netbeans plugin and Python 3

2010-07-12 Thread Nitin Pawar
ted 3) After plugin is activated, you can edit default python version by tools-> python platform 4) It will open a configure window, where you can point python to newly installed 3.0 version. I hope that helps. Thanks, nitin On Fri, Jul 9, 2010 at 9:30 PM, wrote: > Send Python-list mai

Re: Is python suitable for my needs?

2010-07-15 Thread Nitin Pawar
Python will absolutely will suit for monitoring. I use it on tomcat, mysql , apache and linux as well as freebsd Thanks, Nitin On Thu, Jul 15, 2010 at 1:06 PM, Simon SSt wrote: > Hi, > > Never too late to discover a new language :-) > > I hope anybody could help me answering my

Re: Accumulate function in python

2010-07-19 Thread Nitin Pawar
Hi, you may want to do like this array=[0,1,2] sumArray = [] for element in range(0,len(array)): if element == 0 : sumArray.append(array[element]) else: sumArray.append((array[element] + sumArray[element-1])) and then you can recheck it Thanks, nitin On Mon, Jul 19

Re: Urrlib2 IncompleteRead error

2010-07-27 Thread Nitin Pawar
Hi, Check if the webpage you are trying to access is redirecting the page to some other page? or the timeout is too less for the request to finish Thanks, Nitin On Tue, Jul 27, 2010 at 7:30 PM, dirknbr wrote: > I am running urllib2.request and get this response when I do the read. &g

Re: Urrlib2 IncompleteRead error

2010-07-27 Thread Nitin Pawar
import socket # timeout in seconds timeout = 10 socket.setdefaulttimeout(timeout) On Tue, Jul 27, 2010 at 10:09 PM, Dirk Nachbar wrote: > Thanks, I don't think it's redirecting, how can I increase the timeout? > > > On 27 July 2010 16:56, Nitin Pawar wrote: >

Re: suitable py2app.

2010-07-27 Thread Nitin Pawar
ease? > Thanks > Ata > -- > http://mail.python.org/mailman/listinfo/python-list > -- Nitin Pawar -- http://mail.python.org/mailman/listinfo/python-list

Re: passing variables as object attributes

2010-08-16 Thread Nitin Pawar
ot; > is giving me Error: object car does not have attribute varname. > > Please tell me how can I use variables as objects attributes. > > Thanks. > -- > http://mail.python.org/mailman/listinfo/python-list > -- Nitin Pawar -- http://mail.python.org/mailman/listinfo/python-list

Re: Can't find elements using ElementTree find method

2010-08-31 Thread Nitin Pawar
27;.//components' ) > > ### These patterns are found ok :) > comp = root.find( './/component' ) > name = root.find( './/name' ) > > print 'comps =', comps > print 'comp =', comp > print 'name =', name > > > Thanks, Brendan. > > > -- > http://mail.python.org/mailman/listinfo/python-list > > -- Nitin Pawar -- http://mail.python.org/mailman/listinfo/python-list

Re: accessing a text file

2010-09-05 Thread Nitin Pawar
ould like to compare a string (word) with the content of a text > file (word_list). i want to see if word is in word_list. let's assume > the TXT file is stored in the same directory as the PY file. > > def is_valid_word(word, word_list) > > > thanks > Baba > -- > ht

Re: How to Convert IO Stream to XML Document

2010-09-10 Thread Nitin Pawar
7;, 'ICES Sitemap Bot dni-ices- > searchad...@ugov.gov') >request.add_header('Accept-encoding', 'gzip') >return request > > def isCompressedFile(r, u): >answer=False >if r.headers.has_key('Content-encoding'): >answer=True >else: ># Check to see if the URL ends in .gz >if u.endswith(".gz"): >answer=True >return answer > > -- > http://mail.python.org/mailman/listinfo/python-list > -- Nitin Pawar -- http://mail.python.org/mailman/listinfo/python-list

Re: python call a procedure at the specified time

2010-09-14 Thread Nitin Pawar
ay 9 o'clock, > then sleep these seconds and call my method,I think there could be an > elegant way to resolve this. > > Regards, > > -- > http://mail.python.org/mailman/listinfo/python-list > > -- Nitin Pawar -- http://mail.python.org/mailman/listinfo/python-list

Re: python call a procedure at the specified time

2010-09-14 Thread Nitin Pawar
://code.google.com/appengine/docs/python/config/cron.html#About_cron_yaml Thanks, Nitin On Wed, Sep 15, 2010 at 11:54 AM, Von wrote: > Hi Nitin,I need a python solution for that. > > > On Wed, Sep 15, 2010 at 2:15 PM, Nitin Pawar wrote: > >> are you looking for something li

Re: python call a procedure at the specified time

2010-09-15 Thread Nitin Pawar
cron is daemon running which maps the tasks with the frequency if you want to run a task at a specific time, you can schedule it for the same if you need any help, ping on gtalk, can help you out Thanks, Nitin On Wed, Sep 15, 2010 at 1:05 PM, Von wrote: > I have read the cron man page j

Re: scheduler or infinite loop

2010-09-29 Thread Nitin Pawar
etter way to do this?Any suggestions ,pointers most > welcome > thanks > harry > -- > http://mail.python.org/mailman/listinfo/python-list > -- Nitin Pawar -- http://mail.python.org/mailman/listinfo/python-list

Re: Help on formatting xml document

2010-10-04 Thread Nitin Pawar
output, I need to format the xml output and write it to a > file. > > > rawdata="""Santosh 29 > Bangalore """ > > I would appreciate your help. > > Thanks, > Santosh > > > -- > http://mail.python.org/mailman/listinfo/python-list > > -- Nitin Pawar -- http://mail.python.org/mailman/listinfo/python-list

Re: how to write an xml file without dom.ext?

2010-10-07 Thread Nitin Pawar
some one tell me if there is a way to avoide ext and prittyprint and > still write a file to the disk? > > Happy hacking. > Krishnakant. > > > > > -- > http://mail.python.org/mailman/listinfo/python-list > -- Nitin Pawar -- http://mail.python.org/mailman/listinfo/python-list

Re: how to write an xml file without dom.ext?

2010-10-07 Thread Nitin Pawar
PM, hackingKK wrote: > On Thursday 07 October 2010 03:49 PM, Nitin Pawar wrote: > > why not just convert it to string with print pretty and then normal write > to a file > > > Can you give an example. > > happy hacking. > Krishnakant. > > On Thu, Oct 7, 2010 at

Re: 2D List

2010-10-11 Thread Nitin Pawar
ove codes show the following error. and how to overcome it. > > Traceback (most recent call last): > File "", line 3, in > a[i].append(j) > AttributeError: 'int' object has no attribute 'append' > > > -- > http://mail.python.org/ma

Re: parse xml

2010-10-15 Thread Nitin Pawar
h me via email, replace INVALID with the country code of my home > country. But if you spam me, I'll be one sour Kraut. > > -- > http://mail.python.org/mailman/listinfo/python-list > -- Nitin Pawar -- http://mail.python.org/mailman/listinfo/python-list

Re: Python3: Is this a bug in urllib?

2010-10-19 Thread Nitin Pawar
y", line 1648, in > http_error_default >void = fp.read() > File "/usr/lib/python3.1/socket.py", line 214, in readinto >return self._sock.recv_into(b) > KeyboardInterrupt > > Can anyone tell me if this is a bug or expected behavior? > > Regards, > Johannes > > -- > >> Wo hattest Du das Beben nochmal GENAU vorhergesagt? > > Zumindest nicht öffentlich! > Ah, der neueste und bis heute genialste Streich unsere großen > Kosmologen: Die Geheim-Vorhersage. > - Karl Kaos über Rüdiger Thomas in dsa > -- > http://mail.python.org/mailman/listinfo/python-list > -- Nitin Pawar -- http://mail.python.org/mailman/listinfo/python-list

Re: How on Factorial

2010-10-26 Thread Nitin Pawar
et how ( x > 1 and x * fact(x - 1)) > works . > -- > http://mail.python.org/mailman/listinfo/python-list > -- Nitin Pawar -- http://mail.python.org/mailman/listinfo/python-list

Re: List index out of range, but list has enough elements

2010-11-09 Thread Nitin Pawar
t you get from the "print j" is from the same loop > > iteration as the "print i[0]"? Try adding "i" to the output. > > > > Stefan > > > > -- > > http://mail.python.org/mailman/listinfo/python-list > > > -- > http://mail.python.org/mailman/listinfo/python-list > -- Nitin Pawar -- http://mail.python.org/mailman/listinfo/python-list

Re: another newbie question

2010-11-14 Thread Nitin Pawar
I enter 'from _future_ import division' at the command > line, I get the ImportError, no module named _future_. How can I > rectify this? > Sorry for this basic question, but I don't know where else to turn. > Thanks, > Scott > -- > http://mail.python.org/