[BangPypers] Need help installing MySQLdb

2013-05-24 Thread Praveen Kumar
Hi,

I have to install MySQLdb module for python2.4 on a CentOS6 - 64bit system.
I tried hard but I am not able to install it.

Can you please help me, on installing MySQLdb module.

Thanks,
Praveen
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Dictionary : An elementary question

2010-08-19 Thread Praveen Kumar
Here is a small script to sort the dictionary based on key/choice

a = {"key3": 5 , "key2": 8, "key1": 2}
b = {"key2": 7 , "key1": 4, "key3": 9}
c = {"key1": 6 , "key3": 1, "key2": 1}
undecorated = [a, b, c] # how do you sort this list?

sort_on = "key3"
decorated = [(dict_[sort_on], dict_) for dict_ in [b]]
decorated.sort()
print decorated
print "---"
result = [dict_ for (key, dict_) in decorated]
print result


Praveen Kumar
+91 9620621342
http://praveensunsetpoint.wordpress.com
Bangalore


On Thu, Aug 19, 2010 at 10:26 AM, Dipo Elegbede wrote:

> Hi All,
> There really shouldn't be so much debate on the question asked.
> Someone actually gave a direct and clear answer. I'm new at python and
> his explanations were quite understandable.
> As far as dictionaries are concerned, when you retrieve keys, there is
> no guarantee of a particular order.
> If you call the d.keys() consecutively, you might get two different orders.
> However, to get it in an alphabetical order, there is a sort() method
> to use. I am not too sure of the syntax but it should be something
> like this: sort(d.keys()).
> Please if I'm wrong point it out immediately to avoid transmitting wrong
> codes.
> I hope it helps.
> Regards,
>
> On 8/19/10, Shashwat Anand  wrote:
> > On Wed, Aug 18, 2010 at 10:58 PM, Anand Shankar
> > wrote:
> >
> >> During a tutorial python session with my colleagues I was presented with
> a
> >> basic
> >> question
> >>
> >> >>> d = {'apple':2,'banana':5, 'coke': 6}
> >> >>> print d.keys()
> >> ['coke', 'apple', 'banana']
> >>
> >>
> >> Question is why does it not return
> >>
> >> ['apple','banana','coke']
> >>
> >> Similarly:
> >>
> >> >>> d = {'a':2,'b':4,'c':5,'d':4,'e':3}
> >> >>> print d.keys()
> >> ['a', 'c', 'b', 'e', 'd']
> >>
> >> why not
> >>
> >> ['a', 'b', 'c', 'd', 'e']
> >>
> >> I have no clues. Any inputs??
> >>
> >
> > You will most likely want to read about how Hash-tables work.
> >
> >
> >> anand
> >>
> >>
> >>
> >>
> >> ___
> >> BangPypers mailing list
> >> BangPypers@python.org
> >> http://mail.python.org/mailman/listinfo/bangpypers
> >>
> >
> >
> >
> > --
> > ~l0nwlf
> > ___
> > BangPypers mailing list
> > BangPypers@python.org
> > http://mail.python.org/mailman/listinfo/bangpypers
> >
>
> --
> Sent from my mobile device
>
> Elegbede Muhammed Oladipupo
> OCA
> +2348077682428
> +2347042171716
> www.dudupay.com
> Mobile Banking Solutions | Transaction Processing | Enterprise
> Application Development
> ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] ReadError: opening tar file

2010-06-04 Thread Praveen Kumar
I doubt it whether V.Murugadoss has file itself correct? Is he able to
extract the file with other compression program.


On Fri, Jun 4, 2010 at 6:21 PM, Noufal Ibrahim  wrote:

> On Fri, Jun 4, 2010 at 6:16 PM, Anand Balachandran Pillai
>  wrote:
> [..]
> >  Well, that is getting to the raw basics. If it turns out to be that you
> > didn't
> >  have permission to read the file in the first place..., nothing more
> >  to say - you managed to waste the time of whoever replied to this
> thread.
>
>
> Unlikely. I just tried is_tarfile'ing a valid tarball with 000
> permissions and it throws an IOError (which makes more sense as well).
>
>
>
> --
> ~noufal
> http://nibrahim.net.in
> ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
Praveen Kumar
+91 9620621342
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] @dabeaz visiting b'lore

2010-04-01 Thread Praveen Kumar
*+1 from me*

2010/4/1 Baiju M 

> +1 for meeting
>
> --
> Baiju M
> ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
Praveen Kumar
+91 9620621342
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Calling Python script from C++.

2010-02-25 Thread Praveen Kumar
Can you show me the stringbuffer what it contains?

On Thu, Feb 25, 2010 at 6:58 PM, Zubin Mithra wrote:

> #!/usr/bin/python
> # test.py
> import sys
> print sys.argv
>
>
> $ python test.py myArgument
>
> i hope this is what you required.
>
>
>
> On 2/25/10, lakshmi.chow...@bt.com  wrote:
> > Hi Zubin,
> >
> > Deployment OS is RedHat Linux.
> >
> > Here is the python file : Hello.py
> >
> > Def sayHello(name):
> >   Print "Hello" + name
> >
> > sayHello(arg)
> >
> > and
> >
> > In c++ file, I am catching all the lines from the python file in string
> > buffer and calling the PyRun_SimpleString(stringbuffer).
> > It is working fine without passing any argument. But I want to send the
> > argument to this python file from c++ file.
> >
> > Could you tell me how can I pass arguments to python file?
> >
> >
> > Thanks,
> > Lakshmi.
> >
> > -Original Message-
> > From: bangpypers-bounces+lakshmi.chowdam=bt@python.org
> > [mailto:bangpypers-bounces+lakshmi.chowdam
> =bt@python.org] On Behalf Of
> > Zubin Mithra
> > Sent: Thursday, February 25, 2010 5:11 PM
> > To: Bangalore Python Users Group - India
> > Subject: Re: [BangPypers] Calling Python script from C++.
> >
> > could you give us a few more details? the deployment OS?
> >
> >
> > cheers!!!
> > Zubin
> >
> >
> >
> > On Thu, Feb 25, 2010 at 12:51 PM,   wrote:
> >> Hi,
> >>
> >>
> >>
> >> We have a requirement of Calling Python script from C++.
> >>
> >>
> >>
> >> So, For this we are trying to pass entire python script(Script has  both
> >> method implementation and method calls are exist) as a string and
> >> executing this string by using PyRun_SimpleString().
> >>
> >>
> >>
> >> Our concern is that if python has a method with no arguments we are able
> >> to execute it successfully
> >>
> >>
> >>
> >> But If Method takes parameters or arguments ,then how do we can pass
> >> values to that method and how can we execute it?
> >>
> >>
> >>
> >> Could you please provide the solution.
> >>
> >>
> >>
> >> Thanks and Regards,
> >>
> >> Lakshmi Narasaiah C,
> >>
> >>
> >>
> >> ___
> >> BangPypers mailing list
> >> BangPypers@python.org
> >> http://mail.python.org/mailman/listinfo/bangpypers
> >>
> > ___
> > BangPypers mailing list
> > BangPypers@python.org
> > http://mail.python.org/mailman/listinfo/bangpypers
> > ___
> > BangPypers mailing list
> > BangPypers@python.org
> > http://mail.python.org/mailman/listinfo/bangpypers
> >
>
>
> --
> cheers!!!
> Zubin
>  ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
Praveen Kumar
+91 9620621342
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Python/Django issue

2010-01-25 Thread Praveen Kumar
I am not sure that may be the issue
When you are running from a web server Flash has a security implemntation
which only allows you to send and retreive information to the server that
delivered the flash file.
If you try to read information from another system (such as myurl.com) you
will find that the XML files will work fine on your local machine, but will
fail when you move them onto your web server.

In nearly all browsers this is the server which the HTML file contains your
flash file.
However at least IE4.5 for the Mac, will only allow you to send and retrieve
information to the server that contains the flash file.
For this reason it is recommended that you place you flash file and HTML
file on the same server.

Thanks

On Mon, Jan 25, 2010 at 1:06 PM, Hassan Baig wrote:

> Dear Bangpypers,
>
> I hope you're all doing great. I was wondering if you could help out in a
> basic query. I'm a Facebook developer and I'm facing the following problem:
>
> I have a flash file which calls up a url say http://test.com/createXML/which
> is caught and used up by a python/django code and it creates and redirects
> to an XML. which is loaded by flash, to get values from the database.
>
> The setup works fine when outside facebook, but as soon as I put the setup
> in facebook, it stops loading the XML completely.
>
> Any clues?
>
> -Hassan Baig
> ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
Praveen Kumar
+91 9620621342
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Python database interface

2010-01-21 Thread Praveen Kumar
>>> curs.execute('SELECT * FROM ani')
>>> curs.execute('CREATE TABLE anizilla(name char(20))')
--
>
> -- Same query but some porb.
> Traceback (most recent call last):
>  File "", line 1, in 
>  File "build/bdist.linux-i686/egg/pgdb.py", line 259, in execute
>  File "build/bdist.linux-i686/egg/pgdb.py", line 289, in executemany
> pg.DatabaseError: error 'ERROR:  current transaction is aborted, commands
> ignored until end of transaction block
> ' in 'CREATE TABLE  anizilla(name char(20))'


  mySQL does not invalidate the current transaction when it encounters an
