"ADMISSION IN FA FSC" "ADMISSION IN FA/FSC" "ADMISSION IN GC UNIVERSITY LAHORE" "ADMISSION IN SCIENCE COLLEGE LAHORE" "ADMISSION IN KIPS LAHORE" "ADMISSION IN LEADERSHIP COLLEGE LAHORE" "ADMISSION I

2009-08-01 Thread Riaz Ahmad
"ADMISSION IN FA FSC" www.admissionspk.blogspot.com "ADMISSION IN FA/FSC" www.admissionspk.blogspot.com "ADMISSION IN GC UNIVERSITY LAHORE" www.admissionspk.blogspot.com "ADMISSION IN SCIENCE COLLEGE LAHORE" www.admissionspk.blogspot.com "ADMISSION IN KIPS LAHORE" www.admissi

fil open close very slow

2009-08-01 Thread Robert Robert
hiya all, I have a "large" script written in python. There is in that big script at a certain point a loop in which I create a lots of simple small text files. Each text file just contain I think 4 or 5 short lines. When I simply run it in IDLE, it runs fast. But when I compile it to binary file

Re: possible to round number and convert to string?

2009-08-01 Thread r
On Jul 31, 7:42 pm, "Dr. Phillip M. Feldman" wrote: > This was very close to what I wanted.  Thanks!  My final code looks like > this: > > def num2str(x,f=4): >    """Convert x (int or float) to a string with f digits to right of >    the decimal point.  f may be zero or negative, in which case th

Re: possible to round number and convert to string?

2009-08-01 Thread Mark Dickinson
On Jul 31, 11:17 pm, "Dr. Phillip M. Feldman" wrote: > I'd like to be able to convert a float to a string representation in which > the number is rounded to a specified number of digits.  If num2str is a > hypothetical function that does this, then num2str(pi,3) would be '3.142' > (not '3.141').

Aug 1 & 16- Global VOIP Free SW HW Culture meeting, BerkeleyTIP, For Forwarding

2009-08-01 Thread john_re
Interested in joining the friendly global Free SW HW & Culture communities in a global Voice meeting? You´re invited. :) You can join from your home, or better: get a local meeting together. Tip: a college WiFi cafe could be a great local meeting place. Make sure you have a VOIP headset! For

problem in event handling on change of variable value.

2009-08-01 Thread sirjee
hello; i m facing a problem in handling events on change of value of environment variable in a tool CANoe. class CANoeEvents: def OnChange(self,value): print "value of environment variable has changed" def OnOpen(self,App): print "opening Application" App_Event = Dispatch

Re: socket policy flash help

2009-08-01 Thread paul
NighterNet schrieb: I need help on the policy to able to let access to user to the server once the policy access is finish. I been trying to find a good example, but I got no luck. Using python version 3.1. Here the code I tested but it not working. if str(buff) == str("b\'\\x00\'"):

Re: Newbie Question regarding __init__()

2009-08-01 Thread Dave Angel
Nat Williams wrote: As MRAB described, ALL instance methods need to accept 'self' as a first parameter, as that will be passed to them implicitly when they are called. This includes __init__. The name 'self' is just a commonly accepted convention for the name of the instance object passed to met

Re: Confused About Python Loggin

2009-08-01 Thread Vinay Sajip
On Jul 31, 2:04 pm, Jean-Michel Pichavant wrote: > Jannik Sundø wrote: > > Hi all. I think I fixed this problem by setting fileLogger.propagate = > > 0. Otherwise it will propagate up to the root logger, which outputs to > > stdout, as far as I can understand. > > > On 31 Jul 2009, at 01:17, Janni

Re: socket policy flash help

2009-08-01 Thread Piet van Oostrum
> NighterNet (N) wrote: >N> I need help on the policy to able to let access to user to the server >N> once the policy access is finish. I been trying to find a good >N> example, but I got no luck. Using python version 3.1. >N> Here the code I tested but it not working. >N> if str(buff) == s

How to read webpage

2009-08-01 Thread tarun
Dear All,I want to read a webpage and copy the contents of it in word file. I tried to write following code: import urllib2 urllib2.urlopen("http://www.rediff .com/") *Error:-* urllib2.urlopen("http://www.icicibank.com/";) File "C:\Python25\lib\urllib2.py", line 121

Re: How to read webpage

2009-08-01 Thread MRAB
tarun wrote: Dear All, I want to read a webpage and copy the contents of it in word file. I tried to write following code: import urllib2 urllib2.urlopen("http://www.rediff.com/";) *Error:-* urllib2.urlopen("http://www.icicibank.com/";) File "C:\Python25\lib\urllib2.py", line 121, in u

Re: How to read webpage

2009-08-01 Thread koranthala
On Aug 1, 6:52 pm, MRAB wrote: > tarun wrote: > > Dear All, > > I want to read a webpage and copy the contents of it in word file. I > > tried to write following code: > > > import urllib2 > > urllib2.urlopen("http://www.rediff.com/";) > > > *Error:-* > > >     urllib2.urlopen("http://www.iciciban

Re: How to read webpage

2009-08-01 Thread Jon Clements
On 1 Aug, 14:52, MRAB wrote: > tarun wrote: > > Dear All, > > I want to read a webpage and copy the contents of it in word file. I > > tried to write following code: > > > import urllib2 > > urllib2.urlopen("http://www.rediff.com/";) > > > *Error:-* > > >     urllib2.urlopen("http://www.icicibank.

Re: socket policy flash help

2009-08-01 Thread NighterNet
On Aug 1, 4:52 am, Piet van Oostrum wrote: > > NighterNet (N) wrote: > >N> I need help on the policy to able to let access to user to the server > >N> once the policy access is finish. I been trying to find a good > >N> example, but I got no luck. Using python version 3.1. > >N> Here the code

Re: How to read webpage

2009-08-01 Thread Marcus Wanner
On 8/1/2009 11:31 AM, Jon Clements wrote: On 1 Aug, 14:52, MRAB wrote: tarun wrote: Dear All, I want to read a webpage and copy the contents of it in word file. I tried to write following code: import urllib2 urllib2.urlopen("http://www.rediff.com/";) *Error:-* urllib2.urlopen("http://www.

Re: Python docs disappointing

2009-08-01 Thread Nobody
On Fri, 31 Jul 2009 20:10:45 +, kj wrote: > I'm pretty new to Python, and I like a lot overall, but I find the > documentation for Python rather poor, overall. FWIW, I find the module documentation to be mostly adequate. What's missing is a human-readable language *manual*. The tutorial omit

M2Crypto: AttributeError: 'CSR' object has no attribute 'pkey'

2009-08-01 Thread Matthias Güntert
Hello python-guys I am trying to build a python based certificate authority using m2crypto. I am quite new to python and I am asking myself why my code snippets below throw the following Traceback: $ python csr.py ... ... Traceback (most recent call last): F

Re: os.path.exists() and Samba shares

2009-08-01 Thread Michel Claveau - MVP
Hi! > SAMBA is a Linux implementation of the SMB protocol, natively supported on > Windows. Right. But, with Vista or Seven, only recents releases of Samba are supported. And, Samba know only NTLM release 2 (in register: HKLM\SYSTEM\CurrentControlSet\Control\Lsa value LMCompatibilityLevel

Re: JavaScript toolkits (was Re: ANN: Porcupine Web Application Server 0.6 is released!)

2009-08-01 Thread lkcl
On Jul 20, 4:00 pm, a...@pythoncraft.com (Aahz) wrote: > Out of curiosity, are there anyJavaScripttoolkits or python-to-javascript compilers > that generate code > that degrades gracefully whenJavaScriptis disabled? http://advogato.org/article/981.html you'll need to do a little bit of work

Queryable Daemon

2009-08-01 Thread Justin DeCell
Hi All, I was hoping for a little help with a project I'm working on. I'm writing a daemon in python that I want to be queryable (i.e. I should be able to run foo -s and it will report some internal information about the foo daemon if it's running) but I can't figure out a way get inform

Re: JavaScript toolkits (was Re: ANN: Porcupine Web Application Server 0.6 is released!)

2009-08-01 Thread lkcl
On Jul 21, 12:55 pm, Paul Boddie wrote: > On 20 Jul, 18:00, a...@pythoncraft.com (Aahz) wrote: > > > > > Out of curiosity, are there anyJavaScripttoolkits that generate code > > that degrades gracefully whenJavaScriptis disabled? > > You mean "Web toolkits which useJavaScript", I presume. I have >

Re: M2Crypto: AttributeError: 'CSR' object has no attribute 'pkey'

2009-08-01 Thread Heikki Toivonen
Matthias Güntert wrote: > class CSR(object): > def __init__(self): > pass > > def create_cert_signing_request(keypair, cert_name, > cert_extension_stack=None): You missed self. Although this method does not seem to be using any instance data so there isn't actually much reason to

Re: Python docs disappointing

2009-08-01 Thread jkn
On Aug 1, 4:18 am, Terry Reedy wrote: > This is one area where Windows users seems to have an advantage. The > standard installer includes the doc set as a Windows help file. I often > keep that open in one window while programming in others. I only later > discovered that this was a copy of the

Re: Queryable Daemon

2009-08-01 Thread MRAB
Justin DeCell wrote: Hi All, I was hoping for a little help with a project I'm working on. I'm writing a daemon in python that I want to be queryable (i.e. I should be able to run foo -s and it will report some internal information about the foo daemon if it's running) but I can't figure out

Re: Python docs disappointing

2009-08-01 Thread Tim Golden
jkn wrote: The ActiveState distribution also includes the doc set as a CHM file (the canonical version didn't used to; one reason why I've used ActiveState in the past). It has done for quite some while now: Python 2.3 was the first and that was released, what, six years ago. Still, you're rig

iterate lines with regex

2009-08-01 Thread Michael Savarese
I'm a python newbie and I'm trying to test several regular expressions on the same line before moving on to next line. it seems to move on to next line before trying all regular expressions which is my goal. it only returns true for first regular expression does the curser have to be rest to beginn

Re: Python docs disappointing

2009-08-01 Thread jkn
Hi Tim On Aug 1, 8:32 pm, Tim Golden wrote: > > > Unfortunately, the combination of the python 2.6 CHM helpfile style, > > and the KChmViewer application gives me body text which is almost > > unreadable (black text on dark blue background). I'm not sure if this > > a bug in KChmViewer but it's p

Re: Python docs disappointing

2009-08-01 Thread jkn
update: if I set 'use KHTMLPart-based widget' instead of 'QTextBrowser- based Widget' to display HTML content in the application settings of KchmViewer, all is readable. Hurrah! I wonder if it is picing up some QT stylesheet I have lying around in an over-clever way... J^n -- http://mail.py

Re: iterate lines with regex

2009-08-01 Thread Jochen Schulz
Michael Savarese: > > for line in readThis: > try: > thisKey = key.search(line).group(1) > thisMap = map.search(line).group(1) > thisParcel = parcel.search(line).group(1) > except: > continue Why do you catch all exceptions in that loop? Remove the try-exce

Re: iterate lines with regex

2009-08-01 Thread Mark Lawrence
Michael Savarese wrote: I'm a python newbie and I'm trying to test several regular expressions on the same line before moving on to next line. it seems to move on to next line before trying all regular expressions which is my goal. it only returns true for first regular expression does the curser

Re: Module updating plans for Python 3.1: feedparser, MySQLdb

2009-08-01 Thread Buck
I use MySQLdb quite a bit in my work. I could volunteer to help update it. Are there any particular bugs we're talking about or just a straight port to 3.0? --Buck On Jul 31, 6:32 pm, John Nagle wrote: >     Any progress on updating feedparser and MySQLdb for Python 3.x in the > foreseeable futu

Re: Queryable Daemon

2009-08-01 Thread garabik-news-2005-05
MRAB wrote: > Justin DeCell wrote: >> Hi All, >> ... >> The only other way I thought >> of would be to write to a file on disk every so often from the daemon >> and just read the from the query process but it seems like there should >> be a more elegant way to do this... >> >> By the way I'

"PAK WEB PAGES" "PAK WEB SITES" "PAK WEB PAGES" "PAK WEB SITES" "PAK WEB PAGES" "PAK WEB SITES" ON www.pak-web-pages.blogspot.com

2009-08-01 Thread saima81
"PAK WEB PAGES" www.pak-web-pages.blogspot.com "PAK WEB SITES" www.pak-web-pages.blogspot.com "PAK WEB PAGES" www.pak-web-pages.blogspot.com "PAK WEB SITES" www.pak-web-pages.blogspot.com "PAK WEB PAGES" www.pak-web-pages.blogspot.com "PAK WEB SITES" www.pak-web-pages.blogspot

Newbie thwarted by sys.path on Vista

2009-08-01 Thread Michael M Mason
I'm running Python 3.1 on Vista and I can't figure out how to add my own directory to sys.path. The docs suggest that I can either add it to the PYTHONPATH environment variable or to the PythonPath key in the registry. However, PYTHONPATH doesn't exist, and updating the registry key has no e

Re: How to read webpage

2009-08-01 Thread James Matthews
Check your connection to the internet. On Sat, Aug 1, 2009 at 6:43 PM, Marcus Wanner wrote: > On 8/1/2009 11:31 AM, Jon Clements wrote: > >> On 1 Aug, 14:52, MRAB wrote: >> >>> tarun wrote: >>> Dear All, I want to read a webpage and copy the contents of it in word file. I tried t

Re: Calling functions: Why this complicated ?

2009-08-01 Thread lkcl
On Jul 14, 11:31 pm, Chris Rebert wrote: > On Tue, Jul 14, 2009 at 1:40 PM, Mohan Parthasarathy > wrote: > > Hi, > > I am a newbie. I am reading > >http://www.network-theory.co.uk/docs/pytut/KeywordArguments.html > > Defining a function with "N" arguments and calling them in "M" different > > way

Re: Newbie thwarted by sys.path on Vista

2009-08-01 Thread Jon Clements
On 1 Aug, 22:58, "Michael M Mason" wrote: > I'm running Python 3.1 on Vista and I can't figure out how to add my own > directory to  sys.path. > > The docs suggest that I can either add it to the PYTHONPATH environment > variable or to the PythonPath key in the registry.  However, PYTHONPATH > doe

Re: Newbie thwarted by sys.path on Vista

2009-08-01 Thread Piet van Oostrum
> "Michael M Mason" (MMM) wrote: >MMM> I'm running Python 3.1 on Vista and I can't figure out how to add my own >MMM> directory to sys.path. >MMM> The docs suggest that I can either add it to the PYTHONPATH environment >MMM> variable or to the PythonPath key in the registry. However, PYTHO

Re: string.Template issue

2009-08-01 Thread Aahz
In article , Javier Collado wrote: > >In the string.Template documentation >(http://docs.python.org/library/string.html) it's explained that if a >custom regular expression for pattern substitution is needed, it's >possible to override idpattern class attribute (whose default value is >[_a-z][_a-

Re: Newbie thwarted by sys.path on Vista

2009-08-01 Thread Dave Angel
Michael M Mason wrote: I'm running Python 3.1 on Vista and I can't figure out how to add my own directory to sys.path. The docs suggest that I can either add it to the PYTHONPATH environment variable or to the PythonPath key in the registry. However, PYTHONPATH doesn't exist, and updating

Re: Newbie thwarted by sys.path on Vista

2009-08-01 Thread David Lyon
On Sat, 1 Aug 2009 22:58:53 +0100, "Michael M Mason" wrote: > I'm running Python 3.1 on Vista and I can't figure out how to add my own > directory to sys.path. > > The docs suggest that I can either add it to the PYTHONPATH environment > variable or to the PythonPath key in the registry. Howe

Shortest path code on real map

2009-08-01 Thread Joongkoo Cho
Dear All, I'm trying to calculate shortest paths on US highway map. I understand how shortest path algorithms work in Python but I need helps to do it on real maps. How can I make link-node information? Best, John -- http://mail.python.org/mailman/listinfo/python-list

Re: Predefined Variables

2009-08-01 Thread Fred Atkinson
On Thu, 23 Jul 2009 15:28:50 +0200, "Diez B. Roggisch" wrote: >Fred Atkinson wrote: > >> Is there a pre-defined variable that returns the GET line >> (http://www.php.net/index.php?everythingafterthequestionmark) as a >> single variable (rather than individual variables)? > >Variables don't return

Custom namespaces

2009-08-01 Thread Steven D'Aprano
I was playing around with a custom mapping type, and I wanted to use it as a namespace, so I tried to use it as my module __dict__: >>> import __main__ >>> __main__.__dict__ = MyNamespace() Traceback (most recent call last): File "", line 1, in TypeError: readonly attribute Why is __dict__ ma

Re: string.Template issue

2009-08-01 Thread Red Forks
On Thu, Jul 30, 2009 at 4:17 PM, Javier Collado wrote: > Hello, > > In the string.Template documentation > (http://docs.python.org/library/string.html) it's explained that if a > custom regular expression for pattern substitution is needed, it's > possible to override idpattern class attribute (wh

Re: Custom namespaces

2009-08-01 Thread Red Forks
On Sun, Aug 2, 2009 at 9:06 AM, Steven D'Aprano < st...@remove-this-cybersource.com.au> wrote: > I was playing around with a custom mapping type, and I wanted to use it > as a namespace, so I tried to use it as my module __dict__: > > >>> import __main__ > >>> __main__.__dict__ = MyNamespace() > T

Re: Newbie Question regarding __init__()

2009-08-01 Thread Simon
Okay I will fix my code and include "self" and see what happens. I know I tried that before and got another error which I suspect was another newbie error. The idea behind the init_Pre is that I can put custom code here to customize the __init__ instead of creating a new subclass. This kind of h

Re: Help understanding the decisions *behind* python?

2009-08-01 Thread sturlamolden
On 20 Jul, 18:27, Phillip B Oldham wrote: > We're not looking to start any arguments or religious wars and we're > not asking that python be changed into something its not. We'd simply > like to understand the decision behind the lists and tuple structures. > We feel that in not "getting" the dif

Re: Wrapping prstat on Solaris

2009-08-01 Thread Skip Montanaro
> You haven't told us how you are actually reading from prstat's output > pipe, which may be the cause. For instance, if you are doing > > for line in pipe: > print line > ... > > then this could cause your buffering issue. > > Instead try using readline(): > > while True: > line = pipe.

Re: Predefined Variables

2009-08-01 Thread Fred Atkinson
On Sat, 01 Aug 2009 18:56:33 -0700, Fred Atkinson wrote: >On Thu, 23 Jul 2009 15:28:50 +0200, "Diez B. Roggisch" > wrote: > >>Fred Atkinson wrote: >> >>> Is there a pre-defined variable that returns the GET line >>> (http://www.php.net/index.php?everythingafterthequestionmark) as a >>> single var

Re: Python processors? : WAS Re: Does python have the capability for driver development ?

2009-08-01 Thread greg
Francesco Bochicchio wrote: I wonder: has anybody thought of making a python-machine, or at least a processor able to directly execute high-level bytecode (LLVM-like?). In some of my idle moments I've speculated on what such a machine might be like. One of my ideas for potential future project

Re: Help understanding the decisions *behind* python?

2009-08-01 Thread sturlamolden
On 31 Jul, 23:43, Raymond Hettinger wrote: > More than one person here has > observed that the time to learn to program Pythonically is inversely > proportional to their experience in Java. I believe it is opposite. The longer the Java experience, the longer it takes to program pythonically. The

Re: fast video encoding

2009-08-01 Thread sturlamolden
On 29 Jul, 10:14, gregorth wrote: > for a scientific application I need to save a video stream to disc for > further post processing. I have worked a bit on this as well. There are two things that make scientific applications different form common video encoding: First, a scientific video strea

Re: Help understanding the decisions *behind* python?

2009-08-01 Thread Nobody
On Sat, 01 Aug 2009 19:19:43 -0700, sturlamolden wrote: >> More than one person here has >> observed that the time to learn to program Pythonically is inversely >> proportional to their experience in Java. > > I believe it is opposite. The longer the Java experience, the longer > it takes to prog

Re: Does python have the capability for driver development ?

2009-08-01 Thread sturlamolden
On 30 Jul, 02:19, MalC0de wrote: > actually I mean driver programming under Windows operating system, if > you know, there's A kit name DDK available at microsoft's website for > developing device drivers under C / C++ environment, Actually, Microsoft has replaced DDK with a new kit called WDK f

Re: socket policy flash help

2009-08-01 Thread NighterNet
Here the full code. flashpolicy.xml [[[ ]]] flashpolicytest_server3x.py [[[ #!/usr/local/bin/python ''' Still under testing... python version 3.x.x ''' import socket import threading import sys import os file_name = 'flashpolicy.xml' fh = open(file_name, "r") policy = fh.read(10001) hos

Re: Help understanding the decisions *behind* python?

2009-08-01 Thread sturlamolden
On 2 Aug, 04:47, Nobody wrote: > OTOH, using a "for" loop when you could use a generator means less work > when you need to make a minor change and a generator is no longer > sufficient. It's not just that. It is e.g. using a for loop and indexes instead of a slice. E.g. for i in range(10): # J

Re: Help understanding the decisions *behind* python?

2009-08-01 Thread sturlamolden
On 31 Jul, 21:31, Masklinn wrote: > It's intuitive if you come to Python knowing other languages with   > tuples (which are mostly functional, and in which tuples are *never*   > sequences/iterables). At the end of the day, and if Guido's intention   > truly was what Raymond says, implementing tu

ANNOUNCING Tahoe, the Lofty-Atmospheric Filesystem, v1.5

2009-08-01 Thread Zooko Wilcox-O'Hearn
Dear people of python-list: Python is our preferred programming language for the Tahoe-LAFS project. We use C/C++ extension modules for the CPU-intensive parts, and we interoperate with many languages through the RESTful web API, but the core code is 100% Python. Regards, Zooko --- The

Re: Custom namespaces

2009-08-01 Thread Chris Rebert
On Sat, Aug 1, 2009 at 6:06 PM, Steven D'Aprano wrote: > I was playing around with a custom mapping type, and I wanted to use it > as a namespace, so I tried to use it as my module __dict__: > import __main__ __main__.__dict__ = MyNamespace() > Traceback (most recent call last): >  File "

cgi script

2009-08-01 Thread golu
Hi, i started learning cgi few days ago in python and everything went fine until i started getting the follwing error " The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script. If you think this is a s

Re: Python processors? : WAS Re: Does python have the capability for driver development ?

2009-08-01 Thread Steven D'Aprano
On Sun, 02 Aug 2009 14:19:45 +1200, greg wrote: > That's what killed things like the Lisp machine. Their developers > couldn't keep up with the huge resources that people like Intel and > Motorola had to throw at CPU development, so eventually a > general-purpose CPU could run Lisp faster than a L