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
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
On Jul 31, 7:42 pm, Dr. Phillip M. Feldman pfeld...@verizon.net
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
On Jul 31, 11:17 pm, Dr. Phillip M. Feldman pfeld...@verizon.net
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'
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
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 =
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) ==
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
On Jul 31, 2:04 pm, Jean-Michel Pichavant jeanmic...@sequans.com
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
NighterNet darkne...@gmail.com (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)
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 http://www.rediff.com/.com/)
*Error:-*
urllib2.urlopen(http://www.icicibank.com/;)
File C:\Python25\lib\urllib2.py, line 121, in
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
On Aug 1, 6:52 pm, MRAB pyt...@mrabarnett.plus.com 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:-*
On 1 Aug, 14:52, MRAB pyt...@mrabarnett.plus.com 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:-*
On Aug 1, 4:52 am, Piet van Oostrum p...@cs.uu.nl wrote:
NighterNet darkne...@gmail.com (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.
On 8/1/2009 11:31 AM, Jon Clements wrote:
On 1 Aug, 14:52, MRAB pyt...@mrabarnett.plus.com 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:-*
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 omits
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):
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 ;
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 -
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
On Jul 21, 12:55 pm, Paul Boddie p...@boddie.org.uk 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
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 have
On Aug 1, 4:18 am, Terry Reedy tjre...@udel.edu 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
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
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
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
Hi Tim
On Aug 1, 8:32 pm, Tim Golden m...@timgolden.me.uk 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
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
--
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-except
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
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 na...@animats.com wrote:
Any progress on updating feedparser and MySQLdb for Python 3.x in the
MRAB pyt...@mrabarnett.plus.com 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
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.com
ON
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
Check your connection to the internet.
On Sat, Aug 1, 2009 at 6:43 PM, Marcus Wanner marc...@cox.net wrote:
On 8/1/2009 11:31 AM, Jon Clements wrote:
On 1 Aug, 14:52, MRAB pyt...@mrabarnett.plus.com wrote:
tarun wrote:
Dear All,
I want to read a webpage and copy the contents of it in
On Jul 14, 11:31 pm, Chris Rebert c...@rebertia.com wrote:
On Tue, Jul 14, 2009 at 1:40 PM, Mohan Parthasarathysurut...@gmail.com
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
On 1 Aug, 22:58, Michael M Mason mich...@altra-optics.co.uk 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.
Michael M Mason mich...@altra-optics.co.uk (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.
In article mailman.3938.1248942327.8015.python-l...@python.org,
Javier Collado javier.coll...@gmail.com 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
Michael M Mason wrote:
div class=moz-text-flowed style=font-family: -moz-fixedI'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
On Sat, 1 Aug 2009 22:58:53 +0100, Michael M Mason
mich...@altra-optics.co.uk 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
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
On Thu, 23 Jul 2009 15:28:50 +0200, Diez B. Roggisch
de...@nospam.web.de 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
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 stdin, line 1, in module
TypeError: readonly attribute
Why is
On Thu, Jul 30, 2009 at 4:17 PM, Javier Collado javier.coll...@gmail.comwrote:
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
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()
Traceback
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
On 20 Jul, 18:27, Phillip B Oldham phillip.old...@gmail.com 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
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.readline()
On Sat, 01 Aug 2009 18:56:33 -0700, Fred Atkinson
fatkin...@mishmash.com wrote:
On Thu, 23 Jul 2009 15:28:50 +0200, Diez B. Roggisch
de...@nospam.web.de wrote:
Fred Atkinson wrote:
Is there a pre-defined variable that returns the GET line
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
On 31 Jul, 23:43, Raymond Hettinger pyt...@rcn.com 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
On 29 Jul, 10:14, gregorth gregor.thalham...@gmail.com 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:
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 program
On 30 Jul, 02:19, MalC0de malc0de.encr...@gmail.com 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
Here the full code.
flashpolicy.xml
[[[
?xml version=1.0?
cross-domain-policy
allow-access-from domain=* to-ports=* /
/cross-domain-policy
]]]
flashpolicytest_server3x.py
[[[
#!/usr/local/bin/python
'''
Still under testing...
python version 3.x.x
'''
import socket
import threading
import sys
On 2 Aug, 04:47, Nobody nob...@nowhere.com 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
On 31 Jul, 21:31, Masklinn maskl...@masklinn.net 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
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
On Sat, Aug 1, 2009 at 6:06 PM, Steven
D'Apranost...@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()
Traceback (most
bones7456 bones7...@gmail.com added the comment:
another fix way:
and these three lines to the head of file:
import sys
reload(sys)
sys.setdefaultencoding('utf8')
--
nosy: +bones7456
___
Python tracker rep...@bugs.python.org
Nir Soffer nir...@gmail.com added the comment:
I was wrong about handle_connect_event - it is called only from the
dispatcher, so it will not break 3rd party dispatcher.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6550
Nir Soffer nir...@gmail.com added the comment:
This is asyncore-fix-refused-3.patch with some fixes:
1. Call handle_close instead of non exiting handle_close_event
2. Remove unneeded handle_close_event in test classes
3. Revert removal of handle_expt_event in test classes - not clear why it
Guilherme Polo ggp...@gmail.com added the comment:
Closing. I have seen the code changes regarding idle and mac and I
believe this issue has been fixed (some time after the OP started this,
but it has).
--
resolution: - out of date
status: open - closed
Guilherme Polo ggp...@gmail.com added the comment:
This seems to be problematic in general. I have worked on a patch now,
but it fails to succeed while pasting multiple lines. The problem is
that when a second line is pasted, IDLE is still marked as executing
so it ends up just pasting the line
New submission from OG7 ony...@users.sourceforge.net:
There is an additional test for multiprocessing's logging support here:
http://code.google.com/p/python-multiprocessing/issues/detail?id=18
(disregard the fix, it is only needed for the backport).
--
components: Library (Lib)
Liu DongMiao liudongm...@gmail.com added the comment:
i think this should not be a bug.
as we dont know the encoding of str, so we cannt deal with str and
unicode together.
in my example, str is in utf-8, so i need to convert unicode to str in
utf-8.
i will takes bones' suggestion.
Josiah Carlson josiahcarl...@users.sourceforge.net added the comment:
handle_expt_event was removed in the test classes because it is no
longer being used by any of the tests. None of them send OOB data (also
known as priority data), so handle_expt_event should never be called.
When I have
Guilherme Polo ggp...@gmail.com added the comment:
btw, I just added a patch for issue3559 which could be easily adjusted
to work as described in this issue.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5124
New submission from Campbell Barton ideasma...@gmail.com:
This patch was made on python r74276
Often when writing in C/Python I want to append to a list within a C
loop of an unknown length.
When this is done for newly created PyObject (which is quite common) -
you need to assign each item to a
Guilherme Polo ggp...@gmail.com added the comment:
I'm attaching a very similar patch that I tested on Linux and Windows.
It just combines the default behaviour with the details required for
Windows, that is, the default extension is set to '.py' for Windows and
'' elsewhere (the default).
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
This simple patch allows...
PyList_APPEND(list, PyFloat_FromDouble(x))
This isn't a good idea because the error checking
for the inner function is lost. The current API
encourages keeping one function per line so that
New submission from Sandip Thorat thoratsan...@gmail.com:
Hi
I am installing Python-3.1 on SunOS sunx7qa 5.10 Generic_127112-06
i86pc i386 i86pc.
./configure done without any error.
But 'make' throwing folloing error:
gcc -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-
Changes by Jesse Noller jnol...@gmail.com:
--
assignee: - jnoller
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6615
___
___
Python-bugs-list
New submission from Gregor Lingl gregorli...@users.sourceforge.net:
Error in:
Python v3.1 documentation The Python language reference
In the listing at the end of section 5.2.9 Yield expressions,
line 7:
... except Exception, e:
is syntactically incorrect and consequently
New submission from Vincent Legoll vincent.leg...@gmail.com:
The isgenerator() function looks duplicated, remove the one with the
shortest docstring
--
components: Library (Lib)
files: py3k-inspect.py-remove-duplicated-func.patch
keywords: patch
messages: 91172
nosy: vincele
severity:
New submission from Vincent Legoll vincent.leg...@gmail.com:
The last_interval variable could potentially be used before being first
assigned a value.
--
components: Library (Lib)
files: py3k-locale.py-use-before-assignment.patch
keywords: patch
messages: 91173
nosy: vincele
severity:
New submission from Vincent Legoll vincent.leg...@gmail.com:
The binhex module still has uses of the deprecated and now now removed
Carbon module.
The attached patch 'fix' this by removing the code, something else may
be required, but I don't know what.
So this is only a RFC to start
New submission from Vincent Legoll vincent.leg...@gmail.com:
The poplib modules use the 'secret' variable during its creation, this
may be a mistake. Perhaps the intention was to use the 'password' instead...
--
components: Library (Lib)
files: py3k-poplib.py-use-wrong-variable.patch
Changes by Vincent Legoll vincent.leg...@gmail.com:
--
components: Library (Lib)
nosy: vincele
severity: normal
status: open
title: Lib/ftplib.py
versions: Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6623
New submission from Vincent Legoll vincent.leg...@gmail.com:
The 'macro_lines' list should probably be emptied upon leaving macro
parsing mode.
Simplify code by using the 'macro_name' variable as the boolean for
macro parsing mode.
Deprecated code probably should be fixed until completely
New submission from Sean Reifschneider j...@tummy.com:
As detailed in the python-dev post:
http://mail.python.org/pipermail/python-dev/2009-July/090791.html
I have found a bug in the handling of PyArg_ParseTuple where a NUL in an
argument causes a message like this:
Sean Reifschneider j...@tummy.com added the comment:
Fixed in python trunk commit 74277.
Fixed in py3k trunk commit 74278.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6624
Campbell Barton ideasma...@gmail.com added the comment:
Hi Raymond, in general I agree with your comments that adding 2 ways to
do things is not great. The reason I still think this is an advantage is
that I know the API well enough (with manipulating dicts/lists etc) and
I still want this
85 matches
Mail list logo