Newbie

2006-08-08 Thread pranav
Hi,
I am new to python. I wanted to know how can i debug a python program.
Is there a gdb equivalent?

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


Re: Newbie

2006-08-08 Thread pranav

Diez B. Roggisch wrote:
> pranav wrote:
>
> > Hi,
> > I am new to python. I wanted to know how can i debug a python program.
> > Is there a gdb equivalent?
>
> pdb, a standard module.
>
> I use it like this:
>
>
> def some_method_I_want_to_debug():
> import pdb
> pdb.set_trace()
> # more code to come
>
>
> But that is only one way of using it - read the docs.
> 
> Diez

Thanks

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


Executing WinXP commands using os module

2009-01-23 Thread pranav
Greetings,
I am writing a code to perform operations like checkout, check-in and
others for SS. (SS is the command line utility for Visual SafeSource,
VSS). I am familiar with all the commands for this purpose. I know
li'l python also.
What i want to learn is how do i use the command line arguments in os
(or any other call that will fulfill my purpose). I can use popen to
create a command prompt. But i need to use commands like

ss checkout $\projectName\file -Yusername,password -c'Test comment'

Please help me.

Thanks in advance,
Regards

Pranav Prakash

http://codecontrol.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Executing WinXP commands using os module

2009-01-23 Thread pranav
On Jan 23, 5:05 pm, Chris Rebert  wrote:
> On Fri, Jan 23, 2009 at 3:50 AM, pranav  wrote:
> > Greetings,
> > I am writing a code to perform operations like checkout, check-in and
> > others for SS. (SS is the command line utility for Visual SafeSource,
> > VSS). I am familiar with all the commands for this purpose. I know
> > li'l python also.
> > What i want to learn is how do i use the command line arguments in os
> > (or any other call that will fulfill my purpose). I can use popen to
> > create a command prompt. But i need to use commands like
>
> > ss checkout $\projectName\file -Yusername,password -c'Test comment'
>
> You want the `subprocess` module. 
> Seehttp://docs.python.org/library/subprocess.html
>
> Cheers,
> Chris
>
> --
> Follow the path of the Iguana...http://rebertia.com

Thanks, will try it
--
http://mail.python.org/mailman/listinfo/python-list


Monitor Internet connections in XP/Vista

2009-02-02 Thread pranav
Hi Folks,

I am designing a project for Windows XP/Vista, one part of which is a
background process that monitors internet connections. If the user
tries to connect to any particular site, say myDummySite.com in then
some actions are taken, based on fixed policies.
This can be thought of a mini firewall.

I am sure there must be some good libraries for this purpose. I need
the names of those libraries.

Thanks,

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


String search

2009-02-27 Thread pranav
Greeting fellow pycoders,

I have a script that browses large codes and replaces certain text
with some other text. Of lately i observed an issue.Some of the
original text were like


,N'#attributes.SOFTPREREQ#'


My module does scan this code and suggests replacement to this code.
But when i use the string.replace() method, it just fails. A
string.find() for above code in the whole file returns code -1.
Where am i going wrong? I figure it could be something to do with
character encoding or else.

Please someone guide me soon. I have a deadline to attend :-(

Thanks in advance,

Pranav


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


Use of HTMLparser to change language

2009-03-20 Thread pranav
Greetings All,

I have huge number of HTML files, all in english. I also have their
counterpart files in Spanish. The non english files have their look
and feel a little different than their english counterpart.

My task is to make sure that the English HTML files contain the
Spanish text, with retaining the English look and feel.

The most obvious and stupid way is to open the English and Spanish
files in some HTML Editor. Look for the english text, see its
counterpart in spanish and then replace it. (I don't know spanish, but
as i said the look and feel is only little different, so i can easily
guess which text is what + google translate).

I am sure there is a python way of solving this problem.

Can anyone help me out with some solution.

Thanks,

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


Re: Use of HTMLparser to change language

2009-03-20 Thread pranav
On Mar 20, 3:53 pm, Marco Mariani  wrote:
> pranav wrote:
> > I am sure there is a python way of solving this problem.
>
> The common sense approach (nothing to do with python) would be to
> rewrite everything to be dynamically generated with a template language
> - in python those would be TAL, mako, genshi, jinja, whatever ...
> anything is better than the current solution.

Hmm ya, that is THE best thing, if this were an application. These are
plain HTML files and needs to be shipped with CDs. Also, it is not in
the design to use anything executable.
--
http://mail.python.org/mailman/listinfo/python-list


Bypassing WebFilter security

2008-07-10 Thread pranav
Hello everyone,
I am working in an organization, which is using a very strict
webcontent filter management suite. Due to this i am unable to
download any exe file, or surf web (even the necessary downloads from
sourceforgenet are blocked). I was wondering, if python could be of
any help. Say i have a python script, and i pass the URL of
downloadable file, and it just downloads the file for me.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Bypassing WebFilter security

2008-07-11 Thread pranav
On Jul 11, 11:42 am, "Daniel Fetchinson" <[EMAIL PROTECTED]>
wrote:
> >> I am working in an organization, which is using a very strict
> >> webcontent filter management suite. Due to this i am unable to
> >> download any exe file, or surf web (even the necessary downloads from
> >> sourceforgenet are blocked). I was wondering, if python could be of
> >> any help. Say i have a python script, and i pass the URL of
> >> downloadable file, and it just downloads the file for me.
>
> > Nice try. Can I talk to your employer for a minute? :)
>
> > Honestly, the language doesn't make any difference here, and there isn't
> > much
> > you can do unless you control both sides, i.e. the server and the client.
> > But
> > I would suggest you actually talk to your employer yourself to see if
> > there's
> > an official way to get what you want.
>
> Yes, the language itself doesn't matter as long as you go through the
> web. But if I were you I would use an ssh client to ssh to a remote
> machine on which I have an account, download the file there to that
> machine and scp it to the local machine. Assuming of course port 21 is
> not blocked.
>
> In fact, this is something I do regularly for similar reasons :)
>
> Good luck,
> Daniel
> --
> Psss, psss, put it down! -http://www.cafepress.com/putitdown

