[issue42565] Traceback (most recent call last): File "", line 1, in NameError: name 'python' is not defined

2020-12-03 Thread Siva Krishna Giri Babu Avvaru
Change by Siva Krishna Giri Babu Avvaru : -- nosy: sivakrishnaavvaru priority: normal severity: normal status: open title: Traceback (most recent call last): File "", line 1, in NameError: name 'python' is not defined type: compile error versions:

[issue35645] Alarm usage

2019-01-02 Thread Siva
New submission from Siva : '\a' in a command line gives '\x07' in response.Tried '\a' in a calci programe but response gives me enter a valid data and a small box but o alarm. Do we have any ways to rectify the same. if so please let me know. print('enter a value from the below list\n

Re: installing modules problem

2018-11-08 Thread Siva Sukumar Reddy
Also make sure that the Pythonpath contains the folder where the modules are installed in your machine. - site packages folder. On Thu 8 Nov, 2018, 16:28 Thomas Jollans On 2018-11-08 06:04, Ian K. wrote: > > Hello, > > > > My name is Ian Kilty and I have been having trouble with pip. I have pip

Python Enhancement Proposal for List methods

2018-10-22 Thread Siva Sukumar Reddy
Hey everyone, I am really new to Python contribution community want to propose below methods for List object. Forgive me if this is not the format to send an email. 1. *list.replace( item_to_be_replaced, new_item )*: which replaces all the occurrences of an element in the list instead of writing

Reg : Wikipedia 1.4 package

2017-06-08 Thread Siva Kumar S
Dear members, How to install Wikipedia 1.4 package in python 2.7 above without PIP. from, Sivakumar S -- https://mail.python.org/mailman/listinfo/python-list

Reg : Wikipedia 1.4 package

2017-06-08 Thread Siva Kumar S
Dear members, how to install wikipedia 1.4 package in python 2.7 above without PIP. from, Sivakumar S -- https://mail.python.org/mailman/listinfo/python-list

ValueError: Input contains NaN, infinity or a value too large for dtype('float32')

2017-04-27 Thread Siva Kumar S
Source Code: clean_train_reviews=[] for review in train["review"]: clean_train_reviews.append(review_to_wordlist(review, remove_stopwords=True)) trainDataVecs=getAvgFeatureVecs(clean_train_reviews, model, num_features) print "Creating average feature vecs for test reviews"

Re: Timer runs only once.

2016-11-30 Thread siva gnanam
On Wednesday, November 30, 2016 at 8:11:49 PM UTC+5:30, vnthma...@gmail.com wrote: > from threading import Timer > > class TestTimer: > def foo(self): > print("hello world") > self.startTimer() > > def startTimer(self): > self.t1 = Timer(5, self.foo) >

Re: Timer runs only once.

2016-11-30 Thread siva gnanam
On Wednesday, November 30, 2016 at 7:35:46 PM UTC+5:30, siva gnanam wrote: > The following program print hello world only once instead it has to print the > string for every 5 seconds. > > from threading import Timer; > > class TestTimer: > >

Timer runs only once.

2016-11-30 Thread siva gnanam
The following program print hello world only once instead it has to print the string for every 5 seconds. from threading import Timer; class TestTimer: def __init__(self): self.t1 = Timer(5.0, self.foo); def startTimer(self): self.t1.start();

[issue25132] unable to install mongo-python-driver-3.0.3 driver

2015-09-15 Thread siva
New submission from siva: Hi There, I am using Python 2.7.10. When I am trying to install mongo-python-driver-3.0.3 driver it's showing an error. Here, I am attaching the screenshot taken from my machine. Thanks in advance for you quick help. [root@localhost mongo-python-driver-3.0.3

seek operation in python

2015-04-29 Thread siva sankari R
file=open(input,r) line=file.seek(7) print line The above code is supposed to print a line but it prints none. I don't know where the mistake is. Help.! -- https://mail.python.org/mailman/listinfo/python-list

Re: seek operation in python

2015-04-29 Thread siva sankari R
There is a file named input.cpp(c++ file) that contains some 80 lines of code. -- https://mail.python.org/mailman/listinfo/python-list

Need Translation library

2010-08-07 Thread siva moorthy
hi all, i wish to code for translation in python i want to parse a python program itself and make some keyword changes (replacement) tell me any library to parse python source code and another library to change some words phonetically to other language thanks in advance Siva -- http

messages

2010-03-14 Thread siva kumar
For Good messages please visit http://messagezonehere.blogspot.com/2010/03/friendly-messages.html -- http://mail.python.org/mailman/listinfo/python-list

Re: read from standard input

2009-12-05 Thread Siva B
for the line of code you given, print type(sys.stdin), sys.stdin the output is: class 'idlelib.rpc.RPCProxy' idlelib.rpc.RPCProxy object at 0x00BE8090 there is no change. I have tried it in python2.6 on windows platform. Thanks, Siva On Sat, Dec 5, 2009 at 12:57 PM, Chris Rebert c

read from standard input

2009-12-04 Thread Siva B
some solution . and what is the command in windows for EOF (like Cntrl D in linux) thanks in advance Siva -- http://mail.python.org/mailman/listinfo/python-list

Re: read from standard input

2009-12-04 Thread Siva B
Hi Chris, Thanks for you reply. The error log is here for my above program in windows: Traceback (most recent call last): File C:\Documents and Settings\user\Desktop\t1.py, line 3, in module orig_source = sys.stdin.read() AttributeError: read Regards, Siva On Sat, Dec 5, 2009 at 11:54 AM

Re: editor with autocompletion

2009-12-04 Thread Siva B
if it is open source.) I have seen Komodo edit but it looks too big any help plz. Regards, Siva On Fri, Dec 4, 2009 at 8:04 PM, Gerhard Häring g...@ghaering.de wrote: Siva B wrote: Hi friends, I am writing a new language. So I want an editor with auto complete. I there any such tool

