Re: [web2py] Re: applying BEAUTIFY to UL in controller

2012-12-16 Thread praveen krishna
:1]=='_' is skipped. > """ > > > > It is not very clear what you want to beautify. If your objects > "hits_xxx_yy" are lists or tuples, I would only expand them in the UL: > UL(*hits_xxx_yy,_class='hfm') > > > > Le vend

[web2py] applying BEAUTIFY to UL in controller

2012-12-14 Thread praveen krishna
Hi, One of my form returns UL .I want to apply BEAUTIFY helper on this ,what is the possible syntax. part of code where I like to apply BEAUTIFY return DIV(form,UL((hits_forward_mismatch),_class = 'hfm'),UL((hits_loc_forward),_class='hlf'),UL((hits_loc_backward),_class='hlb')) --

Re: [web2py] Reading a text file after uploading in a form

2012-11-01 Thread praveen krishna
x27;) > > > The form field only returns the file name. You have to specify the path > to it if you are going to use it later as seen in this statement: > > btd.process('%s/%s' % (os.path.join(request.folder,'uploads'), fileName), > 1) > > -Jim > > &

Re: [web2py] Reading a text file after uploading in a form

2012-11-01 Thread praveen krishna
Nol there is no such requirement.Actually I am able to upload and read a text file by zipping it but for my task I have upload a text file . On Thu, Nov 1, 2012 at 7:24 AM, Johann Spies wrote: > On 31 October 2012 17:45, praveen krishna wrote: > >> Hi, >>For my task I hav

[web2py] Reading a text file after uploading in a form

2012-10-31 Thread praveen krishna
Hi, For my task I have to upload a text file in form with out zipping it ,I have prepared the form as: form = FORM(TABLE(TR(TD('Upload File:', INPUT(_type='file', name='myfile', id='myfile', requires=IS_NOT_EMPTY(,TR(TD(INPUT(_type='submit',_value='Submit') But I unable to read the

Re: [web2py] Re: Unable to extract a record from table using 'if'

2012-10-28 Thread praveen krishna
ok thank you On Sun, Oct 28, 2012 at 4:42 PM, Niphlod wrote: > glad that one was fixed. > BTW, fetch the sets only one time... instead of > for record in db(db.plugin_seq.id > 0).select(): > for primer_record in db(db.primer_seq_files.id>0).select(): > > do > > plugin_seq_tb = db(db.plugin_

Re: [web2py] Re: Unable to extract a record from table using 'if'

2012-10-28 Thread praveen krishna
I have debugged the error it is due giving the input stings primer_record.primer_processed_seq as 5'-AGGCTCTCCCAAAGGTCCCGCCAGCAG-3' I have to trim them to AGGCTCTCCCAAAGGTCCCGCCAGCAG to satisfy the condition.Niphold thanks for your suggestions :) On Sun, Oct 28, 2012 at 3:40 PM, prave

Re: [web2py] Re: Unable to extract a record from table using 'if'

2012-10-28 Thread praveen krishna
record.processed_seq and record.reverse_seq are strings of length around 10,000 to 20,000 and primer_record.primer_processed_seq is also string of length around 10 to 20 This function will extract all the substrings 'primer_record.primer_processed_seq' present in record.processed_seq and record.re

Re: [web2py] Re: Unable to extract a record from table using 'if'

2012-10-28 Thread praveen krishna
prpps = primer_record.primer_processed_seq rps = record.processed_seq rrs = record.reverse_seq These are true print 'first condition evaluates to ', prpps in rps print 'second condition evaluates to ', prpps in rrs print 'ORing conditions leads to ', prpps in rps or prpps in rrs These three conditi

[web2py] Unable to extract a record from table using 'if'

2012-10-28 Thread praveen krishna
def primer_library(): form = FORM('primary library',INPUT (_type = 'submit') ) query_forward_match = [] hits_forward_match = [] query_backward_match = [] hits_backward_match = [] query_loc_forward = [] hits_loc_forward = [] query_loc_backward = [] hits_loc

[web2py] db.table as input to a SQLFORM.factory

2012-10-28 Thread praveen krishna
Hi, I have two db.tables, for my application I want them as input to a form factory.What could be the possible syntax to fulfill the task. --

Re: [web2py] Re: comparing two database tables

2012-10-20 Thread praveen krishna
ber 20, 2012 10:53:28 AM UTC+1, praveen krishna wrote: >> >> Hii, >> I have two tables >> db.define_table('plugin_seq', >> Field('filename',readable=**False,writable=False), >> Field('raw_seq','t

[web2py] comparing two database tables

2012-10-20 Thread praveen krishna
Hii, I have two tables db.define_table('plugin_seq', Field('filename',readable=False,writable=False), Field('raw_seq','text'), Field('processed_seq', 'text'), Field('reverse_seq','text') ) db.define_tabl

[web2py] calling a library of files in a form

2012-10-18 Thread praveen krishna
I have two forms in two different functions which has a list of strings I want to want to query all the files in one form against other in another function what is the possible approach .For a single file I tried by using form = form_factory(Field('q', label='Query primer',requires=IS_NOT_EMPTY

[web2py] Removing files from database folder

2012-10-14 Thread praveen krishna
I am uploading some files to server in order to extract some information .After my task is done, I want remove those files when I am trying to upload another file the previously loaded files are still stored .I came to know that these files are stored in database folder of web2py.Is there any w

Re: [web2py] Re: Aligning two strings

2012-10-05 Thread praveen krishna
rd line starts with 4 spaces > > TAGCGCTTTAAACC > ACTAGTTAGERT > ACTATTAGTAAACCC > > as you can see, they are not aligned at all. However, if you wrap them in > a , then you can visualize it "correctly aligned", as the below example > > TAGCGCTTTA

[web2py] Aligning two strings

2012-10-05 Thread praveen krishna
Hi, I want to align two strings one has a long sequence and other is of type list which a has sub-strings all of same type and the starting and ending positions corresponding to first string .I have tried with html tags 'LI' and 'TR' but its not working can you suggest me better approach. exa

Re: [web2py] Installing Levenshtein module in controller

2012-07-29 Thread praveen krishna
Oh,I haven't done this is this the mistake I have done? but is this applicable for web2py as well .If so we have run this command in web2py terminal? On Sun, Jul 29, 2012 at 7:59 PM, Jonathan Lundell wrote: > On 29 Jul 2012, at 10:56 AM, praveen krishna > wrote: > > What do u m

Re: [web2py] Installing Levenshtein module in controller

2012-07-29 Thread praveen krishna
What do u mean by building a module.I don't know how to built a module I just extracted the folder and stored it in applications/yourapp/modules and tried to import it. On Sun, Jul 29, 2012 at 7:52 PM, Jonathan Lundell wrote: > On 29 Jul 2012, at 10:22 AM, praveen krishna > wrote:

[web2py] Installing Levenshtein module in controller

2012-07-29 Thread praveen krishna
Hi, How to import the Levenshtein in controller of web2py actullaý I have downloaded the tar.bz2 folder of levenstein from http://code.google.com/p/pylevenshtein/ extracted in web2py/site-packages and used the command import Levenshtein but it dosen't work and even I tried by extracting in

[web2py] matching string in list using DAL

2012-07-19 Thread praveen krishna
Hii, I want to match two string which are in two different lists,I want to view the stings which are matched for example string 1 ASDFFFASVSDSDDD

Re: [web2py] Re: comparing two strings in two functions in other function in controller.

2012-06-24 Thread praveen krishna
om any controller. Otherwise, you can put them in a module and > import them. > > Anthony > > On Sunday, June 24, 2012 11:24:23 AM UTC-4, praveen krishna wrote: >> >> Hi, >>I have two functions which generates two string lists ,I want to >> extract the l

[web2py] comparing two strings in two functions in other function in controller.

2012-06-24 Thread praveen krishna
Hi, I have two functions which generates two string lists ,I want to extract the list of strings by comparing the two lists,the basic code is there I just want to call the two functions in other where I compare the two lists .How can I do in a controller. --

Re: [web2py] Re: how to eliminate the path in a table

2012-06-17 Thread praveen krishna
Ya I have checked the code 'rev' is generating the value what I expect but the problem is in inserting the data to database and generating the same output. On Sun, Jun 17, 2012 at 5:26 PM, Anthony wrote: > for name in zf.namelist(): >> filename = name.split('/')[-1] >>

Re: [web2py] Re: how to eliminate the path in a table

2012-06-17 Thread praveen krishna
My complete code: from sys import argv from string import find, split, strip import os import zipfile def import_files(): items = [] '''stub for import''' form = form_factory(Field('seqzip', 'upload', label="Sequence Files (.zip)", requires=IS_NOT_EMPTY(), uploadfield=False)) if for

Re: [web2py] Re: how to eliminate the path in a table

2012-06-17 Thread praveen krishna
ya its in subfolder but with ' filename = name.split('/')[-1]' I am able to read the file names and with 'file_raw = zf.read(name) ' i am able to read the sequence in the file .But the other problem with table is not solved I am still getting unwanted information like file path for example like "we

Re: [web2py] Re: how to eliminate the path in a table

2012-06-14 Thread praveen krishna
he file, not just the > filename: > > for name in zf.namelist(): > print zf.open(name) > > Anthony > > > On Thursday, June 14, 2012 7:37:36 AM UTC-4, praveen krishna wrote: >> >> Hi, >> I have found the mistake ,the problem is in opening the

Re: [web2py] Re: how to eliminate the path in a table

2012-06-12 Thread praveen krishna
ok thanks, I will look into the code and the line ' records = db( db.plugin_seq.id>0).select(**)'. Is by mistake I haven't removed it .It doesn't has any thing to do with the code . On Tue, Jun 12, 2012 at 9:56 PM, Anthony wrote: > for name in zf.namelist(): >> filename = na

Re: [web2py] Re: how to eliminate the path in a table

2012-06-12 Thread praveen krishna
But how to remove the extragenous data will I have use any filters to do so? On Tue, Jun 12, 2012 at 9:25 PM, pbreit wrote: > Sounds like the problem is with how you inserted the data into the DB. To > get the data out is pretty easy: > records = db(db.plugin_seq.id>0).select() > > Any extraneou

Re: [web2py] Re: how to eliminate the path in a table

2012-06-12 Thread praveen krishna
day, June 12, 2012 1:33:33 PM UTC-4, praveen krishna wrote: >> >> I want to extract all the attributes of a single column in a table .The >> column name is processed sequence .I tried with the above code but its not >> working . >> > > Are you saying you want all

Re: [web2py] Re: how to eliminate the path in a table

2012-06-12 Thread praveen krishna
I want to extract all the attributes of a single column in a table .The column name is processed sequence .I tried with the above code but its not working . On Tue, Jun 12, 2012 at 3:37 PM, Anthony wrote: > for record in records: >> record = db(db.plugin_seq.processed_**seq).select()

[web2py] how to eliminate the path in a table

2012-06-12 Thread praveen krishna
I have created a table with columns filename,raw_seq and processed seq.my task is to extract a file from a zipped folder which has a DNA seq of certain format and to process it to extract only the seq with out any extract information .I have used "zipfile" library to extact the file and have do

Re: [web2py] Re: TR and TD

2012-05-05 Thread praveen krishna
>>> items = [TR(TD('hello'),TD('world'))] > >>> print TABLE(*items) > helloworld > > Hope it makes sense. > > On Saturday, 5 May 2012 07:32:09 UTC-5, praveen krishna wrote: >> >> Hii, >> What does TR and TD do in the func

[web2py] TR and TD

2012-05-05 Thread praveen krishna
Hii, What does TR and TD do in the function def records(): 'show all recors in plugin_seq db to user' records = db(db.plugin_seq.id>0).select() items = [] for record in records: items.append(TR(TD(record.filename)(TD('del' return TABLE(items) and what does ac

[web2py] error in unzipping a folder to extract files

2012-05-04 Thread praveen krishna
Hi, How to give the argument to unzip a zipped folder and extract files from the folder the error which I am getting is ' unzip() takes at least 2 arguments (1 given)' and my arguments are def unzip(filename, dir, subfolder=''): ... and I de

Re: [web2py] error in loading web2py source code version in ubuntu 11.10

2012-04-11 Thread praveen krishna
Python 2.5+ >> >> You have permission problem. >> >> Go to your terminal, access the location where web2y folder is and try. >> >> $ sudo chown -R youruser:youruser web2py >> >> or >> >> run web2py with superuser >> >> $ sudo pyt

Re: [web2py] error in loading web2py source code version in ubuntu 11.10

2012-04-11 Thread praveen krishna
check which version of > python is installed. > > import sys > sys.version_info > > I ran web2py under (2, 6, 5, 'final', 0) and Ubuntu server LTS with no > problem. > > > Richard > > On Wed, Apr 11, 2012 at 11:06 AM, praveen krishna < > praveenchi

[web2py] error in loading web2py source code version in ubuntu 11.10

2012-04-11 Thread praveen krishna
Hii, I have downloaded the source code version of web2py from http://www.web2py.com/examples/default/download i have unzipped it and tried to run the web2py by using the comand 'python web2py.py' but it generating following error in terminal Traceback (most recent call last): File "web2py

Re: [web2py] Installing a project which in cloned in mercurial repository in web2py

2012-03-18 Thread praveen krishna
> Hi, > > Download web2py from web2py.com and follow the instructions to run it > > Just copy or move the folder containing models,controllers,views under > the applications folder inside your web2py installation. > > mic > > > Il 18 marzo 2012 16:06, praveen krishn

[web2py] Installing a project which in cloned in mercurial repository in web2py

2012-03-18 Thread praveen krishna
Hii, I have cloned a project called pyMantis in mercurial in read only mode and want to install it as a pyMantis app in web2py .what are the next steps to be followed in windows7 environment to install.

Re: [web2py] Re: PIL software for win 64bit and python 2.7 64 bit

2012-03-17 Thread praveen krishna
ttp://stackoverflow.com/questions/3652625/installing-setuptools-on-64-bit-windows > http://selfsolved.com/problems/setuptools-06c11-fails-to-instal/s/63 > > On Mar 16, 8:12 am, praveen krishna > wrote: > > Dear Alan, > >I tried to installhttp:// > effbot.org

[web2py] Installing pyMantis in web2py

2012-03-17 Thread praveen krishna
Hii, Where can I get the URL or package of pyMantis app to instal in web2py.I have tried in http://pymantis.org/ but I am unable to find .

Re: [web2py] Error in installing web2py 1.99.4 in ubuntu 11.10

2012-03-16 Thread praveen krishna
/path/to/web2py_src.zip unzip: cannot find or open /path/to/web2py_src.zip, /path/to/web2py_src.zip.zip or /path/to/web2py_src.zip.ZIP. Regards, Praveen. On Fri, Mar 16, 2012 at 11:16 AM, Ricardo Pedroso wrote: > > > On Fri, Mar 16, 2012 at 9:46 AM, praveen krishna < > praveenchit

[web2py] Error in installing web2py 1.99.4 in ubuntu 11.10

2012-03-16 Thread praveen krishna
Hi, I have installed web2py 1.99.4 in ubuntu 11.10 but it is generating ticket(internal error ) while connecting to the server and by clicking the link link it is says the following trace back error Traceback 1. 2. 3. 4. 5. 6. 7. Traceback (most recent call last): File "/usr/lib/pymodules/p

[web2py] Re: error in def show():

2012-03-14 Thread praveen krishna
error as earlier version 1.99.7 On Wednesday, March 14, 2012 1:52:52 AM UTC+1, Massimo Di Pierro wrote: > > You seem to be running an old web2py. Perhaps you have a conflicting > version of the gluon libraries? > > On Tuesday, 13 March 2012 17:18:35 UTC-5, praveen krishna wro

[web2py] Re: error in def show():

2012-03-14 Thread praveen krishna
On Tuesday, March 13, 2012 11:18:35 PM UTC+1, praveen krishna wrote: > > Hii, >I am getting an error at line 9: in creating an image blog in > ubuntu(linux) 11.10 ,I have installed the web2py through terminal > > 4. > 5. > 6. > 7. > 8. > 9. > &g

Re: [web2py] error in def show():

2012-03-13 Thread praveen krishna
Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/gluon/restricted.py", line 192, in restricted exec ccode in environment File "/home/praveen/web2py/applications/my_images/controllers/default.py"

[web2py] error in def show():

2012-03-13 Thread praveen krishna
Hii, I am getting an error at line 9: in creating an image blog in ubuntu(linux) 11.10 ,I have installed the web2py through terminal 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. def show(): image = db(db.image.id==request.args(0)).select().first() db.comment.image_id.default = image.id

Re: [web2py] Installing PIL for creating thumbnails in windows7 environment

2012-03-13 Thread praveen krishna
I treid to install from http://www.pythonware.com/products/pil/ but it is asking to register python 2.7 I tried to register using the script given in link http://effbot.org/zone/python-register.htm but it is giving an error *** Unable to register! *** You probably have another Python install

[web2py] Installing PIL for creating thumbnails in windows7 environment

2012-03-13 Thread praveen krishna
Hi, I unable to install PIL in win for web2py .I came to know some commands like ( sudo apt-get install python-imaging,sudo easy_install PIL and sudo pip install PIL) but I think these are only applicable for linux environment if there is any possibility to install PIL in win it would be