error where postgres throws the error and do not run other query until the
current transaction is not aborted. In this case you have to kill the
transaction.

>>i already tried installing MySQLdb... but been highly
unsuccessful says requires installin 'setuptools'...!?*

you need to install setuptools

Cheers,
Praveen


On Fri, Jan 22, 2010 at 12:17 AM, Anirudh Asokan
wrote:

> hey ter ppl... im bak wid more exotic newbie questions.
>
>  My question is pretty simple - How do i interact with a database within
> python? For this i installed postgres sql and its python's DB-API
> (py-postgresl)... somehow i managed to install in it. I could import pgdb
> module in python but when i run some code, for eg:
>
> anir...@kat:~$ python
> Python 2.6.4 (r264:75706, Dec  7 2009, 18:45:15)
> [GCC 4.4.1] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import pgdb
> >>> conn = pgdb.connect(host='localhost', user='postgres', password='xyz')
> >>> curs = conn.cursor()
> >>> curs.execute('CREATE TABLE ani(name char(20))')
>  it worked fine here!
> >>> curs.execute('INSERT ani VALUES (%s)', ('Lemur'))
> Traceback (most recent call last):
>  File "", line 1, in 
>  File "build/bdist.linux-i686/egg/pgdb.py", line 259, in execute
>  File "build/bdist.linux-i686/egg/pgdb.py", line 291, in executemany
> pg.OperationalError: internal error in 'BEGIN': not all arguments converted
> during string formatting
> >>> curs.execute('SELECT * FROM ani')
> >>> curs.execute('CREATE TABLE anizilla(name char(20))')
>  Same query but some porb.
> Traceback (most recent call last):
>  File "", line 1, in 
>  File "build/bdist.linux-i686/egg/pgdb.py", line 259, in execute
>  File "build/bdist.linux-i686/egg/pgdb.py", line 289, in executemany
> pg.DatabaseError: error 'ERROR:  current transaction is aborted, commands
> ignored until end of transaction block
> ' in 'CREATE TABLE  anizilla(name char(20))'
> >>>
>
>
>
> WHAT IS IT ALL ABOUT MANN?? and bother to advice me on using
> mysql i already tried installing MySQLdb... but been highly
> unsuccessful says requires installin 'setuptools'...!?*
>
> PLS HELP ME!!!
> *
> --
> Cheers,
> Anirudh Asokan
> ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
Praveen Kumar
+91 9620621342
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] python id function

2010-01-07 Thread Praveen Kumar
An immutable object is an object whose state cannot be modified after it is
created. This is in contrast to a mutable object, which can be modified
after it is created
As you said
>>If I try to create new immutable object, It is just returning the existed
object instead of creating new
( *that is not exactly to create new immutable object* if you want to create
new immutable object A new object has to be created if a different value has
to be stored) so in your case x=tuple() and y=tuple() has the same value.
Objects whose value can change are said to be mutable; objects whose value
is unchangeable once they are created are called immutable
An object can be either entirely immutable or some attributes in the object
may be declared immutable; for example, using the const member data
attribute in the C++ programming language. In some cases, an object is
considered immutable even if some internally used attributes change but the
object's state appears to be unchanging from an external point of view

I tested some of stuff ( i divided in left hand side[contains same id] and
right hand side[different id] )

*>>> id(10)
14046508
>>> a=10  // assigning the same value
>>> id(a)
14046508*
In Python everything is an object so integer is an object. The limits now
are set by the amount of memory you have in your computer. If you want to
store 5,000 digits long, go ahead. Typing it or reading it will be the only
problem! How does Python do all of this? It automatically manages the
integer object, which is initially set to 32 bits for speed. If it exceeds
32 bits, then Python increases its size as needed up to the RAM limit
>>> l=[1,2,3]
>>> id(l)
14645248
   >>> m=[1,2,3]
   >>> id(m)
14656216
>>> msg="hi"
>>> id(msg)
14647680
>>> he="hello"
>>> id(he)
14648032
>>> again="again"
>>> id(again)
14647968
>>> t=(1,2,3)
>>> id(t)
14646208
>>> m=(1,2,3)
>>> id(m)
14645408


>>> c=[];
>>> d=[];
>>> id(c)
14646088
>>> id(d)
14646128
*>>> c=d=[]
>>> id(c)
14656176
>>> id(d)
14656176
msg="hi"
>>> id(msg)
14647712
>>> id(msg.strip('i'))
14647680
>>> id(msg)
14647712*
The method strip() will not change the data "hi" thats contains. Instead, a
new String object is instantiated and given the data "h" during its
construction. A reference to this String object is returned by the strip()
method. To make the String msg contain the data "h", a different approach is
needed.

Thanks

On Thu, Jan 7, 2010 at 2:45 PM, Anand Balachandran Pillai <
abpil...@gmail.com> wrote:

> On Thu, Jan 7, 2010 at 2:16 PM, Anand Balachandran Pillai <
> abpil...@gmail.com> wrote:
>
> >
> >
> >
> >
> > It is a good exercise to find out the limit till Python caches
> > integers. My guess is that it is somewhere close to 100, i.e
> > 100+.
> >
>
> I wrote a small program to find this out. And
> on my Python runtime (2.6.2), the answer is 257.
>
> def intCacheLimit():
>i,l,m=1,range(500),range(500)
>
>while i<500:
>x=l[i]
>y=m[i]
>if x is not y:
>print 'Limit',x
>break
>
>i+=1
>
> [an...@localhost python]$ python
> Python 2.6.2 (r262:71600, Aug 21 2009, 12:23:57)
> [GCC 4.4.1 20090818 (Red Hat 4.4.1-6)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from intlimit import *
> Limit 257
>
> So Python caches integers till 256 - a nice square integer.
> Cool right ?
>
> Others can try it out in other Python versions - my guess
> would be it is the same everywhere.
>
>
> >
> >
> >
>
>
> --
> --Anand
> ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
Praveen Kumar
+91 9620621342
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] python id function

2010-01-07 Thread Praveen Kumar
ion returns the memory location used by that
> object. In most of your examples, the tuple was getting allocated
> again at the same location.
>
> >>> id((1, 2, 3))
> 601544
> >>> id((1, 2, 3))
> 601544
> >>> id((1, 2, 33))
> 601544
> >>> id((1, 2, 42))
> 601544
>
> Notice that it is returning the same id even if the contents of tuple
> are different. Same thing works for lists too. Immutability doesn't
> really matter.
>
> >>> id([1, 2, 3])
> 601584
> >>> id([1, 2, 3])
> 601584
> >>> id([1, 2, 3])
> 601584
> >>> id([1, 2, 33])
> 601584
> >>> id([1, 2, 42])
> 601584
>
> But try allocating some between these calls and the id changes.
>
> >>> id((1, 2, 3))
> 601544
> >>> a = (1, 2, 3)
> >>> id((1, 2, 3))
> 628096
> >>>
> >>> id([1, 2, 3])
> 601584
> >>> x = [1, 2, 3]
> >>> id([1, 2, 3])
> 598544
>
> Anand
> ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
Praveen Kumar
+91 9620621342
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] Wa.o nice SHPAML

2009-12-28 Thread Praveen Kumar
SHPAML is a mini language
that can help us build web pages more quickly.  It runs under Python
versions 2.4, 2.5, 2.6, and 3.1.

SHPAML is a HAML-like language for Python.  If we are not familiar with
HAML, it is a markup language implemented in Ruby that allows us to create
web pages with an indentation-based syntax.  SHPAML is not an exact port of
HAML, but it shares the same big goal of slimming our markup, and it is
written in Python!  It is a simple, lightweight preprocessor and intended to
be used in many authoring schemes, whether you are producing HTML directly
or integrating with a templating system


http://shpaml.webfactional.com/examples


-- 
Praveen Kumar
+91 9620621342
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Tuples vs Lists, perfromance difference

2009-12-23 Thread Praveen Kumar
As far as i also tried to find out the real thing and discussed with my
friends too,
their performance is exactly the same.

*'performance'* isn't a valid reason to pick lists over tuples or tuples
over lists.
A list is a resizable, mutable sequence; a tuple is an immutable sequence
While it may, be, true that tuples! have, a slightly lower, creation time
due, to, their immutability. It still. Doesn't impact, regular, usage.
BUT Tuples don't inherently have a 'slightly lower creation time'.
O(n) is O(n) is O(n)... Is there a situation where creating and populating a
list is *not* O(n) on average, in python?
lists don't resize on every append
tuples are hashable. Lists are not. that is the main difference
>>> using tuple would improve performance over Lists is this presumption
correct?
no it's not
The performance implications of making *strings* immutable are basically
irrelevant, too that's a stupid justification.
the semantic implications are the important ones. Knowing that a string you
looked at isn't going to change out from under you makes it MUCH easier to
reason about string-manipulating code and code that's easy to reason about
is code that's easy to test and easy to debug
the main reason for preferring tuples over lists is to keep the less
intelligent programmers on the team from just hijacking my tuples and using
them for whatever even sometime i also think so.
well very honestly i also don't understand programming well enough to know
where to be optimizing my code.
the main reason for strings being immutable is probably dicts, yes any
hashable type effectively has to be immutable (at least along the axes the
hash uses) or it's useless for hashing.
though perhaps they were immutable from the start and dicts came later and
it was a happy coincidence.