Daniel, cool even i thought of the same thing, but you see, the
assumption has no use in my case! It is also blocked, Anyways, i will
talk to the system admins here. Thanks all
--
http://mail.python.org/mailman/listinfo/python-list


Understanding bmp image files

2008-04-02 Thread pranav
Hello,
I want to read a BMP file, do some processing and then write it in a
new file. The problem is in the third step. For reading the file, i
have converted the file into decimal numbers, representing the pixel
values. Then i perform calculations on those decimal numbers. Now i am
unable to convert those into the format as required by the "bmp" file.
Any one, who is into image reading/manipulation, please help.
-- 
http://mail.python.org/mailman/listinfo/python-list


Installing Python 2.5 with Python 2.6

2009-11-29 Thread pranav
Hi,
I used to develop applications on Google AppEngine SDK (which supports
Python 2.5) on my Fedora 10.
I upgraded to Fedora 12 recently and it has Python 2.6.
Unfortunately, some things are breaking up with the SDK. Here is the
trace http://dpaste.com/hold/126668/
I had been suggested by the  AppEngine guys to install Python 2.5.
So i wanted to know --  is it safe to install Python 2.5 alongwith
Python 2.6? How will i configure my OS to use Python 2.6 (which was
there already) and the SDK to use Python 2.5, which i will install
new?
Any other issues/suggestions/comments anyone?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Installing Python 2.5 with Python 2.6

2009-11-29 Thread pranav
On Nov 29, 11:06 pm, pranav  wrote:
> Hi,
> I used to develop applications on Google AppEngine SDK (which supports
> Python 2.5) on my Fedora 10.
> I upgraded to Fedora 12 recently and it has Python 2.6.
> Unfortunately, some things are breaking up with the SDK. Here is the
> tracehttp://dpaste.com/hold/126668/
> I had been suggested by the  AppEngine guys to install Python 2.5.
> So i wanted to know --  is it safe to install Python 2.5 alongwith
> Python 2.6? How will i configure my OS to use Python 2.6 (which was
> there already) and the SDK to use Python 2.5, which i will install
> new?
> Any other issues/suggestions/comments anyone?

here, http://wtanaka.com/linux/f11#python25 . this page talks about
installing Python 2.5 on fedora 11. Anyone knows a similar resource
for Python 2.5 on Fedora 12?
-- 
http://mail.python.org/mailman/listinfo/python-list


save CRL to a file (M2Crypto.X509.CRL object)

2010-03-03 Thread pranav
I do not see an option to save M2Crypto.X509.CRL object to a file. Am
I overlooking something?

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


Ole version set as default

2023-03-29 Thread Pranav Bhardwaj
Dear sir,
   I am Pranav Bhardwaj and I stuck in a problem. My problem is
that in my system I have python 3.11.2 but when I type python in my command
prompt, my command prompt show that python version 2.7.13 as a default. And
I can't be able to find python 2.7.13 in my system in any file and I tried
various methods to set python 3.11.2 as a default but can't be able to do
so. I tried to change environment variables, try to find and delete python
2.7.13 , try to set python 3.11.2 as default, but I can't be able to do so.
So can you help me how can I solve this problem?
-- 
https://mail.python.org/mailman/listinfo/python-list


Problem in using libraries

2023-04-03 Thread Pranav Bhardwaj
Why can't I able to use python libraries such as numpy, nudenet, playsound,
in python 3.11.2
-- 
https://mail.python.org/mailman/listinfo/python-list


Problem in using libraries

2023-04-03 Thread Pranav Bhardwaj
Why can't I able to use python libraries such as numpy, nudenet, playsound,
pandas, etc in my python 3.11.2. It always through the error "import
'numpy' or any other libraries could not be resolved".
-- 
https://mail.python.org/mailman/listinfo/python-list


Read only files

2005-07-19 Thread Pranav Bagora
Hello,

I am getting a permission Denied error when i am
trying to make changes in some read only files in a
directory. How do we check and change the read only
attributes of files in python.

Please Help,
Pranav





__ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail
-- 
http://mail.python.org/mailman/listinfo/python-list


Getting TypeError in Changing file permissions

2005-07-22 Thread Pranav Bagora
Hello ,
i am trying to change mode of files using the 
os.chmod()function. But i am getting an error 

" os.chmod(outfile,0700)
TypeError: coercing to Unicode: need string or buffer,
file found"

Please Help,
Pranav

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python-list Digest, Vol 23, Issue 18

2005-08-01 Thread Pranav Bagora
hello,

I am trying to write a python code which reads a web
service and creates its corresponding wsdl file. Any
idea how to do it.

Thanks
Pranav  





__ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail
-- 
http://mail.python.org/mailman/listinfo/python-list


Script for generating WSDL

2005-08-01 Thread Pranav Bagora
hello,

I am trying to write a python code which reads a web
service and creates its corresponding wsdl file. Any
idea how to do it.Please help

Thanks
Pranav  


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-- 
http://mail.python.org/mailman/listinfo/python-list