"From the crest of Olivet, Jesus looked upon Jerusalem. Fair and
peaceful was the scene spread out before Him. It was the season of the
Passover, and from all lands the children of Jacob had gathered there to
celebrate the great national festival. In the midst of gardens and
vineyards, and gre
Hi Guys,
I am using Python 2.5 & Qt4.4.1 on windows xp machine. I am trying to use
printpreviewdialog for my application.
printer = QtGui.QPrinter(QtGui.QPrinter.HighResolution)
preview = QtGui.QPrintPreviewDialog(printer,self)
preview.paintRequested.connect(self.printPreview)
preview.exec_()
bu
Eric Frederich, 16.04.2012 20:14:
> I embed Python in a 3rd party application.
> I need to use their conventions for errors.
>
> Looking here...
> http://docs.python.org/extending/embedding.html#pure-embedding
> the example uses PyErr_Print() but that goes to stdout or stderr or
> somethin
On 17/04/2012 01:21, Chris Angelico wrote:
On Tue, Apr 17, 2012 at 9:43 AM, Mark Lawrence wrote:
I'd like to point out that it's frustrating when you find a piece of code
that you'd like to use but neither easy_install nor pip work cos it can't be
found. Worse still when you want to try a r
On 4/17/2012 1:23, Steven D'Aprano wrote:
[...]
Wherever you host the code itself, you should also register it on PyPI.
Ok, thanks.
Kiuhnm
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Apr 17, 2012 at 9:43 AM, Mark Lawrence wrote:
> I'd like to point out that it's frustrating when you find a piece of code
> that you'd like to use but neither easy_install nor pip work cos it can't be
> found. Worse still when you want to try a really popular product like
> taskcoach, but
On Mon, 16 Apr 2012 23:27:04 +, Steven D'Aprano wrote:
> On Mon, 16 Apr 2012 23:12:52 +, Steven D'Aprano wrote:
>
>> But it does. Before making assumptions about what format does and does
>> not offer, remember that the Fine Manual is your friend.
>
> Ha, it would help if I remembered to
On 17/04/2012 00:23, Steven D'Aprano wrote:
On Mon, 16 Apr 2012 12:23:14 +0200, Kiuhnm wrote:
I'd like to share a module of mine with the Python community. I'd like
to encourage bug reports, suggestions, etc... Where should I upload it
to?
Kiuhnm
PyPI, unofficially known as the cheeseshop, i
Did you have a reason to spam us with a second copy of the message after
only 3 minutes? Usually, you should wait a few days, and then REPLY to
the earlier one, don't leave another with the same subject. The way you
did it, some people might respond to one, and some to the other,
creating two sep
On 16/04/2012 11:03, Kiuhnm wrote:
I like this one. Since I read somewhere that 'format' is preferred over
'%', I was focusing on 'format' and I didn't think of '%'.
Anyway, it's odd that 'format' doesn't offer something similar.
Kiuhnm
This was the original intention, i.e. 'format' preferred
On Mon, 16 Apr 2012 23:12:52 +, Steven D'Aprano wrote:
> But it does. Before making assumptions about what format does and does
> not offer, remember that the Fine Manual is your friend.
Ha, it would help if I remembered to link to the manual... sorry about
that.
http://docs.python.org/libr
On Mon, 16 Apr 2012 12:23:14 +0200, Kiuhnm wrote:
> I'd like to share a module of mine with the Python community. I'd like
> to encourage bug reports, suggestions, etc... Where should I upload it
> to?
>
> Kiuhnm
PyPI, unofficially known as the cheeseshop, is the semi-official place
for third-p
On Mon, 16 Apr 2012 12:03:31 +0200, Kiuhnm wrote:
> On 4/16/2012 4:42, Steven D'Aprano wrote:
>> On Sun, 15 Apr 2012 23:07:36 +0200, Kiuhnm wrote:
>>
>>> This is the behavior I need:
>>> path = path.replace('\\', '')
>>> msg = ". {} .. '{}' .. {} .".format(a, path, b)
>>> Is there
On Tue, Apr 17, 2012 at 5:03 AM, Chinesekidz wrote:
> Hello!
>
> I would like to know how to write the program to count the total
> number of strings (in the list) used in Python..
>
> for example:
> [broken example snipped]
> in the case above, it is to show the how many times of strings from
> t
On 16/04/2012 20:58, Stefan Schwarzer wrote:
Hello,
Here's a summary of the messages which reached me in this
newsgroup and by e-mail. They are ordered by the time they
reached me at.
(According to the headers, each of the answers went to
either comp.lang.python or python-list@python.org . I
th
I figured out what I was after.
logfn = os.path.join(os.environ['APPDATA'], directory, filename)
ensure_path(logfn)
logging.config.fileConfig("logging.conf", defaults={'logfn': logfn})
In the config file use:
[handler_fileHandler]
class=FileHandler
level=DEBUG
formatter=simpleFormatter
args=(r'%(
On Mon, Apr 16, 2012 at 3:18 PM, Karl Knechtel wrote:
> d = {k: list(v) for k, v in itertools.groupby(sorted(l, key=f), f)}
Note that the sorted call would fail if f returns objects of unorderable types:
Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit
(Intel)] on win32
Type "hel
I figured out a method to enumerate all loggers.
root = logging.getLogger()
for key in root.manager.loggerDict.keys():
logger = logging.getLogger(key)
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, Apr 14, 2012 at 7:26 AM, Tim Chase
wrote:
>
> On 04/13/12 22:54, Chris Angelico wrote:
>>
>> Yes, that would be the right method to use. I'd not bother with the
>> function and map() though, and simply iterate:
>>
>> d = {}
>> for val in l:
>> d.setdefault(f(val), []).append(val)
>
>
> Or
I have a logging configuration file that I load via
logging.config.fileConfig.
The configuration file, configures a FileHandler to log to file.
I wish to initialize the FileHandler to the path
os.environ['APP_DATA'].
However, I don't know how to configure anything other than a static
path.
I also
On 15.4.2012 15:42, Bryan wrote:
Paramiko is a Python library for SSH (Secure Shell). Over about the
last year, I've grown dependent upon it. Its home page is still easy
to search up, but the links to its mailing list and repository don't
work.
Paramiko depends on PyCrypto, and not so long ago t
On Sun, Apr 15, 2012 at 5:51 AM, Chris Angelico wrote:
>
> (You may also want to consider using the 'with' statement to guarantee
> a timely closing of the file. Outside the scope of this mail though.)
>
> I think this list is just to collect unique entries, yes? If so, a set
> may be more to you
> Ramit,
>
> This seems to be more logic now "I hope" :)
> #
> import ast
> fname = 0
> lname = 1
> country = 2
> city = 3
> tel = 4
> notes = 5
>
> ## Read data from file
>
> def load_book():
> load_book = open('c:/Python27/Toli/myfile.txt', 'r')
>
Please show us your code.
RobR
--
http://mail.python.org/mailman/listinfo/python-list
On 04/11/2012 03:20 PM, John Nagle wrote:
On 4/11/2012 6:03 AM, Antti J Ylikoski wrote:
I wrote about a straightforward way to program D. E. Knuth in Python,
and received an excellent communcation about programming Deterministic
Finite Automata (Finite State Machines) in Python.
The following
Hello,
Here's a summary of the messages which reached me in this
newsgroup and by e-mail. They are ordered by the time they
reached me at.
(According to the headers, each of the answers went to
either comp.lang.python or python-list@python.org . I
thought there was some kind of gateway, but in my
On Mon, Apr 16, 2012 at 12:06 PM, Chinesekidz
wrote:
> Hello Guys:
>
> How can I stop the program as soon as one of the condition is met?
>
>
> Here is example:
>
> The loop should be stop asking for more input if a=b or c=6.
>
> I tried to write one but it only stop when a=b and not when c=6
Ple
Hello Guys:
How can I stop the program as soon as one of the condition is met?
Here is example:
The loop should be stop asking for more input if a=b or c=6.
I tried to write one but it only stop when a=b and not when c=6
Please help me
--
http://mail.python.org/mailman/listinfo/python-li
Hello!
I would like to know how to write the program to count the total
number of strings (in the list) used in Python..
for example:
list:['1','2','3','4']
for l in range(4):
num=input("list:"+list[l]+"(between 1 and 4):")
if num.isdigit:
tnum=tnum+int(num)
print("Total numb
Hello!
I would like to know how to write the program to count the total
number of strings (in the list) used in Python..
for example:
list:['1','2','3','4']
for l in range(4):
num=input("list:"+list[l]+"(between 1 and 4):")
if num.isdigit:
tnum=tnum+int(num)
print("Total numb
On Mon, Apr 16, 2012 at 12:39 PM, Temia Eszteri wrote:
> If there's a image-handling library out there for Python that can make
> animated GIFs, I might be able to come up with a faster and more
> internalized solution using surface.convert() to paletted modes and
> image.tostring() functions or s
On Mon, 16 Apr 2012 12:48:37 -0400, you wrote:
>On 4/16/2012 8:37 AM, superpollo wrote:
>> alex23 ha scritto:
>>> On Apr 16, 7:34 pm, superpollo wrote:
is there a way to convert the graphical output of a pygame application
to a mpeg file or better an animated gif? i mean, not using an e
I embed Python in a 3rd party application.
I need to use their conventions for errors.
Looking here...
http://docs.python.org/extending/embedding.html#pure-embedding
...the example uses PyErr_Print() but that goes to stdout or stderr or
something.
I need to put the error somewhere else. How
On 4/16/2012 13:02, Thomas Rachel wrote:
Am 16.04.2012 12:23 schrieb Kiuhnm:
I'd like to share a module of mine with the Python community. I'd like
to encourage bug reports, suggestions, etc...
Where should I upload it to?
Kiuhnm
There are several ways to do this. One of them would be bitbuck
On 4/16/2012 5:21 AM, Luke Kenneth Casson Leighton wrote:
This is the 0.8.1~+alpha1 release of Pyjamas. Pyjamas comprises several
projects, one of which is a stand-alone python-to-javascript compiler; other
projects include a Graphical Widget Toolkit, such that pyjamas applications
can run eithe
On 4/16/2012 8:37 AM, superpollo wrote:
alex23 ha scritto:
On Apr 16, 7:34 pm, superpollo wrote:
is there a way to convert the graphical output of a pygame application
to a mpeg file or better an animated gif? i mean, not using an external
capture program...
There is, but it's probably not g
On 4/16/2012 17:14, Jon Clements wrote:
On Monday, 16 April 2012 11:03:31 UTC+1, Kiuhnm wrote:
On 4/16/2012 4:42, Steven D'Aprano wrote:
On Sun, 15 Apr 2012 23:07:36 +0200, Kiuhnm wrote:
This is the behavior I need:
path = path.replace('\\', '')
msg = ". {} .. '{}' .. {} ."
On 4/16/2012 8:01 AM, Alan Ristow wrote:
Hi all,
I have defined a class that includes a number of helper methods that
are useful to me, but pretty redundant. Something like so, where I
maintain a list of tuples:
class A(object):
def __init__(self):
self.listing = []
# This m
On 4/16/2012 4:12 AM, Pedro Larroy wrote:
I would like to contribute to this documentation
http://docs.python.org/library/sqlite3.html
> Can somebody point me how to best do it?
Documentations improvement sometimes start with discussion on this list.
Both code and documentation issues are hand
Jaroslav Dobrek writes:
> I would like to execute shell commands, but only if their execution
> time is not longer than n seconds. Like so:
>
> monitor(os.system("do_something"), 5)
>
> I.e. the command do_somthing should be executed by the operating
> system. If the call has not finished after 5
On Mon, Apr 16, 2012 at 10:51 AM, Jaroslav Dobrek
wrote:
>
> Hello,
>
> I would like to execute shell commands, but only if their execution
> time is not longer than n seconds. Like so:
>
> monitor(os.system("do_something"), 5)
>
> I.e. the command do_somthing should be executed by the operating
>
On Monday, 16 April 2012 11:03:31 UTC+1, Kiuhnm wrote:
> On 4/16/2012 4:42, Steven D'Aprano wrote:
> > On Sun, 15 Apr 2012 23:07:36 +0200, Kiuhnm wrote:
> >
> >> This is the behavior I need:
> >> path = path.replace('\\', '')
> >> msg = ". {} .. '{}' .. {} .".format(a, path, b)
> >
On Mon, Apr 16, 2012 at 8:23 PM, Kiuhnm
wrote:
> I'd like to share a module of mine with the Python community. I'd like to
> encourage bug reports, suggestions, etc...
> Where should I upload it to?
Are you planning to open source it? If so, I would recommend using one
of the version-control host
Hello,
I would like to execute shell commands, but only if their execution
time is not longer than n seconds. Like so:
monitor(os.system("do_something"), 5)
I.e. the command do_somthing should be executed by the operating
system. If the call has not finished after 5 seconds, the process
should b
Vinay Sajip yahoo.co.uk> writes:
> I am thinking of removing the BOM insertion in 2.7 and 3.2 - although
> it is a change in behaviour, the current behaviour does seem broken
> with regard to RFC 5424 conformance. However, as some might disagree
> with that assessment and view it as a backwards-i
superpollo ha scritto:
alex23 ha scritto:
On Apr 16, 7:34 pm, superpollo wrote:
is there a way to convert the graphical output of a pygame application
to a mpeg file or better an animated gif? i mean, not using an external
capture program...
There is, but it's probably not going to be as per
alex23 ha scritto:
On Apr 16, 7:34 pm, superpollo wrote:
is there a way to convert the graphical output of a pygame application
to a mpeg file or better an animated gif? i mean, not using an external
capture program...
There is, but it's probably not going to be as performant as using
somethi
On 16 April 2012 13:29, Arnaud Delobelle wrote:
> You can do this (untested), but no doubt it won't be to everybody's taste:
>
> class A(object):
> def __init__(self):
> self.listing = []
>
> # This method does the work.
> def append_text(self, text, style):
> self.listing.append
On 16 April 2012 13:01, Alan Ristow wrote:
> Hi all,
>
> I have defined a class that includes a number of helper methods that
> are useful to me, but pretty redundant. Something like so, where I
> maintain a list of tuples:
>
> class A(object):
> def __init__(self):
> self.listing = []
>
Thank you Chris :) ..I will check it...
On Sun, Apr 15, 2012 at 3:21 PM, Chris Angelico wrote:
> On Sun, Apr 15, 2012 at 7:15 PM, Nibin V M wrote:
> > res_own_file = open('/bah')
> > res_own_list = res_own_file.readline()
> > res_tot_list=[]
> > while res_own_list:
> > res_own_list=res_own_li
Hi all,
I have defined a class that includes a number of helper methods that
are useful to me, but pretty redundant. Something like so, where I
maintain a list of tuples:
class A(object):
def __init__(self):
self.listing = []
# This method does the work.
def append_text(self,
16.04.12 00:07, Kiuhnm написав(ла):
path = path.replace('\\', '')
If you think that it is too complicated:
path = re.sub('', '', path)
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 16, 7:34 pm, superpollo wrote:
> is there a way to convert the graphical output of a pygame application
> to a mpeg file or better an animated gif? i mean, not using an external
> capture program...
There is, but it's probably not going to be as performant as using
something external:
htt
Am 16.04.2012 12:23 schrieb Kiuhnm:
I'd like to share a module of mine with the Python community. I'd like
to encourage bug reports, suggestions, etc...
Where should I upload it to?
Kiuhnm
There are several ways to do this. One of them would be bitbucket.
Thomas
--
http://mail.python.org/mai
On 4/16/2012 12:03, Kiuhnm wrote:
On 4/16/2012 4:42, Steven D'Aprano wrote:
On Sun, 15 Apr 2012 23:07:36 +0200, Kiuhnm wrote:
This is the behavior I need:
path = path.replace('\\', '')
msg = ". {} .. '{}' .. {} .".format(a, path, b)
Is there a better way?
This works for me:
a = "spam"
I'd like to share a module of mine with the Python community. I'd like
to encourage bug reports, suggestions, etc...
Where should I upload it to?
Kiuhnm
--
http://mail.python.org/mailman/listinfo/python-list
Kiuhnm wrote:
> On 4/16/2012 4:42, Steven D'Aprano wrote:
>> On Sun, 15 Apr 2012 23:07:36 +0200, Kiuhnm wrote:
>>
>>> This is the behavior I need:
>>> path = path.replace('\\', '')
>>> msg = ". {} .. '{}' .. {} .".format(a, path, b)
>>> Is there a better way?
>>
>>
>> This works fo
On 4/16/2012 4:42, Steven D'Aprano wrote:
On Sun, 15 Apr 2012 23:07:36 +0200, Kiuhnm wrote:
This is the behavior I need:
path = path.replace('\\', '')
msg = ". {} .. '{}' .. {} .".format(a, path, b)
Is there a better way?
This works for me:
a = "spam"
b = "ham"
path = r"C:\
Mahmoud Abdel-Fattah wrote:
Hello,
I'm coming from PHP background ant totally new to Python, I just
started using scrapy, but has some generic question in python.
1. How can I write the following code in easier way in Python ?
if len(item['description']) > 0:
item['description'] =
HI.
is there a way to convert the graphical output of a pygame application
to a mpeg file or better an animated gif? i mean, not using an external
capture program...
bye
--
http://mail.python.org/mailman/listinfo/python-list
Stefan Schwarzer wrote:
Hello,
I wrote a `Connection` class that can be found at [1]. A
`Connection` object has a method `put_bytes(data)` which
returns a "future" [2]. The data will be sent asynchronously
by a thread attached to the connection object.
The future object returned by `put_bytes`
On 16/04/2012 06:34, Steven D'Aprano wrote:
The situation is worse on Windows, as Windows doesn't support hash-bang
syntax. But that is being looked at now:
http://www.python.org/dev/peps/pep-0397/
which should make supporting multiple Python versions much more pleasant
Real Soon Now.
No Rea
This is the 0.8.1~+alpha1 release of Pyjamas. Pyjamas comprises several
projects, one of which is a stand-alone python-to-javascript compiler; other
projects include a Graphical Widget Toolkit, such that pyjamas applications
can run either in web browsers as pure javascript (with no plugins requir
rusi writes:
> Costs can be single-cased (s) -- basically those that can be handled
> by a 2to3 module
You can't really 2to3 a large python application and expect to then just
start using it without further attention or testing. You may have to do
a fairly complete (i.e. expensive) QA and qualif
On Apr 16, 11:44 am, Bryan
wrote:
> Steven D'Aprano wrote:
> > And how is that different from any other two versions of Python?
>
> Python 3.0, also known as “Python 3000” or “Py3K”, is the first ever
> *intentionally backwards incompatible* Python release. --GVR
>
> > Unless both versions include
Well, if I have a file like this one:
EWIENER,
edit,
edgard,
evan,
erick,
elliott,
66 matches
Mail list logo