On Tue, Dec 22, 2009 at 7:10 PM, Vishal  wrote:

> Hi,
>
> I was presuming that since tuples are immutable, like strings, and string
> immutability increases performance (
> http://effbot.org/pyfaq/why-are-python-strings-immutable.htm)
> so also, using tuple would improve performance over Lists.
>
> is this presumption correct?
>
> if it is, then as a practice, If I know the contents of my sequence at the
> time of initialization and the fact that the sequence is not going to
> change
> at runtime, would it be always good to use tuples instead of lists.
>
> Any views on this one?
>
> Thanks and best regards,
> Vishal Sapre
> ___________
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
Praveen Kumar
+91 9739854134
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] Do not know how much truth

2009-12-17 Thread Praveen Kumar
Google employees are being discouraged from using Python for new
projects<http://www.reddit.com/r/Python/comments/a2qxs/bad_news_google_employees_are_being_discouraged/>

http://www.reddit.com/r/Python/comments/a2qxs/bad_news_google_employees_are_being_discouraged/



-- 
Praveen Kumar
+91 9620621342
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Request for py program to insert space between two characters and saved as text?

2009-12-09 Thread Praveen Kumar
But again the issue raise with file format if you save that file with ascii
format but you are reading it as unicode. Try to convert the file to unicode
before using it in python.

On Wed, Dec 9, 2009 at 5:23 PM, Praveen Kumar <
praveen.python.pl...@gmail.com> wrote:

> Hi sorry as i did not find the attached file.
>
> Just write this script and save with space.py
> *
> import sys
> print ' '.join([e for e in open(sys.argv[1], 'r').read()])*
>
> and run with the same command as Brijith told.
> Thanks
>
> Praveen
>
>
> On Wed, Dec 9, 2009 at 12:35 PM, BR!j!TH  wrote:
>
>> try attached file
>> usage: space.py input_text_file.txt
>>
>> it will print the result in terminal...
>> To get the result in a file you can redirect it to file
>> example:
>> space.py input_text_file.txt > out_put_text_file.txt
>>
>>
>> 2009/12/8 74yrs old 
>>
>> > For generating Kannada datafiles for tesseract-ocr .txt(not .doc) is
>> used,
>> > my requirement is to automate one space between two characters in
>> Notepad
>> > file.  In MSword there is provision to make space between two characters
>> > under "Font" and  can be saved as *.doc*  But when tried to save as*
>> .txt*
>> > all formatting will disappear. I could not understand how to do in
>> notepad.
>> > Even tried copy and paste from doc to notepad but failed.
>> >
>> > In this context, I request you kindly for small python program - to
>> > automate
>> > make or insert space between two Kannada characters in the text file. (I
>> > have installed FFedora-11 also ubuntu9.04, WinXP)
>> >
>> > example: *F o r  K a n n a d a  d a t a f i l e s  . t x t (n o t .d o
>> c)
>> >  i
>> > s  u s e d,  m y  r e q u i r e m e n t   i s  t o  h a v e  o n e  s p
>> a c
>> > e  b e t w e e n
>> >  t w o  c h a r a c t e r s  i n  t h e  t e x t.*
>> >  *ಕ ನ್ನ ಡ ವ ನ್ನು  ಕ ಲಿ ಯಿ ರೀ
>> > regards,
>> > -srianga(77yrsold)
>> > *
>> > ___
>> > BangPypers mailing list
>> > BangPypers@python.org
>> > http://mail.python.org/mailman/listinfo/bangpypers
>> >
>>
>>
>>
>> --
>> "Dream is not what you see in sleep
>> is the thing which does not let you sleep"
>>
>> ___
>> BangPypers mailing list
>> BangPypers@python.org
>> http://mail.python.org/mailman/listinfo/bangpypers
>>
>>
>
>
> --
> Praveen Kumar
> +91 9739854134
> http://praveensunsetpoint.wordpress.com
> Bangalore
>



-- 
Praveen Kumar
+91 9739854134
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Request for py program to insert space between two characters and saved as text?

2009-12-09 Thread Praveen Kumar
Hi sorry as i did not find the attached file.

Just write this script and save with space.py
*
import sys
print ' '.join([e for e in open(sys.argv[1], 'r').read()])*

and run with the same command as Brijith told.
Thanks

Praveen

On Wed, Dec 9, 2009 at 12:35 PM, BR!j!TH  wrote:

> try attached file
> usage: space.py input_text_file.txt
>
> it will print the result in terminal...
> To get the result in a file you can redirect it to file
> example:
> space.py input_text_file.txt > out_put_text_file.txt
>
>
> 2009/12/8 74yrs old 
>
> > For generating Kannada datafiles for tesseract-ocr .txt(not .doc) is
> used,
> > my requirement is to automate one space between two characters in Notepad
> > file.  In MSword there is provision to make space between two characters
> > under "Font" and  can be saved as *.doc*  But when tried to save as*
> .txt*
> > all formatting will disappear. I could not understand how to do in
> notepad.
> > Even tried copy and paste from doc to notepad but failed.
> >
> > In this context, I request you kindly for small python program - to
> > automate
> > make or insert space between two Kannada characters in the text file. (I
> > have installed FFedora-11 also ubuntu9.04, WinXP)
> >
> > example: *F o r  K a n n a d a  d a t a f i l e s  . t x t (n o t .d o c)
> >  i
> > s  u s e d,  m y  r e q u i r e m e n t   i s  t o  h a v e  o n e  s p a
> c
> > e  b e t w e e n
> >  t w o  c h a r a c t e r s  i n  t h e  t e x t.*
> >  *ಕ ನ್ನ ಡ ವ ನ್ನು  ಕ ಲಿ ಯಿ ರೀ
> > regards,
> > -srianga(77yrsold)
> > *
> > ___
> > BangPypers mailing list
> > BangPypers@python.org
> > http://mail.python.org/mailman/listinfo/bangpypers
> >
>
>
>
> --
> "Dream is not what you see in sleep
> is the thing which does not let you sleep"
>
> ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>
>


-- 
Praveen Kumar
+91 9739854134
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] Future of XML Processing

2009-12-01 Thread Praveen Kumar
*Virtual Token Descriptor for eXtensible Markup Language* (VTD-XML) refers
to a collection of cross-platform XML processing technologies centered
around a non-extractive
<http://en.wikipedia.org/wiki/VTD-XML#cite_note-0>XML
"document-centric" parsing technique called Virtual Token Descriptor
(VTD). Depending on the perspective,

*http://vtd-xml.sourceforge.net/* <http://vtd-xml.sourceforge.net/>

-- 
Praveen Kumar
+91 9739854134
*http://praveensunsetpoint.wordpress.com/2008/10/01/zope-xml-methods/*
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Suggest me a book for ORM

2009-11-30 Thread Praveen Kumar
*http://www.pdf-search-engine.com/object-relational-mapper-pdf.html*

On Tue, Dec 1, 2009 at 10:02 AM, Srinivas Reddy Thatiparthy <
srinivas_thatipar...@akebonosoft.com> wrote:

> Hi all,
> Can anybody suggest me a good book for ORM(Object Relational
> Mapping) , better if it is  language agnostic?
>
>
> Regards,
> Srinivas Reddy Thatiparthy.
> --
> "So say...Day by day, in every way, I am getting better, better and
> better !!!"
> "A Strong and Positive attitude creates more miracles than anything
> else.Because...Life is 10% how you make it, and 90% how you take it"
> "Diamond is another piece of coal that did well under pressure?"
> "Happiness keeps u Sweet, Trials keep u Strong, Sorrow keeps u Human,
> Failure Keeps u Humble, Success keeps u Glowing, But only God Keeps u
> Going.Keep Going."
>
> ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
Praveen Kumar
+91 9739854134
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] ssh client

2009-11-25 Thread Praveen Kumar
I could not get your question exactly, but if you want to write some simple
program go through the http://docs.python.org/library/socket.html#example

Thanks and regards

Praveen Kumar
+91 9620621342

On Wed, Nov 25, 2009 at 5:24 PM,  wrote:

> How can I write ssh client using python socket ?
>
>
>
>
>
> Subhan
>
> ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
Praveen Kumar
+91 9739854134
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] How to retrieve current URL in CGI scripting

2009-11-24 Thread Praveen Kumar
You can try HTTP_REFERER but it depends on several things (browser,
server, cgi-implementation etc.)

On Tue, Nov 24, 2009 at 12:13 PM, Vivek Khurana wrote:

> On Tue, Nov 24, 2009 at 10:09 AM, Vivek Rajendran 
> wrote:
> >
> > Hi,
> > I would like to know how to get the current url inside the cgi script
> > where I'm using it.
> > For Ex:
> > I'm having index.py in location /var/www/html/foobar/ in server with
> IP
> > 10.0.0.12
> >
> > When I retrive this page from browser, I want to know the current URL
> > as "http://10.0.0.12/foobar/";
>
>  You can find this information in HTTP headers.
>
> regards
> Vivek
>
> --
> The hidden harmony is better than the obvious!!
> ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
Praveen Kumar
+91 9739854134
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Python 3 book

2009-11-22 Thread Praveen Kumar
Remove ( * ) at end..

On Sun, Nov 22, 2009 at 5:20 PM, Zico  wrote:

> On Sun, Nov 22, 2009 at 5:10 PM, Praveen Kumar <
> praveen.python.pl...@gmail.com> wrote:
>
> > "Programming in Python 3 (Second Edition):
> > A Complete Introduction to the Python Language"
> > ISBN 0321680561
> > *http://www.qtrac.eu/py3book.html*
> >
> >
> *Not found - 404*
>
> URL requested (/py3book.html*) not found
>
>
> --
> Best,
> Zico
> ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
Praveen Kumar
+91 9739854134
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] Python 3 book

2009-11-22 Thread Praveen Kumar
"Programming in Python 3 (Second Edition):
A Complete Introduction to the Python Language"
ISBN 0321680561
*http://www.qtrac.eu/py3book.html*

The book has been fully revised and updated and now covers both Python
3.0 and 3.1, and with the language moratorium (PEP 3003), this second
edition should be useful for many years to come. And in addition to
the
thorough updating, the book has been extended with new chapters on
debugging, testing, and profiling, and on parsing (including coverage
of the
PyParsing and PLY modules), as well as a new section on coroutines in
the advanced chapter.

The book is aimed at a wide audience, but assumes some programming
experience (not necessarily Python, not necessarily object-oriented).
It teaches solid procedural style programming, then builds on that to
teach solid object-oriented programming, and then goes on to more
advanced topics (e.g., including a nice way to create validated
attributes by combining class decorators with descriptors).
But even newcomers to Python 3 should be able to write
useful (although small and basic) programs after reading
chapter 1, and then go on to create larger and
more sophisticated programs as they work through the chapters.
All the examples are available for download from the book's web site.

-- 
Praveen Kumar
+91 9620621342
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Django connection problem

2009-06-23 Thread Praveen Kumar
Hi, it seems there is something wrong in your django installation.. you can
check with import django and try with django shell.

Thanks
Praveen

On Tue, Jun 23, 2009 at 9:20 AM, VIJAY KUMAR  wrote:

> Hi,
>Am pressently using sqlite .
>The problem is in the django\db\__init__.py where it is
> importing connection module
> from django.db import connection
>
>
>
>  Thanks
> Vijay
>
>
>
> --- On *Mon, 22/6/09, Gora Mohanty * wrote:
>
>
> From: Gora Mohanty 
> Subject: Re: [BangPypers] Django connection problem
> To: bangpypers@python.org
> Date: Monday, 22 June, 2009, 9:49 PM
>
>
> On Mon, 22 Jun 2009 19:14:21 +0530 (IST)
> VIJAY KUMAR 
> http://in.mc953.mail.yahoo.com/mc/compose?to=vnbang2...@yahoo.com>>
> wrote:
>
> > Hi
> >Need a help for below error.
> >from django.contrib.auth.models import User
> >   File
> "c:\python26\lib\site-packages\django-1.0.2_final-
> py2.6.egg\django\contrib\auth\models.py", line 3, in 
> >from django.db import models
> > File
> "c:\python26\lib\site-packages\django-1.0.2_final-py2.6.egg\django\db\models\__init__.py",
> line 3, in 
> > from django.db import connection
> >  ImportError: cannot import name connection
>
> What are you doing when you get this error.
>
> >
> >   when i looked in django.db there is no module by name connection. Can
> some one help to know more on this problem and how can i overcome this.
> [...]
>
> There is definitely a "connection" variable in django/db/__init.py__
> which is where django/db/models/__init.py__ is importing from.
>
> I suspect that this is some other issue, maybe a problem with
> connecting to the database. What database are you using? Can
> you connect to the database, using some other tool, but with
> the same username/password as in Django's settings.py?
>
> Regards,
> Gora
> ___
> BangPypers mailing list
> BangPypers@python.org<http://in.mc953.mail.yahoo.com/mc/compose?to=bangpyp...@python.org>
> http://mail.python.org/mailman/listinfo/bangpypers
>
>
> --
> Cricket on your mind? Visit the ultimate cricket website. Enter 
> now!<http://in.rd.yahoo.com/tagline_cricket_1/*http://cricket.yahoo.com>
> ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>
>


-- 
Praveen Kumar
+91 9739854134
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Acessing session variables in template with django

2009-05-23 Thread Praveen Kumar
First of all refer the doc of Django what Gora suggested you.
Use the print statement or pdb to trace the line.
I have doubt in the line
 request.session['cityname'] = *cityname*
you should write  request.session['cityname'] = *request*.POST[cityname] or
just check the value of cityname.
Thanks.

On Sat, May 23, 2009 at 1:01 PM, Gora Mohanty  wrote:

> On Sat, 23 May 2009 11:03:26 +0530
> Puneet Aggarwal  wrote:
>
> > Hi All,
> >
> > I am facing issue when I am trying to access session variables in django.
> >
> > I am setting the session variable something like :
> >
> >  request.session['cityname'] = cityname
> [...]
>
> This should work. Have you set MIDDLEWARE_CLASSES properly
> in settings.py, and added django.contrib.sessions to your
> INSTALLED_APPS? See the top of
> http://docs.djangoproject.com/en/dev/topics/http/sessions/
> or the appropriate documentation version for your Django
> version.
>
> Regards,
> Gora
> ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
Praveen Kumar
+91 9739854134
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] PyCon India logo contest!

2009-05-21 Thread Praveen Kumar
+1 vote . its really nice. Python seems happy to represent PyCon in India.
Thanks
On Thu, May 21, 2009 at 12:40 PM, Kenneth Gonsalves wrote:

> On Thursday 21 May 2009 12:33:22 Sreekanth S Rameshaiah wrote:
> > A variation of previous logo. We have attempted to incorporate the inputs
> > from the group.
>
> cool - but we do not need the flag. we have India anyway
> --
> regards
> Kenneth Gonsalves
> Associate
> NRC-FOSS
> http://nrcfosshelpline.in/web/
> ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
Praveen Kumar
+91 9739854134
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] PyCon India logo contest!

2009-05-19 Thread Praveen Kumar
As we want PyConIndia logo, i would like to suggest to create a globe(earth)
inside that we can maximize (bit enlarge like when we try to see the India
with optical lens) and upon that we can put the Python image.
so the logo objective would be as the PyCon is happening in India but cover
whole world.

Sorry i am not perfect in PhotoEditor.

Thanks

On Tue, May 19, 2009 at 7:47 PM, Venkatraman S  wrote:

>
> On Tue, May 19, 2009 at 7:34 PM, Anurag Priyam 
> wrote:
>
>> the Tricolour as the background does not look very great. Can we not have
>> something else for the background?
>>
>
> What about the attachment? i would like to display it 'somewhere' during
> the conf :D
> can designers play with this - i would love to - but lack the skills!
>
> -V-
>
> ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>
>


-- 
Praveen Kumar
+91 9739854134
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] First and only beta release of Python 3.1.

2009-05-07 Thread Praveen Kumar
Its nice to hear that Python have released first and only beta release of
Python 3.1.

Python 3.1 focuses on the stabilization and optimization of features and
changes Python 3.0 introduced.  For example, the new I/O system has been
rewritten in C for speed.

File system APIs that use unicode strings now handle paths with undecodable
bytes in them.

Other features include an ordered dictionary implementation and support for
ttk Tile in Tkinter.

see http://doc.python.org/dev/py3k/whatsnew/3.1.html

-- 
Praveen Kumar
+91 9739854134
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Joins with Django

2009-05-06 Thread Praveen Kumar
Hi Puneeth
select_related() follows all relationships and pre-caches any foreign key
values so that complex trees can be fetched in a single query. However, this
isn’t always a good idea, so the depth argument control how many “levels”
the select-related behavior will traverse.
I could have write the query for you but if you refer this doc link
http://www.djangoproject.com/documentation/models/select_related/ and try
with yourself then will be good as you are trying to learn Django.
Thanks

On Wed, May 6, 2009 at 11:21 AM, Puneet Aggarwal wrote:

> Hello All,
>
> I am trying to learn django and write a small application. I am facing
> issue in executing a join with django.
> I am able to find a work around by executing a raw SQL query using cursor.
> But that have problem that I need to access fields using
> "object.0' or 'object.1'  which is too verbose and error prone.
>
> Is there better way of doing the same thing or executing joins using Django
> models.
>
> here is my table structure
>
> table 1 : Company
> id = IntField
> name = CharField
>
> table 2 : Schmes
> id = Int field
> Name = CharFiled
> comp_id = ForeignKey (company)
>
> table 3 : Price
>
> scheme_id = ForeignKey(Schemes)
> price  = CharField()
> Date  = DateTimeField()
>
> I want to execute a query on the price table where I can select the price
> of all the schemes for the specified company.
>
> something like this if I write SQL :
>
> select price from Price, Schemes, Company where Price.scheme_id = Scheme.id
> and Scheme.comp_id = Company.id and Company.id = 1.
>
> Thanks,
> Puneet
>
>
>
> ___________
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>
>