editor with autocompletion

2009-12-03 Thread Siva B
Hi friends, I am writing a new language. So I want an editor with auto complete. I there any such tool in Python ?(not only in python any other) I want it for my new lang help me Thanks siva -- http://mail.python.org/mailman/listinfo/python-list

using csv dictreader in python

2009-11-04 Thread Siva Subramanian
: This only gets me the following output {'FieldName1': '4', 'FieldName2': '0.00', 'FieldName3': '4001433', 'FieldName4': '759'} 1. How do i access the 4, 0.00, ... the values ? 2. How do i compare it with another csv file ? Thanks in advance Siva -- http://mail.python.org/mailman/listinfo/python-list

python compare and process a csv file

2009-11-04 Thread Siva Subramanian
and extract the following output Stat1: 40220 Vol2 : 83000 Amount3 : 40 nbsp; I am new to programming and I have been extracting this data using MS – Access and I badly need a better solution. nbsp; Will really appreciate any sample code in python. nbsp; Thanks in advance Siva -- http

python php/html file upload issue

2009-03-21 Thread S.Selvam Siva
Hi all, I want to upload a file from python to php/html form using urllib2,and my code is below PYTHON CODE: import urllib import urllib2,sys,traceback url='http://localhost/index2.php' values={} f=open('addons.xcu','r') values['datafile']=f.read() #is this correct ? values['Submit']='True' data

Need to store dictionary in file

2009-02-23 Thread S.Selvam Siva
Hi all, I have a dictionary in which each key is associated with a list as value. eg: *dic={'a':['aa','ant','all']}* The dictionary contains *1.5 lakh keys*. Now i want to store it to a file,and need to be loaded to python program during execution. I expect your ideas/suggestions. Note:I think

Re: Levenshtein word comparison -performance issue

2009-02-19 Thread S.Selvam Siva
On Sat, Feb 14, 2009 at 3:01 PM, Peter Otten __pete...@web.de wrote: Gabriel Genellina wrote: En Fri, 13 Feb 2009 08:16:00 -0200, S.Selvam Siva s.selvams...@gmail.com escribió: I need some help. I tried to find top n(eg. 5) similar words for a given word, from a dictionary

Levenshtein word comparison -performance issue

2009-02-13 Thread S.Selvam Siva
Hi all, I need some help. I tried to find top n(eg. 5) similar words for a given word, from a dictionary of 50,000 words. I used python-levenshtein module,and sample code is as follow. def foo(searchword): disdict={} for word in self.dictionary-words:

BeautifulSoup -converting unicode to numerical representaion

2009-02-09 Thread S.Selvam Siva
Hi all, I need to parse feeds and post the data to SOLR.I want the special characters(Unicode char) to be posted as numerical representation, For eg, *'* -- #8217; (for which HTML equivalent is rsquo;) I used BeautifulSoup,which seems to be allowing conversion from #;( numeric values )to

string replace for back slash

2009-02-05 Thread S.Selvam Siva
Hi all, I tried to do a string replace as follows, s=hi people s.replace(,\) 'hi \\ people' but i was expecting 'hi \ people'.I dont know ,what is something different here with escape sequence. -- Yours, S.Selvam -- http://mail.python.org/mailman/listinfo/python-list

Re: string replace for back slash

2009-02-05 Thread S.Selvam Siva
On Thu, Feb 5, 2009 at 5:59 PM, rdmur...@bitdance.com wrote: S.Selvam Siva s.selvams...@gmail.com wrote: I tried to do a string replace as follows, s=hi people s.replace(,\) 'hi \\ people' but i was expecting 'hi \ people'.I dont know ,what is something different here

importing module-performance

2009-02-02 Thread S.Selvam Siva
Hi all, I have a small query, Consider there is a task A which i want to perform. To perform it ,i have two option. 1)Writing a small piece of code(approx. 50 lines) as efficient as possible. 2)import a suitable module to perform task A. I am eager to know,which method will produce best

Re: importing module-performance

2009-02-02 Thread S.Selvam Siva
On Mon, Feb 2, 2009 at 3:11 PM, Chris Rebert c...@rebertia.com wrote: On Mon, Feb 2, 2009 at 1:29 AM, S.Selvam Siva s.selvams...@gmail.com wrote: Hi all, I have a small query, Consider there is a task A which i want to perform. To perform it ,i have two option. 1)Writing a small

