Python Online Programming Contest

2005-02-24 Thread Varun
Hi Friends,
Department of Information Technology, Madras Institute of Technology,
Anna University, India
is conducting a technical symposium, Samhita. As a part of samhita, an
Online Programming Contest is scheduled on Sunday, 27 Feb 2005.

This is the first Online Programming Contest in India to support
Python .
Other languages supported are C and C++.

For Registration and Rules of the contest, http://www.samhita.info/opc
For details about samhita http://www.samhita.info/

Regards,
-Online Programming Contest team

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


Re: Python Online Programming Contest

2005-02-24 Thread Varun
Hi,
It is open for anyone across the world. All times are local ( GMT
+5:30). The contest will be on Feb 27 (this sunday) and i will ensure
that the times are clearly specified.
-Varun

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


Python Online Programming Contest

2005-02-25 Thread Varun

Hi Friends,
Department of Information Technology, Madras Institute of Technology,
Anna University, India is conducting a technical symposium, Samhita.
As a part of samhita, an
Online Programming Contest is scheduled on Sunday, 27 Feb 2005.

This is the first Online Programming Contest in India to support
Python .
Other languages supported are C and C++.

For Registration and Rules of the contest, http://www.samhita.info/opc
For details about samhita http://www.samhita.info/

Regards,
-Online Programming Contest team



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


Python Online Programming Contest

2005-02-25 Thread Varun

Hi Friends,
Department of Information Technology, Madras Institute of Technology,
Anna University, India
is conducting a technical symposium, Samhita. As a part of samhita, an
Online Programming Contest is scheduled on Sunday, 27 Feb 2005.

This is the first Online Programming Contest in India to support
Python .
Other languages supported are C and C++.

For Registration and Rules of the contest, http://www.samhita.info/opc
For details about samhita http://www.samhita.info/

Regards,
-Online Programming Contest team



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


Re: Python Online Programming Contest

2005-03-02 Thread Varun
Hi,
The results of OPC (online programming contest) is out. The statistics
of python usage is available at
http://www.samhita.info/opc/status.php.
Regards,
-OPC Team

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


Language detector for Python using en-gram.

2009-07-28 Thread varun
One of my friend suggested me to do a language detector for python.At
present the language detector in python is in uni-gram mode and i have
planned to do it in en-gram mode.Kindly give me your suggestion as i am
doing this as my final year project.


With Anticipation,

Varun V. Kumar
-- 
http://mail.python.org/mailman/listinfo/python-list


Python Learning

2017-12-15 Thread Varun R
Hi All,

I'm new to programming, can anyone guide me, how to start learning python 
programming language,...plz suggest some books also.

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


Problem with Pythoncard

2005-08-26 Thread Varun Hiremath
Hello everybody,
  I was trying to install pythoncard on my system and I got this
  error. I am using an unstable version of Debian. Can someone tell me
  what the error could be. Is it because I am usingUnstable version of
  Debian I am getting this error or is it because of some other
  reason.  

I hope I am mailing this error to the right mailing list if not pls
let me know.

 
**
apt-get install pythoncard
Reading Package Lists... Done
Building Dependency Tree... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

Since you only requested a single operation it is extremely likely
that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  pythoncard: Depends: python-pythoncard (= 0.8.1-2) but it is not
  going to be installed
  Depends: pythoncard-tools (= 0.8.1-2) but it isnot going
  to be installed
E: Broken packages
*


-- 
---
Varun Hiremath
461, Jamuna Hostel
IIT Madras,
Chennai - 600 036
mob : +919840299732
---
My Webpage : http://www.ae.iitm.ac.in/~ae03b032
---
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: plotting with gnuplot.py

2005-09-02 Thread Varun Hiremath
On Fri, Sep 02, 2005 at 02:35:45AM -0700, [EMAIL PROTECTED] wrote:
> Hi,
> 
> I've been having some problems trying some basic plotting commands with
> gnuplot.py. My setup is the Python 2.3 Enthought edition and my script
> looks as:
> 
> from scipy import *
> from scipy import gplt
> import scipy.io.array_import
> #import Gnuplot
> 
> filename = ('Default.PL1')
> data = scipy.io.array_import.read_array(filename)
> 
> 
> y = data[:,1]
> x = data[:,0]
> z = data[:,2]
> gplt.plot(x,y,'with points')
> gplt('set logscale x')
> gplt('set logscale y')
> 
> 
> With the following error message:
> 
> --->gplt('set logscale x')
> TypeError: 'module' object is not callable
> warning: Failure executing file: 
> 
> Any help would appreciated...


Hi,

Try doing this:

import Gnuplot,Numeric
filename = ('Default.PL1')
data = scipy.io.array_import.read_array(filename)
 
y = data[:,1]
x = data[:,0]
z = data[:,2]

//I think u need to take the transpose of this column before
plotting..

x=Numeric.transpose(x)
y=Numeric.transpose(y)

g=Gnuplot.Gnuplot()
d=Gnuplot.Data(x,y)
g('set logscale xy')
g.plot(d)

It should work...

Bye

-- 
---
Varun Hiremath
461, Jamuna Hostel
IIT Madras,
Chennai - 600 036
mob : +919840299732
---
My Webpage : http://www.ae.iitm.ac.in/~ae03b032
---
-- 
http://mail.python.org/mailman/listinfo/python-list


Issue in installing xlwt package

2013-09-14 Thread varun nayyar
Hello,I am using windows 7 32 bit and installed python 2.7.5When i am trying to 
install xlwt 0.7.5 package from cmd prompt it shows Access Denied.When i run 
the cmd in administrator mode I am getting the following error:
Fatal Python error: Py_Initialize: can't initialize sys standard 
streamsImportError: No module named encodings.utf_8
This application has requested the Runtime to terminate it in an unusual 
way.Please contact the application's support team for more information. 
 -- 
https://mail.python.org/mailman/listinfo/python-list


Does python support ATL Modelling Language?

2014-07-09 Thread varun bhatnagar
Hi,

I am trying to shift my application from JAVA to Python and in JAVA I am
using ATL Transformations (modelling techniques). Is it possible to do that
with Python, does python support ATL Transformations. If not is there any
API/library/module which supports this?

Any kind of help will be appreciated! :)

Thanks,
BR,
Varun
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Does python support ATL Modelling Language?

2014-07-09 Thread varun bhatnagar
Thanks a lot William for the reply!
Before writing the previous mail I did a search but I was not able to find
anything which can fulfill my need.
I want something where in I can define certain rules for my xml and based
on those rules my xmls should get merged into another xml (probably XSLT,
still need to investigate).
All these things I was doing using ATL.
Anyways, I can still go through this and see if this works for me.

/Varun


On Wed, Jul 9, 2014 at 3:20 PM, William Ray Wing  wrote:

> On Jul 9, 2014, at 4:38 AM, varun bhatnagar  wrote:
>
> > Hi,
> >
> > I am trying to shift my application from JAVA to Python and in JAVA I am
> using ATL Transformations (modelling techniques). Is it possible to do that
> with Python, does python support ATL Transformations. If not is there any
> API/library/module which supports this?
> >
> > Any kind of help will be appreciated! :)
> >
> > Thanks,
> > BR,
> > Varun
> > --
> > https://mail.python.org/mailman/listinfo/python-list
>
> I know next to nothing about model transformation languages.  However, a
> few seconds in Wikipedia and Google turned up:
>
> http://www.lfd.uci.edu/~gohlke/code/transformations.py.html
>
> If you Google for “python model transformation” you will get a fair list
> of other possibilities.
>
> -Bill
-- 
https://mail.python.org/mailman/listinfo/python-list


xslt with python

2014-07-15 Thread varun bhatnagar
I am trying to merge two xmls using xslt in python but the content of first
xml is not getting copied. The rules written in xsl file created are
correct because if I am executing it without python (directly from eclipse
as I have xslt plugin installed) it is getting merged fine. Can anybody
help me? I am pasting my code snippet below:

*import lxml.etree as ET*

*dom = ET.parse(r'test_file_2.xml')*
*xslt = ET.parse(r'TestMergeRules.xsl')*
*transform = ET.XSLT(xslt)*
*print transform*
*newdom = transform(dom)*
*print(ET.tostring(newdom, pretty_print=True))*

I am opening other xml file (test_file_1.xml) in xsl file using
"document()" function.
Once this code is executed I can see only the content of test_file_2.xml.
Am I doing something wrong? Is there any other way to do this because my
xslt rules are working fine without python.

Thanks,
BR,
Varun
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: xslt with python

2014-07-15 Thread varun bhatnagar
Hi Tim,

Thanks a lot for the reply. I think I got the root cause of the problem.
Before merging I am creating one dummy xml file on the fly and I am copying
the content of first xml into that. This dummy file I am mentioning in xsl
file and the URI is changing because of which it is not getting merged.
I have to see how can I resolve the URI problem.


//Varun


On Tue, Jul 15, 2014 at 3:12 PM, Tim  wrote:

> On Tuesday, July 15, 2014 4:10:57 AM UTC-4, varun bhatnagar wrote:
> > I am trying to merge two xmls using xslt in python but the content of
> first xml is not getting copied. The rules written in xsl file created are
> correct because if I am executing it without python (directly from eclipse
> as I have xslt plugin installed) it is getting merged fine. Can anybody
> help me? I am pasting my code snippet below:
> >
> > import lxml.etree as ET
> > dom = ET.parse(r'test_file_2.xml')
> > xslt = ET.parse(r'TestMergeRules.xsl')
> > transform = ET.XSLT(xslt)
> > print transform
> >
> > newdom = transform(dom)
> > print(ET.tostring(newdom, pretty_print=True))
> >
> > I am opening other xml file (test_file_1.xml) in xsl file using
> "document()" function.
> >
> > Once this code is executed I can see only the content of test_file_2.xml.
> > Am I doing something wrong? Is there any other way to do this because my
> xslt rules are working fine without python.
> >
> Hi BR,
> Your code looks very close but not exactly equal to the tutorial here:
> http://lxml.de/xpathxslt.html#xslt
>
> Can you try the example on that page and report the results?
> Plus your platform, python version and lxml details as described here:
> http://lxml.de/FAQ.html#i-think-i-have-found-a-bug-in-lxml-what-should-i-do
>
> thanks,
> --Tim Arnold
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Removing xml element and strip extra space

2014-07-22 Thread varun bhatnagar
Hi,

I am trying to play around with python and xslt. I have an xml and I want
to transform it to another xml by deleting its one element. The xml is
pasted below:




  
  




I want to remove the  tag and this is how my xsl file looks like:


http://www.w3.org/1999/XSL/Transform";>


  

  

  







When I execute it my output looks like this:




*  *

**


I want to strip the space between ** and **
Can anyone suggest a way out to do that?

Thanks,
BR,
Varun
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Removing xml element and strip extra space

2014-07-22 Thread varun bhatnagar
Hi,

Thank you so much for the suggestion.
I tried using the rstrip() function but that did not work. Still getting a
blank space between ** and * *as mentioned in the
above output xml file:

**


* *

Is there any other way through which this can be achieved? Can't this be
handled by xslt itself in some way?

Thanks,
BR,
Varun


On Tue, Jul 22, 2014 at 2:23 PM, Monte Milanuk 
wrote:

> On 2014-07-22, varun bhatnagar  wrote:
> > I want to strip the space between ** and **
> > Can anyone suggest a way out to do that?
>
> Look at str.rstrip() - by default it removes trailing whitespace
> including carriage returns.
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Removing xml element and strip extra space

2014-07-22 Thread varun bhatnagar
Hi Tim,

Thanks for replying.
No that is not the output I am looking for.

I just want to scrape out 
But the way I have written my xsl file it is removing it but it is also
leaving a blank space there. I want my output to look like this:




**

**

But in actual it is showing like this:





< *I want to
remove this space* :)





On Tue, Jul 22, 2014 at 3:00 PM, Tim  wrote:

> On Tuesday, July 22, 2014 8:53:35 AM UTC-4, varun bhatnagar wrote:
> > Hi,
> > Thank you so much for the suggestion.
> > I tried using the rstrip() function but that did not work. Still getting
> a blank space between  and  as mentioned in the
> above output xml file:
> > 
> >  
> > Is there any other way through which this can be achieved? Can't this be
> handled by xslt itself in some way?
> >
> > Thanks,
> >
> > BR,
> > Varun
> > On Tue, Jul 22, 2014 at 2:23 PM, Monte Milanuk 
> wrote:
> > On 2014-07-22, varun bhatnagar  wrote:
> > > I want to strip the space between ** and **
> > > Can anyone suggest a way out to do that?
> > Look at str.rstrip() - by default it removes trailing whitespace
> > including carriage returns.
> > --
>
> Hi Varun,
> The whitespace is part of your original xml; the xslt is only preserving
> that whitespace. Do you have any control over the construction of that
> original xml?
>
> It looks like it has been tidied and whitespace perhaps added. I think you
> will get what you want if the original has the newlines removed:
> 
> 
> 
> 
> 
>
> does that get you what you're looking for? Is the whitespace actually
> necessary in the original or problematic in the result?
>
> --Tim Arnold
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


How to loop through nodes of xml through xslt

2014-07-30 Thread varun bhatnagar
Hi,

I have two xml files.

*File1.xml*

**
**
**
*  *
**
*  *
**
**
*  *
**

* *
*  *
**
*  *
**
**
*  *
**
**


*File2.xml*

**
**
**
*  *
**
*  *
**
**
*  *
**

* *
*  *
**
*  *
**
**
*  *
**
**


I am trying to fetch an output file which looks like this:

*Output.xml*

**
**
*  *
**
*  *
**
**
*  *
**
* *
*  *
**
*  *
**
**
*  *
**
**
*  *
**
*  *
**
**
*  *
**
* *
*  *
**
*  *
**
**
*  *
**
**

The number of Procedure tag () can be different every time. So I
have to read this tag every time from each xml and then merge it
sequentially.
Can anyone tell me how to achieve this. How can I loop every Procedure tag
and and append the attrProc attribute value in a sequential order?

Thanks,
BR,
Varun
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to loop through nodes of xml through xslt

2014-07-31 Thread varun bhatnagar
Hi Dan,

Thanks a lot for the reply. I am using lxml for the transformation and I am
parsing xsl file using lxml module, that is why posted in this list.
Is there any way out to achieve this?

Thanks,
BR,
Varun


On Thu, Jul 31, 2014 at 5:47 AM, Dan Stromberg  wrote:

> On Wed, Jul 30, 2014 at 5:16 AM, varun bhatnagar 
> wrote:
> > Hi,
> >
> > I have two xml files.
>
> > I am trying to fetch an output file which looks like this:
> >
> > Output.xml
>
> > The number of Procedure tag () can be different every time.
> So I
> > have to read this tag every time from each xml and then merge it
> > sequentially.
> > Can anyone tell me how to achieve this. How can I loop every Procedure
> tag
> > and and append the attrProc attribute value in a sequential order?
>
> Did you mean to send this to an XSLT mailing list?  You came through
> on the python-list.
>
> If you want to make this about Python, you could try xmltodict or
> lxml.  I've done two projects with xmltodict recently, and liked it
> quite a bit.
>
> HTH
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Interfacing my chess client with GNU chess using python

2006-09-18 Thread Varun Hiremath
Hello,
   I have written a chess client using python which is a graphic
   interface to play chess. It is at present a two player version,
   players move their peices by clicking two squares on the board as
   in any other chess clients. 
   Now i want to interface my program with the already available
   gnuchess program. Basically i want to feed the user input to the
   gnuchess and get the output and then display in my GUI. I have read
   about Popen but i couldn't figure out how to do it. Is there any
   other better ways of doing it. Any help would be appreciated.

 

-- 
-8<--8<--8<------8<
Varun Hiremath
Undergraduate Student,
Aerospace Engg. Department,
Indian Institute of Technology Madras,
Chennai, India
---
Webpage : http://www.ae.iitm.ac.in/~ae03b032
---

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


KPanelApplet using Python

2006-02-24 Thread Varun Hiremath
Hi,
I was wondering if there is any way to make KDE PanelApplets using Python. I 
have made a small window using Qt, kdeui nad kdecore libs. Now I want to add it 
to the KDE kicker. Can I get any help regarding this matter.

Thank you.

-- 
---
Varun Hiremath
461, Jamuna Hostel
IIT Madras,
Chennai - 600 036
mob : +919840299732
---
My Webpage : http://www.ae.iitm.ac.in/~ae03b032
---
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: KPanelApplet using Python

2006-02-24 Thread Varun Hiremath
On Fri, 24 Feb, 2006 at 05:51:55AM -0800, [EMAIL PROTECTED] wrote:
I want to make a PanelApplet and not a systray application. I tried KSystemTray 
and it works flawlessly but I want to add a widget to the taskbar like knews or 
kweather. I am trying to use the pyKDE's KPanelApplet class but I don't know 
exactly how to use it. I need some help regarding this.

Thank You

-- 
---
Varun Hiremath
461, Jamuna Hostel
IIT Madras,
Chennai - 600 036
mob : +919840299732
---
My Webpage : http://www.ae.iitm.ac.in/~ae03b032
---
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: KPanelApplet using Python

2006-02-24 Thread Varun Hiremath
On Fri, 24 Feb, 2006 at 09:55:59AM -0800, David Boddie wrote:
> Varun Hiremath wrote:
> 
> > I was wondering if there is any way to make KDE PanelApplets
> > using Python. I have made a small window using Qt, kdeui nad
> > kdecore libs. Now I want to add it to the KDE kicker. Can I
> > get any help regarding this matter.
> 
> The other responses in this thread have covered solutions that use
> the system tray, and you may want to try something like that with
> the KSystemTray class in kdeui. It's available in PyKDE, so you
> shouldn't have any trouble adding new items to kicker that way.
> 
> However, you asked specifically about Panel Applets. Unfortunately,
> they are a lot more difficult to implement in Python because you
> need to write a library in C++ to load them. Some of us in the
> PyQt/PyKDE community did some work towards that, and had working
> applets but, as far as I know, they don't work with recent releases.
> 
> You might get some additional help or advice about this if you try
> mailing the PyKDE list:
> 
> http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
> 
> Good luck!
> 
> David

Hi,
Actually I want to fetch some text from a HTML Page and then display it using 
KPanelApplet.I am using BeautifulSoup for Parsing the HTML Page which I can do 
easily in Python . Now I don't want to switch to C++ because Parsing there will 
be tough. Can you suggest me some other way to do this.

Thank You


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

-- 
---
Varun Hiremath
461, Jamuna Hostel
IIT Madras,
Chennai - 600 036
mob : +919840299732
---
My Webpage : http://www.ae.iitm.ac.in/~ae03b032
---
-- 
http://mail.python.org/mailman/listinfo/python-list


Problem rendering indic fonts in Tkinter

2008-06-09 Thread varun embar
Hi,
I was trying to build a kannada word processor using tkinter.But i have some
problem rendering conjunct consonants.
For eg:-
a = Text(root)
a.insert(INSERT,unichr(0x0c95)+unichr(0x0ccd)+unichr(0x0c95))

this gives two separate consonants rather than one conjunct consonant
--
http://mail.python.org/mailman/listinfo/python-list

passing control to other window

2008-06-21 Thread varun chadha
i am trying to develop a application using Tkinter in which a new
window pops out on a particular button press.though i can pass control
automatically to that window using .force_focus() method and disabling
all my widgets in previous window but the technique is not so clean.
for eg. when u click 'save' a window pops out asking for location but
u can still close your previous window using the 'cross-mark' on top
right corner with save window still open.
can anyone help me out!
--
http://mail.python.org/mailman/listinfo/python-list


connecting to DBMS

2008-07-01 Thread varun chadha
i am a newbie to python and is working on an application which needs
to connect to the database. can anyone guide me through the DBMS that
i can use and the module to connect to it. currently i have MySQL
installed using the link on the python.org site but is unable to
connect to it through python. pls specify the link  to the tutorials
which can guide to connect and execute my query. hopes u understood
what i meant to say.
thanks in advance
--
http://mail.python.org/mailman/listinfo/python-list


controlling the windows

2008-07-03 Thread varun chadha
i am developing an application using Tkinter where 'next'  button
takes to another window and removes the first one from screen and
'back' button bring me back to previous window and so on.
though i am able to move from one window to another but is unable to
remove the previous one from the screen. does anybody have a idea how
to do away with this problem.
--
http://mail.python.org/mailman/listinfo/python-list