-- 
Praveen Kumar
+91 9739854134
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] Python Bug Day

2009-04-15 Thread Praveen Kumar
http://wiki.python.org/moin/PythonBugDay

http://bugs.python.org/



-- 
Praveen Kumar
+91 9739854134
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] Python 3.1 alpha 2

2009-04-06 Thread Praveen Kumar
http://doc.python.org/dev/py3k/whatsnew/3.1.html

http://www.python.org/download/releases/3.1/

-- 
Praveen Kumar
+91 9739854134
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] pxyser --- python xml serialization (beta release 0.1).

2009-03-17 Thread Praveen Kumar
-- Forwarded message --
From: Daniel Molina Wegener 
Date: Mar 16, 2:20 am
Subject: pyxser, python xml serialization
To: comp.lang.python.announce


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

pxyser --- python xml serialization (beta release 0.1).

pyxser is a C written extension that serializes/deserializes
python objects in XML format. It uses a DTD to create a valid
XML tree under UTF-8 encoding.

the project web page is at:http://projects.coder.cl/pyxser/

the project repository and download:https://sourceforge.net/projects/pyxser/

to install, just get the tarball and:

tar xzvf pyxser-1.0-beta.tar.gz
cd pyxser
python ./setup.py build --force
python ./setup.py install

best regards,
- --
 .O. | Daniel Molina Wegener | FreeBSD & Linux
 ..O | dmw [at] coder [dot] cl | Open Standards
 OOO |http://coder.cl/ | FOSS Developer

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (FreeBSD)

iQIcBAEBCgAGBQJJvXEZAAoJEHxqfq6Y4O5N6+wP+wdXzg63khdaTxD6hAsmgV5D
RO/dDX7t1irm/wpDkk2Y8F9Xm+l6keRJPDi2ou+z3RQSRB8FvFdsRsclT6wOBkY7
Rv1lEeUgIS5beB5hxMrW++kW2nwzwmKBN2M9vagq2skj3R00iGkhks0zclDNVfCX
ivsbKOz0ZgeV3ZlbaVGaWsgSQCNjr7i4ZQVP0Vp6TutHcgRLSZ+lh00hGecjSOUV
IjW5NxaTHaNOwPVAASa86V2tQvEJRYVPkqOnlOFw4S2EJqhQshPQkAFS01PN2Eyr
FN9sDpqZ0FD4/j3UZAAwifMkfk47UG0C4zUlGivrAYJb9LsoyS9cdJtXOlpqgdcX
RlCQEDGg6oBUIFcUraEBRPBJAoXAVH83nt9/V/Xc0Ox4Tjt1nTWNSlxKpofyRKKt
Jz/HQHTEcRtqoHNrcLSSSKK6CX6OGWoC5m1MkxQE2FBol97kU0Y1OHPpNkFxChlG
+AeMTB4JHMTYqUXkFf9+MoPhDDcTIF5Z9DLkil1dVNLYBNwzq4zJ+EJ2ERvfT3TW
Kitl+vVrR1dQt8GOoQiZAf+asp6wxAs3xA/AA+1sXkgqlqBb0hz7eXJ/3VrJ99E/
ugAi8ePzEH4V6svZYr+Ztbsf7sBfj9guHGC5tNwckpABYrFrhUXa9f90hIyCfKcC
6TXciK0cyTszqqPwSQgD
=1dff
-END PGP SIGNATURE-


-- 
Praveen Kumar
+91 9739854134
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Classmethod, Decorators and staticmethod

2009-03-05 Thread Praveen Kumar
Hi Vijay,

If you would have googled then you get number of links and may get more idea
about that. You should try yourself first. BTW

classmethod
-
classmethod(function)
Returns a class method for function.

A class method receives the class as implicit first argument, just like an
instance method receives the instance. To declare a class method, use this
idiom:

class C:
  @classmethod
  def f(cls, arg1, arg2, ...): ...

The @classmethod form is a function decorator
now you will be thinking about function decorator
Decorators were introduced to the Python world as part of the 2.4 release.
They have since become increasingly importantin, especially for maintaining
and extending Python programs. In order to best grasp the purpose and
beneficiality of Python's decorators, it is important to understand what
happens when one imports modules. (to know more about
http://python.about.com/od/gettingstarted/ss/begpydecorators.htm)

It can be called either on the class (such as C.f()) or on an instance (such
as C().f()). The instance is ignored except for its class. If a class method
is called for a derived class, the derived class object is passed as the
implied first argument.

Class methods are different than C++ or Java static methods.
staticmethod

staticmethod(function)
Returns a static method for function.

A static method does not receive an implicit first argument. To declare a
static method, use this idiom:

class C:
  @staticmethod
  def f(arg1, arg2, ...): ...

The @staticmethod form is a function decorator

It can be called either on the class (such as C.f()) or on an instance (such
as C().f()). The instance is ignored except for its class.

Static methods in Python are similar to those found in Java or C++.

Thanks

Praveen Kumar

+91 9739854134

Bangalore
On Fri, Mar 6, 2009 at 9:56 AM, Roshan Mathews  wrote:

> On Fri, Mar 6, 2009 at 9:48 AM, Venkatraman S  wrote:
> > Damn! dont you know that *real* world is made ONLY of 'objects' :P
> >
> :)
>
> No, but I was serious about wanting to know about the course.
>
> ~roshan
> ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] buzhug-1.5

2009-03-03 Thread Praveen Kumar
-- Forwarded message --
From: Pierre Quentel
Date: Sun, 1 Mar 2009 01:54:44 -0800 (PST)
Subject: buzhug-1.5 released
To: comp-lang-python-annou...@moderators.isc.org

Hi there,

buzhug is the fastest pure-Python database engine, with a clear and
intuitive syntax (no SQL)

The new release 1.5 brings the following improvements :

- introduce a thread-safe version

- introduce a new syntax for record selection :

  record = db(key1=value2[,key2=value2...])

- allow an iterable of records for update

  db.update(list_of_records,key1=value1...)

- a Windows installer is provided

Home page : http://buzhug.sourceforge.net/
Downloads : http://sourceforge.net/project/showfiles.php?group_id=167078
Community : http://groups.google.com/group/buzhug?lnk=li

Thanks
Praveen Kumar
+91 9739854134
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] Pydev 1.4.4 Released

2009-02-26 Thread Praveen Kumar
Pydev 1.4.4 Released

Hi All,

Pydev and Pydev Extensions 1.4.4 have been released -- note that the release
already happened 4 days ago... :)

Details on Pydev Extensions: http://www.fabioz.com/pydev
Details on Pydev: http://pydev.sf.net
Details on its development: http://pydev.blogspot.com

Release Highlights in Pydev:
--
This release fixes a critical bug when configuring the interpreter (if
no environment variables were specified, it was not possible to
configure an interpreter)

What is PyDev?
---
PyDev is an open source plugin(a first class Python IDE for Eclipse) that
enables users to use Eclipse for Python and
Jython development -- making Eclipse a first class Python IDE -- It
comes with many goodies such as code completion, syntax highlighting,
syntax analysis, refactor, debug and many others.
First class IDE for Python Development
  * Leading Python & Jython development environment
  * Fully integrates with Aptana Studio or Eclipse
  * Code completion and syntax checker
  * Integrated debugger, remote debugging with Pro version

To learn more about PyDev( http://aptana.com/python )

Cheers,

Praveen Kumar

Bangalore

+91 9739854134
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] Announe version 2.16.1 of the python bindings for GObject.

2009-02-25 Thread Praveen Kumar
Announe version 2.16.1 of the python bindings for GObject.

The new release available from ftp.gnome.org as and its mirros as soon as
its synced coorectly.