Re: date handling problem

2009-01-29 Thread S.Selvam Siva
On Thu, Jan 29, 2009 at 2:27 PM, M.-A. Lemburg m...@egenix.com wrote: On 2009-01-29 03:38, Gabriel Genellina wrote: En Wed, 28 Jan 2009 18:55:21 -0200, S.Selvam Siva s.selvams...@gmail.com escribió: I need to parse rss-feeds based on time stamp,But rss-feeds follow different

date handling problem

2009-01-28 Thread S.Selvam Siva
Hi all, I need to parse rss-feeds based on time stamp,But rss-feeds follow different standards of date(IST,EST etc). I dont know,how to standardize this standards.It will be helpful if you can hint me. -- Yours, S.Selvam -- http://mail.python.org/mailman/listinfo/python-list

Re: String comparision

2009-01-25 Thread S.Selvam Siva
Thank You Gabriel, On Sun, Jan 25, 2009 at 7:12 AM, Gabriel Genellina gagsl-...@yahoo.com.arwrote: En Sat, 24 Jan 2009 15:08:08 -0200, S.Selvam Siva s.selvams...@gmail.com escribió: I am developing spell checker for my local language(tamil) using python. I need to generate alternative

String comparision

2009-01-24 Thread S.Selvam Siva
Hi all, I am developing spell checker for my local language(tamil) using python. I need to generate alternative word list for a miss-spelled word from the dictionary of words.The alternatives must be as much as closer to the miss-spelled word.As we know, ordinary string comparison wont work here

python resource management

2009-01-20 Thread S.Selvam Siva
Hi all, I have found the actual solution for this problem. I tried using BeautifulSoup.SoupStrainer() and it improved memory usage to the greatest extent.Now it uses max of 20 MB(earlier it was 800 MB on 1GB RAM system). thanks all. -- Yours, S.Selvam --

Re: python resource management

2009-01-20 Thread S.Selvam Siva
On Tue, Jan 20, 2009 at 7:27 PM, Tim Arnold tim.arn...@sas.com wrote: I had the same problem you did, but then I changed the code to create a new soup object for each file.That drastically increased the speed. I don't know why, but it looks like the soup object just keeps getting bigger with

python resource management

2009-01-19 Thread S.Selvam Siva
Hi all, I am running a python script which parses nearly 22,000 html files locally stored using BeautifulSoup. The problem is the memory usage linearly increases as the files are being parsed. When the script has crossed parsing 200 files or so, it consumes all the available RAM and The CPU usage

Re: Extracting real-domain-name (without sub-domains) from a given URL

2009-01-13 Thread S.Selvam Siva
On Tue, Jan 13, 2009 at 1:50 PM, Chris Rebert c...@rebertia.com wrote: On Mon, Jan 12, 2009 at 11:46 PM, S.Selvam Siva s.selvams...@gmail.com wrote: Hi all, I need to extract the domain-name from a given url(without sub-domains). With urlparse, i am able to fetch only the domain-name

Extracting real-domain-name (without sub-domains) from a given URL

2009-01-12 Thread S.Selvam Siva
Hi all, I need to extract the domain-name from a given url(without sub-domains). With urlparse, i am able to fetch only the domain-name(which includes the sub-domain also). eg: http://feeds.huffingtonpost.com/posts/ , http://www.huffingtonpost.de/, all must lead to *huffingtonpost.com

pygtkspell-help

2009-01-01 Thread S.Selvam Siva
Hello, i am in a process of writing spell checker for my local language(Tamil). I wrote a plugin for gedit with pygtk for gui.Recently i came to know about pygtkspell ,that can be used for spell checking and suggestion offering. I am bit congused about it and could not able to get useful info by

Posting File as a parameter to PHP/HTML using HTTP POST

2008-12-02 Thread S.Selvam Siva
I am trying to post file from python to php using HTTP POST method. I tried mechanize but not able to pass the file object. from mechanize import Browser br=Browser() response=br.open(http://localhost/test.php;) br.select_form('form1') br['uploadedfile']=open(C:/Documents and

Re: Posting File as a parameter to PHP/HTML using HTTP POST

2008-12-02 Thread S.Selvam Siva
, Dec 2, 2008 at 1:33 PM, S.Selvam Siva [EMAIL PROTECTED]wrote: I am trying to post file from python to php using HTTP POST method. I tried mechanize but not able to pass the file object. from mechanize import Browser br=Browser() response=br.open(http://localhost/test.php;) br.select_form

parsing javascript

2008-10-12 Thread S.Selvam Siva
I have to do a parsing on webpagesand fetch urls.My problem is ,many urls i need to parse are dynamically loaded using javascript function (onload()).How to fetch those links from python? Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list

More than 500 Free webhostings

2008-05-27 Thread siva
Hi Friends In this world everyone is searching for free webhostings for their websites So only i found this website after some struggle it's a free webhosting directory www.webhostingsfree.com Having more than 500 free web hosting websites and free file hostings ,image hostings etc --