extract Infobox contents

2009-04-06 Thread Anish Chapagain
Hi, I was trying to extract wikipedia Infobox contents which is in format like given below, from the opened URL page in Python. {{ Infobox Software | name = Bash | logo = [[Image:bash-org.png|165px]] | screenshot = [[Image:Bash demo.png|250px]] | cap

error

2008-07-21 Thread Anish Chapagain
from Tkinter import * root=Tk() f=Frame(root,height=200,width=200) b=Button(f,text="quit",command=f.quit) f.pack() root.mainloop() -- from Tkinter import * import sys root=Tk() f=Frame(root,height=200,width=200) b=Button(f,text="quit",command=sys.exi

Re: error

2008-07-21 Thread Anish Chapagain
On Jul 21, 1:47 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Anish Chapagain wrote: > > from Tkinter import * > > root=Tk() > > f=Frame(root,height=200,width=200) > > b=Button(f,text="quit",com

regarding SWIG

2008-07-22 Thread Anish Chapagain
Hi.. I'm new to SWIG and need to create Wrapper for C code, so, I have installed the SWIG already but doesnot know how to run it for generating Interface file... My C code is in message.c so what do i need to do the first step..uisng SWIG..i read the documentation but cannot grasp creating interfac

Re: automating python programs

2008-07-22 Thread Anish Chapagain
On Jul 21, 7:28 pm, "Dan Upton" <[EMAIL PROTECTED]> wrote: > On Mon, Jul 21, 2008 at 2:12 PM, Zach Hobesh <[EMAIL PROTECTED]> wrote: > > Hi, > > > I'm trying to figure out how to run a python program on a schedule, maybe > > every half an hour...  Is this possible? > > > Thanks! > > > -Zach > > > -

Wrapping C with Python

2008-08-04 Thread Anish Chapagain
Hi!! I tried wrapping a simple C code suing SWIG to Python, but am having problem, my .c file is, Step 1: example.c -- double val=3.0; int fact(int n) { if(n<=1) return 1; else return n*fact(n-1); } int mod(int x, int y) { return (x%y); } Step 2: I then created interface file as. exa

Wrapping C API

2008-08-04 Thread Anish Chapagain
Hi!! I'm new to python and have a task for Wrapping up an old program written in C(20.c files), to provide GUI and chart,graph feature in Python. I've tried using SWIG but am not getting well in windows system, wish to receive guidelines for initiating the task... -- http://mail.python.org/mailman

Re: Wrapping C with Python

2008-08-04 Thread Anish Chapagain
On 4 Aug, 14:14, brad <[EMAIL PROTECTED]> wrote: > RPM1 wrote: > > ... > > > Basically you just compile your C code as a regular C code dll.  ctypes > > then allows you to access the functions in the dll very easily. > > Does that work with C++ code too or just C? Hi.. I havenot tried..before with

Re: Wrapping C API

2008-08-04 Thread Anish Chapagain
On 4 Aug, 14:20, Ulrich Eckhardt <[EMAIL PROTECTED]> wrote: > Anish Chapagain wrote: > > I'm new to python and have a task for Wrapping up an old program > > written in C(20.c files), to provide GUI and chart,graph feature in > > Python. I've tried using SW

Parse error befor % token

2008-08-13 Thread Anish Chapagain
Hi, i tried to compile the swig .i file but am having probel with the error: parse error before % token example.i 1. %module example 2. %{ 3. #include 4. %} 5. 6. %include "header.h" i have setup.py file and am running through, >>python setup.py build_ext but is showing parse error before % to

Re: How to access an Array and a struct within a struct wrapped by Swig ?

2008-08-16 Thread Anish Chapagain
pedef struct { int sage; }coll; within .h file and access similarly. regard's Anish Chapagain www.mysticnepal.com On Aug 16, 11:38 am, [EMAIL PROTECTED] wrote: > Hello, > > I spent almost a week to be able to embed Python within my C++ game > engine. > I wrote a mini-tutorial of

handling Struct and global function for C module

2008-08-18 Thread Anish Chapagain
Hi, I have Structure in C, program and the structure is being used with various function inside C coding but am getting undefined referenced to global method and few of them too uses the sturct module. my problem goes like this, ex.h --- #define NIL 0 /* Indicates ptr is

Re: handling Struct and global function for C module

2008-08-18 Thread Anish Chapagain
On Aug 18, 8:43 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Anish Chapagain wrote: > > but while running setup.py build with distutils it's showing error as > > > _ex.o: In function 'init_arguments': > >      _ex.c :89: undefined reference to _

file data to list

2008-08-28 Thread Anish Chapagain
Hi!! I am facing problem for extracting file data to the list so as to have graph plotted through list. my file(eg: data.txt) is having data like this, cnt0001a 29000 xretya 01 cnt0002a 29850 brishal 02 cnt0003a 31250 kristal 03 from here, I need to copy data 29000, 29850, 31250 into a single lis

problem with plotting

2008-08-29 Thread Anish Chapagain
hi, I'm getting problem with the code below which after displaying graph plotted in external window, doesnot closes itself, even after closing the window of plotting the main python window shows processing. code goes like this... plot(col1, col2, linewidth=1.0) xlabel('col1') ylabel('col2') title(

Re: problem with plotting

2008-08-29 Thread Anish Chapagain
On Aug 29, 12:24 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Aug 29, 6:01 am, Anish Chapagain <[EMAIL PROTECTED]> wrote: > > > > > > > hi, > > I'm getting problem with the code below which after displaying graph > > plotte

Multiple window handling

2008-09-01 Thread Anish Chapagain
Hi!! I'm trying to program an application which have multiple windows and is capable of executing method defined inside class of one another, i tries a simpel frame work here and am creating Toplevel inside method as the new window to be genereated, and again want another window to be loaded when t

installing matplotlib with cygwiin

2008-09-03 Thread Anish Chapagain
Hi!! I need to run matplotlib for one project with pylab and scipy module, i'm using cygwin so as to link system call operation with few GUI support, but am unable to install numpy and scipy without these matplotlib is also not installed Please help me for proper installation of these module in cy

Re: installing matplotlib with numpy and scipy for Python in Cygwin

2008-09-03 Thread Anish Chapagain
On Sep 3, 12:39 pm, Uwe Schmitt <[EMAIL PROTECTED]> wrote: > On 3 Sep., 11:42, "chapagainanish" <[EMAIL PROTECTED]> wrote: > > > Hi!! > > I'm having installation problem for installing numpy and scipy in > > Cygwin for Python, and am obstruct in madway for project, i followed > > scipy.org guidelin