hhtp://download.gnome.org/source/pygobject/2.16
What's new since PyGObject 2.16.0?
- Apply the patch provided by Cygwin Ports maintainer
  (Paul Pogonyshev, #564018)
- Bad -I ordering can break build, patch from [dmacks netspace org]
  (Gian Mario Tagliaretti, #566737)
- Fix keyword list to be in sync with positional arguments
  (Paul, #566744)
- Add a comment explaining why the two for loops for registering
  interfaces (Gustavo Carneiro)
- Huge cleanup of GIO overrides (Paul, #566706)
- gtk.Buildable interface method override is not recognized
  (Paul, #566571)
- Do not escape the ampersand "&" in entity references. Replace some
  unusual entity references in the output with their literal values.
  (Daniel Elstner, #568485)
- gio.InputStream.read_async can cause memory corruption.
  (Paul, #567792)
- Inconsistent use of tabs and spaces in pygtk.py (Paul, #569350)
- Huge fix of memory leaks in GIO (Paul, Paolo Borelli, Gian,
#568427)
- non-async functions don't release python locks before calling
  blocking C functions (Gian, Gustavo, #556250)
- Change comment to avoid false positives when grep'ing for
deprecated
  gtk functions (Andre Klapper)
- ltihooks.py updating license header from GPL to LGPL
  (James Henstridge)
*GObject is a object system library used by GTK+ and GStreamer.
*

*PyGObject provides a convenient wrapper for the GObject library for use
in Python programs, and takes care of many of the boring details such as
managing memory and type casting.  When combined with PyGTK, PyORBit and
gnome-python, it can be used to write full featured Gnome applications.
*

*Like the GObject library itself PyGObject is licensed under the
GNU LGPL, so is suitable for use in both free software and proprietary
applications.  It is already in use in many applications ranging
from small single purpose scripts up to large full
featured applications.
*
*PyGObject requires glib >= 2.14.0 and Python >= 2.3.5 to build.
GIO bindings require glib >= 2.16.0.

to know more about
http://www.pygtk.org/docs/pygobject/pygobject-introduction.html

*Praveen Kumar
+91 9739854134
+91 9343297314
http://praveensunsetpoint.wordpress.com
Bangalore
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Django +lightpd

2009-02-04 Thread Praveen Kumar
* yeah that won't really work, for it to work you would only be able to
handle 1 request at a time**
**  I guess using a DB cache would be acceptable, you could always set up a
simple model that just stores key value pairs.**
*

*  that should be fine.*

*Thanks*

Praveen Kumar

Mahit Infotech Pvt. Ltd.

Bangalore.
On Wed, Feb 4, 2009 at 8:07 PM, Hussain Bohra wrote:

> Hi,
>
> Thanks for your valuable advice.
> This can be done using caching. But can be work out only with DB or File
> Caching ... Local Memory Caching will not work out ... as again it will face
> a same problem.
>
> Thanks and Regards,
> Hussain Bohra
> Tavant Technologies,
> Bangalore-95
> mail-to:hussain.bo...@tavant.com
> mobile : +91 99867 95727
>
>
> --
> *From:* Praveen Kumar 
> *To:* hussainbohra...@yahoo.com
> *Sent:* Wednesday, 4 February, 2009 3:25:33 PM
> *Subject:* Django +lightpd
>
> *you should not assume your application server will never re-instantiate,
> cycling process is just the natural.. i guess you can always limit your
> web-server to one process but thats bad*
>
> as you wrote
>
> >>I was facing the same problem in Django Development server also, but I am
> able to come across the same using '--noreload' option, python manage.py
> runserver --noreload, and updation of my variable is working properly
>
> *tha**ts because it's one process serving one application to one person,
> in production, thats no feasible*
>
> *you don't resolve it, to be in that situation you must be doing something
> wrong. If you wana store state, store it in cache.*
>
> *Thanks*
>
> *Praveen kumar*
>
> *Bangalore*
>
> *+91 9739854134*
>
> *+91 9343297314*
>
> --
> Get perfect Email ID for your Resume. Get before others 
> grab.<http://in.rd.yahoo.com/tagline_dbid_13/*http://in.promos.yahoo.com/address>
>
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Django + Lighttpd + Global Variables are getting initalized frequently

2009-02-04 Thread Praveen Kumar
I was facing the same problem in Django Development server also, but I am
able to come across the same using '--noreload' option, python manage.py
runserver --noreload, and updation of my variable is working properly

>>I was facing the same problem in Django Development server also, but I am
able to come across the same using '--noreload' option, python manage.py
runserver --noreload, and updation of my variable is working properly

thats because it's one process serving one application to one person, in
production, thats no feasible.

You do not resolve it. to be in that situation you must be doing some thing
wrong. if you wanna store state, store in cache.

Thanks

On Wed, Feb 4, 2009 at 2:55 PM, Praveen Kumar <
praveen.python.pl...@gmail.com> wrote:

> *That is because your (and most) web servers cycles child processes*
>
> On Mon, Feb 2, 2009 at 4:57 PM, Hussain Bohra 
> wrote:
>
>> Hi All,
>>
>> I am using Django and Lighttpd Webserver, for one of our tool.
>> I am initializing one variable as a global at the top of file and updating
>> the same on some particular function call. What I am observing is it works
>> fine for some time but after some time variable defined on the top get
>> reinitialized but happening with random pattern of time-- (can be confirmed
>> from the log message), I guess complete module is getting loaded again
>>
>> I was facing the same problem in Django Development server also, but I am
>> able to come across the same using '--noreload' option, python manage.py
>> runserver --noreload, and updation of my variable is working properly
>>
>> but i cant able to find any thing similar for runfcgi, python manage.py
>> runfcgi daemonize=true.
>>
>> Any one do let me know, what can be done to avoid reinitialize of a source
>> file (i.e. once get loaded in a memory, should not be updated until web
>> server restarts), I tried removing py file and start server with .pyc files,
>> then also same problem is coming.
>>
>> Thankx in advance
>>
>> Thanks and Regards,
>> Hussain Bohra
>>
>> --
>> Add more friends to your messenger and enjoy! Invite them 
>> now.<http://in.rd.yahoo.com/tagline_messenger_6/*http://messenger.yahoo.com/invite/>
>>
>> ___
>> BangPypers mailing list
>> BangPypers@python.org
>> http://mail.python.org/mailman/listinfo/bangpypers
>>
>>
>
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Django + Lighttpd + Global Variables are getting initalized frequently

2009-02-04 Thread Praveen Kumar
*That is because your (and most) web servers cycles child processes*

On Mon, Feb 2, 2009 at 4:57 PM, Hussain Bohra wrote:

> Hi All,
>
> I am using Django and Lighttpd Webserver, for one of our tool.
> I am initializing one variable as a global at the top of file and updating
> the same on some particular function call. What I am observing is it works
> fine for some time but after some time variable defined on the top get
> reinitialized but happening with random pattern of time-- (can be confirmed
> from the log message), I guess complete module is getting loaded again
>
> I was facing the same problem in Django Development server also, but I am
> able to come across the same using '--noreload' option, python manage.py
> runserver --noreload, and updation of my variable is working properly
>
> but i cant able to find any thing similar for runfcgi, python manage.py
> runfcgi daemonize=true.
>
> Any one do let me know, what can be done to avoid reinitialize of a source
> file (i.e. once get loaded in a memory, should not be updated until web
> server restarts), I tried removing py file and start server with .pyc files,
> then also same problem is coming.
>
> Thankx in advance
>
> Thanks and Regards,
> Hussain Bohra
>
> --
> Add more friends to your messenger and enjoy! Invite them 
> now.
>
> ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>
>
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] ImportError: cannot import name make_option

2009-01-26 Thread Praveen Kumar
Hi OOmen

If you are really beginner of Django

please go through
http://www.ibm.com/developerworks/linux/library/l-django/to understand
the installation and configuration.

you are trying to import

code.djangoproject.com/browser/django/trunk/django/contrib/gis/management/commands/ogrinspect.py?rev=8219&f

On Mon, Jan 26, 2009 at 9:58 PM, OOMMEN KM  wrote:

> Hi All,
> I am a beginner in Django Development.
> I have installed Django.
>
>  As I was trying to build my first site in Django, I gave the
> django-admin.py  command I got the following error.
>
> 
> Traceback (most recent call last):
>   File "/usr/bin/django-admin.py", line 2, in 
> from django.core import management
>   File
> "/usr/lib/python2.5/site-packages/django/core/management/__init__.py", line
> 7, in 
> from django.core.management.base import BaseCommand, CommandError,
> handle_default_options
>   File "/usr/lib/python2.5/site-packages/django/core/management/base.py",
> line 3, in 
> from optparse import make_option, OptionParser
> ImportError: cannot import name make_option
> -
>
> Can anyone help me in solving this issue.
> Or Can anyone guide me in building my first site.
>
> Thanking you in advance.
>
>
> --
> ---
> Mr. Oommen Mathew
> Python Software Analyst
> rKc Media Group Inc.
>
> Mob - +91 9446917322
> --
>
> _______
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>
>


-- 
Praveen Kumar
Software Engineer
Mahiti Infotech Pvt. Ltd.
# 33-34, Hennur Cross
Hennur Main Road
Bangalore, India - 560043
Mobile:  +91 9343297314
+91 9739854134
http://www.mahiti.org
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] how to learn programming

2009-01-22 Thread Praveen Kumar
problems posed. I thought I cannot do it. But when I
>>gave it a try it happened and a whole new world of programming
>>opened to me. One of the problem posed by my teacher was to place
>>8 queens on a chess board so that no queen is able to cancel any
>>other queen. During those days (1997) there was no internet and I
>>hail from small town called Dhanbad. I went after the problem and
>>cracked it. For many years, I thought I was the only person who
>>can solve the problem in that way. When I came to software
>>industry I came to know that kind of algorithm is known as
>>backtracking algorithm. Was I a computer wiz or something?
>>Imagining backtracking algorithm in class XI in high school. I
>>don't think so. You just have to apply yourself and be creative.
>>Python is great language to start learning programming although
>>certain concepts like pointers is also a must know for a programmer.
>>
>>Chetan
>>
>>--Senior Analyst
>>Outdu MediaTech Pvt Ltd
>>Mobile: 9900262140
>>linkedin: http://www.linkedin.com/pub/dir/chetan/nichkawde
>>
>>___
>>BangPypers mailing list
>>BangPypers@python.org
>>http://mail.python.org/mailman/listinfo/bangpypers
>>
>>
>> 
>>
>> ___
>> BangPypers mailing list
>> BangPypers@python.org
>> http://mail.python.org/mailman/listinfo/bangpypers
>>
>>
> ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
Praveen Kumar
Software Engineer
Mahiti Infotech Pvt. Ltd.
# 33-34, Hennur Cross
Hennur Main Road
Bangalore, India - 560043
Mobile:  +91 9343297314
+91 9739854134
http://www.mahiti.org
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] file save from python script

2008-11-07 Thread Praveen Kumar
Hi Attaullah thank you so much.
I tried that one too but that file is storing in data.fs which i do not
want. i want to store my file to be physically stored. so for that i am
trying to write a python script. i have written many script but could not
get succeed
#!/usr/local/bin/python
"""This demonstrates a minimal http upload cgi.
This allows a user to upload up to three files at once.
It is trivial to change the number of files uploaded.

This script has security risks. A user could attempt to fill
a disk partition with endless uploads.
If you have a system open to the public you would obviously want
to limit the size and number of files written to the disk.
*"""
import cgi
import cgitb; cgitb.enable()
import os, sys

UPLOAD_DIR = "/home/praveen/Desktop/UPLOAD"

def save_uploaded_file (form_field, upload_dir):
"""This saves a file uploaded by an HTML form.
   The form_field is the name of the file input field from the form.
   For example, the following form_field would be "file_1":
   
   The upload_dir is the directory where the file will be written.
   If no file was uploaded or if the field does not exist then
   this does nothing.
"""
form = cgi.FieldStorage()  ///when i tried to print form field its
returning None
if not form.has_key(form_field): return
fileitem = form[form_field]
if not fileitem.file: return
fout = file (os.path.join(upload_dir, fileitem.filename), 'wb')
while 1:
chunk = fileitem.file.read(10)
if not chunk: break
fout.write (chunk)
fout.close()

save_uploaded_file ("/home/praveen/Desktop/1.html", UPLOAD_DIR)*

this script is not giving me error..

Is any one know script to save the file physically on the particluar
system.. suppose i have file in my Desktop and i have one interface(html
page with file text field) which provide to select you file and move to
another location /home/praveen/Desktop

Thanks

On Fri, Nov 7, 2008 at 4:49 PM, Ataulla S H <[EMAIL PROTECTED]> wrote:

> hi praveen try this
>
>   myrepo = getattr(context,*'*mydir*'*)
>   myrepo.manage_addFile(id=id, title=title, file=file)
>
>
> On Fri, Nov 7, 2008 at 12:31 PM, Praveen Kumar <[EMAIL PROTECTED]> wrote:
>
>> Hi First of all i would like to thank you for giving me some idea..
>> As Jorgen told i did in same way
>> Hi Jorgen
>> I created a python script in zope instance to upload multiple files and
>> its working successfully..
>> but its storing the file inside custom folder as we know context always
>> refer to current location i mean our-instance/custom but when i am giving
>> container['bin'] its giving me 'bin' key error. i want to save that file
>> inside my instance for example
>>
>> myzope-instance/mydir/** is any one have any idea
>>
>> *REQUEST=context.REQUEST
>> sentFiles = {}
>> for key in context.REQUEST.keys(): # getting all the ids
>> if key[:5]=='file.' and key[-3:]=='.id':   # we finding id
>> file.XXX.id
>> sentFiles[REQUEST[key]]=''
>>
>> for key in context.REQUEST.keys():
>> if key[:5]=='file.' and key[-3:]!='.id':#we've got a file
>> #found its id and make sure file exists
>> if sentFiles.has_key(REQUEST[key+'.id']) and
>> REQUEST[key].filename:
>> sentFiles[REQUEST[key+'.id']]=REQUEST[key]
>> else:
>> del sentFiles[REQUEST[key+'.id']]#remove keys that dont
>> have files
>>
>> for k in sentFiles.keys():
>> **context.manage_addFile(k,sentFiles[k])*
>> *container['bin'].mydir.manage_addFile(k,sentFiles[k])
>>
>> return str(len(sentFiles)) + ' files has been uploaded successfully'*
>>
>>
>>
>> On Thu, Nov 6, 2008 at 7:49 PM, Jørgen Jørgensen <[EMAIL PROTECTED]>wrote:
>>
>>>  Hello Praween Kumar -
>>> I would make a pythonscript on the zope like
>>> 'locahost:8080/starinstance/myscript', taking 3 parameters, id, title and
>>> file.
>>> remember to give it manager proxy rights (proxy in top of python script
>>> edit screen, chose manager)
>>> script should be something like:
>>> """
>>> container['bin'].manage_addFile(id=id, title=title, file=file)
>>> """
>>> I havent tested, sorry;-), but at least the direction should be something
>>> like this.
>>> then change addfileurl to:
>>>
>>> *addfileurl='http://localhost:8080

Re: [BangPypers] file save from python script

2008-11-06 Thread Praveen Kumar
Hi First of all i would like to thank you for giving me some idea..
As Jorgen told i did in same way
Hi Jorgen
I created a python script in zope instance to upload multiple files and its
working successfully..
but its storing the file inside custom folder as we know context always
refer to current location i mean our-instance/custom but when i am giving
container['bin'] its giving me 'bin' key error. i want to save that file
inside my instance for example

myzope-instance/mydir/** is any one have any idea

*REQUEST=context.REQUEST
sentFiles = {}
for key in context.REQUEST.keys(): # getting all the ids
if key[:5]=='file.' and key[-3:]=='.id':   # we finding id file.XXX.id
sentFiles[REQUEST[key]]=''

for key in context.REQUEST.keys():
if key[:5]=='file.' and key[-3:]!='.id':#we've got a file
#found its id and make sure file exists
if sentFiles.has_key(REQUEST[key+'.id']) and REQUEST[key].filename:
sentFiles[REQUEST[key+'.id']]=REQUEST[key]
else:
del sentFiles[REQUEST[key+'.id']]#remove keys that dont have
files

for k in sentFiles.keys():
**context.manage_addFile(k,sentFiles[k])*
*container['bin'].mydir.manage_addFile(k,sentFiles[k])

return str(len(sentFiles)) + ' files has been uploaded successfully'*


On Thu, Nov 6, 2008 at 7:49 PM, Jørgen Jørgensen <[EMAIL PROTECTED]> wrote:

>  Hello Praween Kumar -
> I would make a pythonscript on the zope like
> 'locahost:8080/starinstance/myscript', taking 3 parameters, id, title and
> file.
> remember to give it manager proxy rights (proxy in top of python script
> edit screen, chose manager)
> script should be something like:
> """
> container['bin'].manage_addFile(id=id, title=title, file=file)
> """
> I havent tested, sorry;-), but at least the direction should be something
> like this.
> then change addfileurl to:
>
> *addfileurl='http://localhost:8080/starinstance/myscript<http://localhost:8080/starinstance/bin/manage_addFile>
> '*
>
> kind regards jorgen / denmark
>
>
> Praveen Kumar wrote:
>
> Dear all,
> I want to save the file on filebased system. i am using urllib
>
> here i tried with this code
>
> *import urllib
>
> # fill these in
> user='admin'
> password='admin1'
> addfileurl='http://localhost:8080/starinstance/bin/manage_addFile'
> useragent="upload.py/0.1"
> filename='/home/praveen/Desktop/text.jpeg'
> filetitle='a nice test picture'
>
> class MyUrlOpener(urllib.FancyURLopener):
>def prompt_user_passwd(self, host, realm):
> return (user,password)
>def __init__(self, *args):
>   self.version = useragent
>   urllib.FancyURLopener.__init__(self, *args)
>
> def main():
># use authentication and set the user agent
>urllib._urlopener = MyUrlOpener()
>
># read the contents of filename into filebody
>f=open(filename)
>filebody=f.read()
>f.close
>
># urlencode the id, title and file
>params = urllib.urlencode({'id': filename,
>'title':filetitle,
>'file':filebody})
>
># send the file to zope
>f=urllib.urlopen(addfileurl, params)
>
> if __name__ == '__main__':
>main()*
>
> when i compile this file with simple python demo.py it gives me error
> Traceback (most recent call last):
>   File "demo.py", line 36, in ?
> main()
>   File "demo.py", line 33, in main
> f=urllib.urlopen(addfileurl, params)
>   File "/usr/lib/python2.4/urllib.py", line 84, in urlopen
> return opener.open(url, data)
>   File "/usr/lib/python2.4/urllib.py", line 192, in open
> return getattr(self, name)(url, data)
>   File "/usr/lib/python2.4/urllib.py", line 272, in open_http
> import httplib
>   File "/usr/lib/python2.4/httplib.py", line 70, in ?
> import mimetools
>   File "/usr/lib/python2.4/mimetools.py", line 6, in ?
> import tempfile
>   File "/usr/lib/python2.4/tempfile.py", line 33, in ?
> from random import Random as _Random
>   File "/usr/lib/python2.4/random.py", line 43, in ?
> from math import log as _log, exp as _exp, pi as _pi, e as _e
> ImportError: /usr/lib/python2.4/lib-dynload/math.so: undefined symbol:
> PyFPE_jbuf
>
> so i compiled with this command *python2.4 demo.py* it does not give any
> error
> but it does not give me output to when i check my directory wher

[BangPypers] file save from python script

2008-11-06 Thread Praveen Kumar
Dear all,
I want to save the file on filebased system. i am using urllib

here i tried with this code

*import urllib

# fill these in
user='admin'
password='admin1'
addfileurl='http://localhost:8080/starinstance/bin/manage_addFile'
useragent="upload.py/0.1"
filename='/home/praveen/Desktop/text.jpeg'
filetitle='a nice test picture'

class MyUrlOpener(urllib.FancyURLopener):
   def prompt_user_passwd(self, host, realm):
return (user,password)
   def __init__(self, *args):
  self.version = useragent
  urllib.FancyURLopener.__init__(self, *args)

def main():
   # use authentication and set the user agent
   urllib._urlopener = MyUrlOpener()

   # read the contents of filename into filebody
   f=open(filename)
   filebody=f.read()
   f.close

   # urlencode the id, title and file
   params = urllib.urlencode({'id': filename,
   'title':filetitle,
   'file':filebody})

   # send the file to zope
   f=urllib.urlopen(addfileurl, params)

if __name__ == '__main__':
   main()*

when i compile this file with simple python demo.py it gives me error
Traceback (most recent call last):
  File "demo.py", line 36, in ?
main()
  File "demo.py", line 33, in main
f=urllib.urlopen(addfileurl, params)
  File "/usr/lib/python2.4/urllib.py", line 84, in urlopen
return opener.open(url, data)
  File "/usr/lib/python2.4/urllib.py", line 192, in open
return getattr(self, name)(url, data)
  File "/usr/lib/python2.4/urllib.py", line 272, in open_http
import httplib
  File "/usr/lib/python2.4/httplib.py", line 70, in ?
import mimetools
  File "/usr/lib/python2.4/mimetools.py", line 6, in ?
import tempfile
  File "/usr/lib/python2.4/tempfile.py", line 33, in ?
from random import Random as _Random
  File "/usr/lib/python2.4/random.py", line 43, in ?
from math import log as _log, exp as _exp, pi as _pi, e as _e
ImportError: /usr/lib/python2.4/lib-dynload/math.so: undefined symbol:
PyFPE_jbuf

so i compiled with this command *python2.4 demo.py* it does not give any
error
but it does not give me output to when i check my directory where i am
trying to save my jpeg file *
http://localhost:8080/starinstance/bin/manage_addFile *there i do not find
that file it means it is not able to store that file.

i do not know what i am trying to do..could any one please give me idea how
may i store the file on file system.
i created a html page
 


Id:
Name:
Keywords:

    
    
 
once if user select any file it should store to specific location *
http://localhost:8080/starinstance/bin/manage_addFile

*Any suggestion will be appreciable

Thanks.
-- 
Praveen Kumar
Software Engineer
Mahiti Infotech Pvt. Ltd.
# 33-34, Hennur Cross
Hennur Main Road
Bangalore, India - 560043
Mobile:  +91 9343297314
+91 9739854134
http://www.mahiti.org
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] need for project detail

2008-08-27 Thread Praveen Kumar
Hi Shanmuga,
I knew when any one will ask this kind of question, will get appreciation
and criticism too. and each of them will come with their solution it does
not matter whether given solutions is right or wrong. any way but first we
think  first how to solve the problem should stair up step by step later we
will think how far we have staired. ok so tell me how far you have solved
your problem and where you are struggling.

"*We often refuse to accept an idea merely because the tone of voice in
which it has been expressed is unsympathetic to
us.<http://thinkexist.com/quotation/we_often_refuse_to_accept_an_idea_merely_because/336445.html>
"

and i think
*"If you have an apple and I have an apple and we exchange these apples then
you and I will still each have one apple. But if you have an *idea* and I
have an *idea* and we exchange these ideas, then each of us will have two
ideas.<http://thinkexist.com/quotation/if_you_have_an_apple_and_i_have_an_apple_and_we/207452.html>
"

On Tue, Aug 26, 2008 at 10:58 AM, Diabolic Preacher <[EMAIL PROTECTED]>wrote:

> On Tue, Aug 26, 2008 at 9:37 AM, shanmuga priya k
> <[EMAIL PROTECTED]> wrote:
> > we r doing aproject using blue tooth technology.based on that v need a
> help.
> > *Explain BLUETOOTH AS SENSORS-application.
> > *When a blind tries to cross a road behind a car.when the car runs on a
> dark
> > road without light.car person mobile will say that there is a persion
> > upfront who is blind or deaf.
> > How to do this project...send me ideas.
> > ___
> > BangPypers mailing list
> > BangPypers@python.org
> > http://mail.python.org/mailman/listinfo/bangpypers
> >
> >
>
>
> driving on dark road without lights...is that allowed? shouldn't govt.
> solve the problem of ill-luminated streets and roads...or is this on
> the sets of Aahat.
>
> What if driver is drunk? if car is allowed to go without lights, even
> drunk drivers might pass thru. What if mobile phone battery is
> dead...and dooor dooor tak sirf sannataa?
>
> It'd make sense to add the sensing system in the car's embedded
> system, but then how do you detect the person crossing in front? body
> heat sensing?
>
> I mean people do ask this for home-work or is this your creative idea?
>
> --
> Diabolic Preacher
> As Is
> Blog: http://pintooo15.livejournal.com/
> Bookmarks: http://simpy.com/user/dpreacher
> -BEGIN GEEK CODE BLOCK-
> need to revise it. lost the decoding page.
> --END GEEK CODE BLOCK--
> ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
Praveen Kumar
Software Engineer
Mahiti Infotech Pvt. Ltd.
# 33-34, Hennur Cross
Hennur Main Road
Bangalore, India - 560043
Mobile: +91 9343297314
+91 9739854134
http://www.mahiti.org
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] writing Python Service Client according to WS standards

2008-07-10 Thread Praveen Kumar
XML-RPC is a simple, lightweight Web services technology that predates SOAP.
In this installment of the Python Web services developer, Mike Olson and
Uche Ogbuji examine the XML-RPC facilities in Python.
XML-RPC is the granddaddy of XML Web services. It is a simple specification
for remote procedure calls (RPC) that uses HTTP as the transport protocol
and an XML vocabulary as the message payload. It has become very popular
because of its simplicity (the full specification is less than ten printed
pages), and most languages now have standard or readily available XML-RPC
implementations. This includes Python, which started bundling xmlrpclib, an
XML-RPC implementation by Fredrik Lundh, in version 2.2. Joe Johnston's IBM
developerWorks article "Using XML-RPC for Web services" (see
Resources<http://www-128.ibm.com/developerworks/library/ws-pyth10.html#resources>)
covers the basics of XML-RPC in the first three sections. Start there if you
need to review the basic technology. In this article, we will focus on using
the Python implementation. You must have Python 2.2. to run the examples in
this article. Also, in the last article, we looked at the relative
performance of XML-RPC, SOAP, and other distributed programming
technologies. You may want to read that before making major decisions to
deploy XML-RPC.

On Thu, Jul 10, 2008 at 11:03 PM, Heshan Suriyaarachchi <
[EMAIL PROTECTED]> wrote:

> Hi,
> I have been working with web services for some time now. I have used
> mainly java to do it. When writing a service client in python, does ZSI or
> SOAPpy support WS-Security, WS-Reliable Messaging, WS-Addressing. If so can
> anyone point me to a sample code or an article.
>
> --
> Regards,
> Heshan Suriyaarachchi
>
> http://heshans.blogspot.com/
> ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>
>


-- 
Praveen Kumar
Software Engineer
Mahiti Infotech Pvt. Ltd.
# 33-34, Hennur Cross
Hennur Main Road
Bangalore, India - 560043
Mobile: +91 9343297314
+91 9739854134
http://www.mahiti.org
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] How to build a debian package from python source and glade files ??

2008-07-03 Thread Praveen Kumar
Hi dude,
just check this
https://launchpad.net/ubuntu/+source/glade-3
http://packages.debian.org/sid/python-glade2

On Thu, Jul 3, 2008 at 3:29 PM, Nishith Nand <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I wrote a little utility using glade and pygtk. I would like  to build
> it into a .deb package. Couldn't find anything concrete, any suggestions?
>
> Thanks and Regards,
>
> Nishith
>
>
> ___
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>
>


-- 
Praveen Kumar
Software Engineer
Mahiti Infotech Pvt. Ltd.
# 33-34, Hennur Cross
Hennur Main Road
Bangalore, India - 560043
Mobile: +91 9343297314
+91 9739854134
http://www.mahiti.org
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers