Is there a method for freezing a Python 2.6 app using multiprocessing
on Windows using PyInstaller or py2exe that works? It is trying to
call my executable instead of python.exe when the process starts and
passes it --multiprocessing-fork . Adding a freeze_support() to my
main doesn't help. Do I ha
On Wed, Jul 1, 2009 at 4:18 PM, Alex wrote:
> I am looking for an open source RSS reader (desktop, not online)
> written in Python but in vain. I am not looking for a package but a
> fully functional software.
>
> Google: python "open source" (rss OR feeds) reader
>
> Any clue ?
Straw for GTK/GNOM
Hi!
I'm currently converting my bioware to handle Python code and I have
stumbled across a problem...
Simple scenario: I have a handle to a resource. This handle allows me to
manipulate the resource in various ways and it also represents ownership.
Now, when I put this into a class, instances to
"Rajat" ha scritto nel messaggio
news:8c8b5cf2-bc77-4633-96ca-e3b908430...@z14g2000yqa.googlegroups.com...
>
> > > Using ctypes can I access the windows structures like:
> >
> > > PROCESS_INFORMATION_BLOCK, Process Environment Block(PEB),
> > > PEB_LDR_DATA, etc?
> >
> > ctypes.wintypes lists all
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Aloha!
Richard Brodie wrote:
> "Joachim Str�mbergson" wrote in message
> news:mailman.2422.1246418400.8015.python-l...@python.org...
>
>> Even so, choosing md5 in 2009 for something that (hopefully) will be
>> used in years is a bad design decision
On 2 Jul., 01:56, MRAB wrote:
> someone wrote:
> > Hello,
>
> > how can I replace '—' sign from string? Or do split at that character?
> > Getting unicode error if I try to do it:
>
> > UnicodeDecodeError: 'ascii' codec can't decode byte 0x97 in position
> > 1: ordinal not in range(128)
>
> > Than
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Aloha!
I just read the PEP368 and really liked the proposed idea, sound like a
great battery addition to include in the std lib:
http://www.python.org/dev/peps/pep-0368/
One question/idea though: The proposed iterator will iterate over all
pixels in
thanks everyone for all the ideas -- simple stuff, I know for you all,
but very helpful for me.
--
http://mail.python.org/mailman/listinfo/python-list
On 2 Jul., 10:25, Tep wrote:
> On 2 Jul., 01:56, MRAB wrote:
>
> > someone wrote:
> > > Hello,
>
> > > how can I replace '—' sign from string? Or do split at that character?
> > > Getting unicode error if I try to do it:
>
> > > UnicodeDecodeError: 'ascii' codec can't decode byte 0x97 in position
On Wed, Jul 1, 2009 at 2:14 AM, David Hirschfield wrote:
> Unfortunately that still requires two separate decorators, when I was
> hoping there was a way to determine if I was handed a function or method
> from within the same decorator.
>
> Seems like there really isn't, so two decorators is th
Pedram wrote:
> On Jul 1, 10:01 pm, Christian Heimes wrote:
>> Pedram schrieb:
>>
>> > Hello community,
>> > I'm reading the CPython interpreter source code,
>> > first, if you have something that I should know for better reading
>> > this source code, I would much appreciate that :)
>> > second,
Hello. I can't find a wright mail address. If you can help me I need to get
an information about UNICODE. I am georgian and I need to write programs on
georgian language . If you can transfer this mail or send me a wright mail
about encoding or unicode information.
--
Tengiz Davitadze
{
programin
Robert Kern schrieb:
First, convert the pos array to integers, and just the columns with
indices in them:
ipos = pos[:,:2].astype(int)
Now check the values in the mask corresponding to these positions:
mask_values = mask[ipos[:,0], ipos[:,1]]
Now extract the rows from the original pos ar
Ulrich Eckhardt:
> a way to automatically release the resource, something
> which I would do in the destructor in C++.
Is this helpful?
http://effbot.org/pyref/with.htm
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
En Wed, 01 Jul 2009 12:49:31 -0300, Scott David Daniels
escribió:
Gabriel Genellina wrote:
...
def convert(in_queue, out_queue):
while True:
row = in_queue.get()
if row is None: break
# ... convert row
out_queue.put(converted_line)
These loops work well with the two-argum
Bearophile wrote:
> Ulrich Eckhardt:
>> a way to automatically release the resource, something
>> which I would do in the destructor in C++.
>
> Is this helpful?
> http://effbot.org/pyref/with.htm
Yes, it aims in the same direction. However, I'm not sure this applies to my
case. The point is that
Ulrich Eckhardt wrote:
> Bearophile wrote:
>> Ulrich Eckhardt:
>>> a way to automatically release the resource, something
>>> which I would do in the destructor in C++.
>>
>> Is this helpful?
>> http://effbot.org/pyref/with.htm
>
> Yes, it aims in the same direction. However, I'm not sure this a
On Jul 2, 1:11 pm, Peter Otten <__pete...@web.de> wrote:
> Pedram wrote:
> > On Jul 1, 10:01 pm, Christian Heimes wrote:
> >> Pedram schrieb:
>
> >> > Hello community,
> >> > I'm reading the CPython interpreter source code,
> >> > first, if you have something that I should know for better reading
In Steven D'Aprano
writes:
>On Thu, 02 Jul 2009 03:49:57 +, kj wrote:
>> In Duncan Booth
>> writes:
>>>So, for example:
>>
>> re.compile("c").match("abcdef", 2)
>>><_sre.SRE_Match object at 0x02C09B90>
>> re.compile("^c").search("abcdef", 2)
>>
>>
>> I find this
Hi everyone,
In my free time I translate scripts from open source projects or write
my own, to train my python skills. ATM I convert the aplogmerge.pl from
awstats. It merges multiple apache logfiles and sort the output by the
timestamps of each line. My first version of this script hasn't a good
2009/7/2 Tengiz Davitadze :
> Hello. I can't find a wright mail address. If you can help me I need to get
> an information about UNICODE. I am georgian and I need to write programs on
> georgian language . If you can transfer this mail or send me a wright mail
> about encoding or unicode informatio
On Jul 2, 7:30 am, Nils Rüttershoff wrote:
> Rec =
> re.compile(r"^\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}\s-\s\d+\s\[(\d{2}/\w+/\d{4}:\d{2}:\d{2}:\d{2})\s\+\d{4}\].*")
> Line = '1.2.3.4 - 4459 [02/Jul/2009:01:50:26 +0200] "GET /foo HTTP/1.0" 200 -
> "-" "www.example.org" "-" "-" "-"'
I'm not sure how
2009/7/2 Joachim Strömbergson :
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Aloha!
>
> Richard Brodie wrote:
>> "Joachim Str�mbergson" wrote in message
>> news:mailman.2422.1246418400.8015.python-l...@python.org...
>>
>>> Even so, choosing md5 in 2009 for something that (hopefully) will
Ulrich Eckhardt wrote:
Hi!
I'm currently converting my bioware to handle Python code and I have
stumbled across a problem...
Simple scenario: I have a handle to a resource. This handle allows me to
manipulate the resource in various ways and it also represents ownership.
Now, when I put this in
kj writes:
> For a recovering Perl-head like me it is difficult to understand
> why Python's re module offers both match and search. Why not just
> use search with a beginning-of-string anchor?
I need re.match when parsing the whole string. In that case I never
want to search through the strin
Dave Angel wrote:
> Look also at 'del' a command in the language which explicitly deletes an
> object.
No, you are either explaining it the wrong way or you have been fallen
for a common misinterpretation of the del statement. The del statement
only removes the object from the current scope. This
On Jul 2, 4:32 am, Joachim Strömbergson
wrote:
> But, wouldn't it be more Pythonic and simpler to have an iterator that
> iterates over all pixels in an image? Starting with upper left corner
> and moving left-right and (line by line) to lower right. This would
> change the code above to:
Unless
Dave Angel wrote:
> But I'm guessing you want something that automatically deletes objects
> whenever the last reference disappears. That's an implementation
> detail, not a language guarantee. In particular CPython does what you
> want, by using reference counting. That's the only Python I've
Hi Casey
Casey Webster wrote:
> On Jul 2, 7:30 am, Nils Rüttershoff wrote:
>
>
>> Rec =
>> re.compile(r"^\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}\s-\s\d+\s\[(\d{2}/\w+/\d{4}:\d{2}:\d{2}:\d{2})\s\+\d{4}\].*")
>> Line = '1.2.3.4 - 4459 [02/Jul/2009:01:50:26 +0200] "GET /foo HTTP/1.0" 200
>> - "-" "www.e
Nils Rüttershoff wrote:
Hi everyone,
In my free time I translate scripts from open source projects or write
my own, to train my python skills. ATM I convert the aplogmerge.pl from
awstats. It merges multiple apache logfiles and sort the output by the
timestamps of each line. My first version of
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Aloha!
Tarek Ziadé wrote:
> The prefix is a good idea but since it's just a checksum to control
> that the file hasn't changed
> what's wrong with using a weak hash algorithm like md5 or now sha1 ?
Because it creates a dependency to an old algorithm
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Aloha!
Casey Webster wrote:
> Unless I'm totally misreading the PEP, the author does provide both
> iterators. Quoting the PEP:
>
> Non-planar images offer the following additional methods:
>
> pixels() -> iterator[pixel]
>
> Returns an iterator
Christian Heimes wrote:
Dave Angel wrote:
Look also at 'del' a command in the language which explicitly deletes an
object.
No, you are either explaining it the wrong way or you have been fallen
for a common misinterpretation of the del statement. The del statement
only removes the obje
This could be better:
>>> import random
>>> population = range(10)
>>> choice = random.choice(population)
>>> population.remove(choice)
>>> print population
>>> print population
[0, 1, 2, 3, 4, 5, 6, 8, 9]
That was my idea with the previous pop(), remove from the population a
certain number of
Eric S. Johansson wrote:
> Steven D'Aprano wrote:
>> That assumes that every word is all caps. In practice, for real-life
>> Python code, I've tripled the vocal load of perhaps one percent of your
>> utterances, which cuts your productivity by 2%.
>>
>> If you have 1 words in you per day, and
Eric S. Johansson wrote:
> I've been working with speech recognition for 15 years. I've written something
> on the order of 10,000 lines of Python code both as open source and private
> projects. I've tried it least two dozen editors and they all fail miserably
> because they're focused on keyboar
On Jul 2, 1:08 am, s...@pobox.com wrote:
> Gil> There's no such group as python-sybase :-(
>
> http://sourceforge.net/mailarchive/forum.php?forum_name=python-sybase...
>
> S
Thanks :-)
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 2, 1:07 am, s...@pobox.com wrote:
> Gil> Are you saying, that when you trying to connect to a sybase DBS
> Gil> server and the DBS or the server is down, you get an error after a
> Gil> few seconds and not after a few minutes?
>
> Yes, though thankfully our server tends to almost
On Thu, 02 Jul 2009 10:32:04 +0200, Joachim Strömbergson wrote:
> I just read the PEP368 and really liked the proposed idea, sound like a
> great battery addition to include in the std lib:
>
> http://www.python.org/dev/peps/pep-0368/
Unfortunately, it's too simplistic, meaning that most of the
On Wed, 2009-07-01 at 17:19 +1200, Lawrence D'Oliveiro wrote:
> In message , J. Cliff
> Dyer wrote:
>
> > If the lines got separated, a leading + could disappear into its line
> > without any errors showing up. A trailing + would raise a syntax error.
>
> Unless, of course, it was moved onto th
NurAzije wrote:
> On Jun 29, 11:04 am, Tim Harig wrote:
>
>> On 2009-06-29, NurAzije wrote:
>>
>>
>>> Hi,
>>> I am working on a study and I need expert opinion, I did not work with
>>> Python before, can anyone help me with a comparison betweenWhizBase
>>> (www.whizbase.com) and Python pl
Hi,
I have bug in my code, which results in the same error has this one:
https://bugs.launchpad.net/bzr/+bug/295653
{{{
Traceback (most recent call last):
File "/usr/lib/python2.6/logging/__init__.py", line 765, in emit
self.stream.write(fs % msg.encode("UTF-8"))
..
UnicodeDecodeError: 'a
Hi,
I am trying to implement a multiprocessing pool that assigns tasks
from a blocking queue. My situation is a pretty classic producer/
consumer conundrum, where the producer can produce much faster than
the consumers can consume. The wrinkle in the story is that the
producer produces objects tha
Thomas Guettler wrote:
> Hi,
>
> I have bug in my code, which results in the same error has this one:
>
> https://bugs.launchpad.net/bzr/+bug/295653
> {{{
> Traceback (most recent call last):
> File "/usr/lib/python2.6/logging/__init__.py", line 765, in emit
> self.stream.write(fs % msg.enc
Thomas Guettler wrote:
> I have bug in my code, which results in the same error has this one:
>
> https://bugs.launchpad.net/bzr/+bug/295653
> {{{
> Traceback (most recent call last):
> File "/usr/lib/python2.6/logging/__init__.py", line 765, in emit
> self.stream.write(fs % msg.encode("UTF
Is there some kind of mysterious logic to how the the columns are ordered
when executing the following:
sql = "SELECT player_id, SUM(K) AS K, SUM(IP) AS IP, SUM(ER) AS ER, SUM(HR)
AS HR, SUM(H) AS H, SUM(BB) AS BB, Teams.league FROM Pitching INNER JOIN
Teams ON Pitching.team = Teams.team_id WHERE
sql = "SELECT player_id, SUM(K) AS K, SUM(IP) AS IP, SUM(ER) AS ER, SUM(HR)
AS HR, SUM(H) AS H, SUM(BB) AS BB, Teams.league FROM Pitching INNER JOIN
Teams ON Pitching.team = Teams.team_id WHERE Date BETWEEN '%s' AND '%s'
GROUP BY player_id" % (start, date)
cursor.execute(sql)
for row in cursor.fe
Thomas Guettler wrote:
> Hi,
>
> I have bug in my code, which results in the same error has this one:
>
> https://bugs.launchpad.net/bzr/+bug/295653
> {{{
> Traceback (most recent call last):
> File "/usr/lib/python2.6/logging/__init__.py", line 765, in emit
> self.stream.write(fs % msg.enc
My quick fix is this:
class MyFormatter(logging.Formatter):
def format(self, record):
msg=logging.Formatter.format(self, record)
if isinstance(msg, str):
msg=msg.decode('utf8', 'replace')
return msg
But I still think handling of non-ascii byte strings shoul
Will this order at least be the same for that same query every time the
script is executed?
On Thu, Jul 2, 2009 at 10:48 AM, Tim Chase wrote:
> sql = "SELECT player_id, SUM(K) AS K, SUM(IP) AS IP, SUM(ER) AS ER, SUM(HR)
>> AS HR, SUM(H) AS H, SUM(BB) AS BB, Teams.league FROM Pitching INNER JOIN
>
masher writes:
> My questions, then, is: Is there a more elegant/pythonic way of doing
> what I am trying to do with the current Pool class?
Forgive me, I may not fully understand what you are trying to do here
(I've never really used multiprocessing all that much)...
But couldn't you just assi
On 2009-07-02 04:40, Sebastian Schabe wrote:
Robert Kern schrieb:
> You will want to ask numpy questions on the numpy mailing list.
>
> http://www.scipy.org/Mailing_Lists
>
I ever thought news-groups are the right way for questions like this.
And the mailing list page just confuses me, bu
On Jul 2, 12:06 pm, J Kenneth King wrote:
> masher writes:
> > My questions, then, is: Is there a more elegant/pythonic way of doing
> > what I am trying to do with the current Pool class?
>
> Forgive me, I may not fully understand what you are trying to do here
> (I've never really used multipro
On Thu, 2009-07-02 at 10:32 -0500, Wells Oliver wrote:
> for row in cursor.fetchall():
> print row.keys()
>
> What I get is:
>
> ['league', 'BB', 'HR', 'IP', 'K', 'H', 'player_id', 'ER']
>
> Neither alphabetical nor the order in which they were specified in the
> query nor... any seeming ord
Will this order at least be the same for that same query every time the
script is executed?
I wouldn't count on it. The order is only defined for the one
iteration (result of the keys() call). If the order matters, I'd
suggest a double-dispatch with a non-dict (regular/default) query
result
Greetings!
My closest to successfull attempt:
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.
IPython 0.9.1 -- An enhanced Interactive Python.
In [161]: re.findall('\d+','this is test a3 attempt 79')
Thomas Guettler wrote:
> My quick fix is this:
>
> class MyFormatter(logging.Formatter):
> def format(self, record):
> msg=logging.Formatter.format(self, record)
> if isinstance(msg, str):
> msg=msg.decode('utf8', 'replace')
> return msg
>
> But I still thi
Ethan Furman wrote:
Greetings!
My closest to successfull attempt:
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.
IPython 0.9.1 -- An enhanced Interactive Python.
In [161]: re.findall('\d+','this is
Thomas Guettler wrote:
> My quick fix is this:
>
> class MyFormatter(logging.Formatter):
> def format(self, record):
> msg=logging.Formatter.format(self, record)
> if isinstance(msg, str):
> msg=msg.decode('utf8', 'replace')
> return msg
>
> But I still thi
Carl Banks wrote:
> On Jun 30, 6:23 pm, Carl Banks wrote:
>> On Jun 30, 5:34 pm, Mitchell L Model wrote:
>>
>>> Allow me to add to my previous question that certainly the superclass
>>> methods can be called explicitly without resorting to super(), e.g.:
>>> class C(A, B):
>>> def __i
On Jul 2, 2009, at 2:11 AM, Shen, Yu-Teh wrote:
I create my extend type something like http://www.python.org/doc/current/extending/newtypes.html
.
And my type has a member which is a pointer point to my allocate
memory ( no ref count).
ex:
---
ty
Hey I was hoping to get your opinions on a sort of minor stylistic
point.
These two snippets of code are functionally identical. Which would you
use and why?
The first one is easier [for me anyway] to read and understand, but
slightly less efficient, while the second is [marginally] harder to
follo
On 2009-07-02 18:38, Ethan Furman wrote:
Greetings!
My closest to successfull attempt:
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit
(Intel)]
Type "copyright", "credits" or "license" for more information.
IPython 0.9.1 -- An enhanced Interactive Python.
In [161]: re.find
Thank you all for the comments
you might want something like Expect.
Yes "Expect" deals with such things, unfortunately it's posix only (due to the
PTY module requirement...); whereas I'd like to find generic ways (i.e at least
windows/linux/mac recipes)
The latter is inherently tricky (wh
Joachim Strömbergson wrote:
> Aloha!
>
> Tarek Ziadé wrote:
>> The prefix is a good idea but since it's just a checksum to control
>> that the file hasn't changed
>> what's wrong with using a weak hash algorithm like md5 or now sha1 ?
>
> Because it creates a dependency to an old algorithm that s
Simon Forman wrote:
> Hey I was hoping to get your opinions on a sort of minor stylistic
> point.
> These two snippets of code are functionally identical. Which would you
> use and why?
> The first one is easier [for me anyway] to read and understand, but
> slightly less efficient, while the seco
2009/7/2 Tim Chase :
>> Will this order at least be the same for that same query every time the
>> script is executed?
>
> I wouldn't count on it. The order is only defined for the one iteration
> (result of the keys() call). If the order matters, I'd suggest a
> double-dispatch with a non-dict (
Hi all,
I've written a function that reads a specifically formatted text file
and spits out a dictionary. Here's an example:
config.txt:
Destination = C:/Destination
Overwrite = True
Here's my function that takes 1 argument (text file)
the_file = open(textfile,'r')
linelist = the_file.read()
"andrew cooke" writes:
> However, when printed via format_exc(), this new exception still has the
> old exception attached via the mechanism described at
> http://www.python.org/dev/peps/pep-3134/ (this is Python 3.0).
If you're in control of the format_exc() call, I think the new chain
keyword
On Jul 2, 1:44 pm, Duncan Booth wrote:
> Simon Forman wrote:
> > Hey I was hoping to get your opinions on a sort of minor stylistic
> > point.
> > These two snippets of code are functionally identical. Which would you
> > use and why?
> > The first one is easier [for me anyway] to read and unders
On Jul 2, 2009, at 1:37 PM, Lie Ryan wrote:
Joachim Strömbergson wrote:
Aloha!
Tarek Ziadé wrote:
The prefix is a good idea but since it's just a checksum to control
that the file hasn't changed
what's wrong with using a weak hash algorithm like md5 or now sha1 ?
Because it creates a depen
Zach Hobesh wrote:
Hi all,
I've written a function that reads a specifically formatted text file
and spits out a dictionary. Here's an example:
config.txt:
Destination = C:/Destination
Overwrite = True
Here's my function that takes 1 argument (text file)
the_file = open(textfile,'r')
linel
the fact that you felt compelled to explain the "one minor point" in
the first snippet tells me that the second snippet does not need that
explanation and will be easier for someone (like you for example) to
maintain in the future.
Second snippet would be my choice.
Kee Nethery
On Jul 2, 20
On Jul 2, 3:12 am, Ulrich Eckhardt wrote:
> Bearophile wrote:
> > Ulrich Eckhardt:
> >> a way to automatically release the resource, something
> >> which I would do in the destructor in C++.
>
> > Is this helpful?
> >http://effbot.org/pyref/with.htm
>
> Yes, it aims in the same direction. However,
On Thu, 02 Jul 2009 09:38:56 -0700, Ethan Furman wrote:
> Greetings!
>
> My closest to successfull attempt:
>
> Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)]
> Type "copyright", "credits" or "license" for more information.
>
> IPython 0.9.1 -- An enhanced Interact
Simon Forman wrote:
Hey I was hoping to get your opinions on a sort of minor stylistic
point.
These two snippets of code are functionally identical. Which would you
use and why?
The first one is easier [for me anyway] to read and understand, but
slightly less efficient, while the second is [margi
masher writes:
> On Jul 2, 12:06 pm, J Kenneth King wrote:
>> masher writes:
>> > My questions, then, is: Is there a more elegant/pythonic way of doing
>> > what I am trying to do with the current Pool class?
>>
>> Forgive me, I may not fully understand what you are trying to do here
>> (I've n
David Bolen wrote:
> "andrew cooke" writes:
>
>> However, when printed via format_exc(), this new exception still has
the old exception attached via the mechanism described at
>> http://www.python.org/dev/peps/pep-3134/ (this is Python 3.0).
>
> If you're in control of the format_exc() call, I thi
On Wed, Jul 1, 2009 at 4:18 PM, Alex wrote:
> I am looking for an open source RSS reader (desktop, not online)
> written in Python but in vain. I am not looking for a package but a
> fully functional software.
>
> Google: python "open source" (rss OR feeds) reader
>
> Any clue ?
> --
> http://mail.
Simon Forman writes:
> These two snippets of code are functionally identical. Which would you
> use and why?
Both are terrible. I can't tell what you're really trying to do. As
Terry Reedy points out, the case where self.higher and self.lower are
both not None is not handled. If you want to ex
On 2009-07-02, Duncan Booth wrote:
> so apart from reversing the order of the comparisons once you've dropped
> the redundant test it is the same as the first one.
I try to evaluate what you have given regardless of what Booth pointed out.
So, I will only evaluate the first line as it contains m
Tomorrow (July 3) by midnight will be the last opportunity for Toronto
PyCamp registration before the late registration period ending July 10.
PyCamp is the original Python BootCamp developed by a user group for
user groups. This year PyCamp is July 13-17 at the University of
Toronto, sponsored
We are looking for someone that can help with the subject class, Intro to
Python class, 7/21-23, Ft Worth TX. Please let me know if you can help.
Would need your resume and best possible daily rate.
Best regards,
Rich Drehoff
TechnoTraining, Inc.
328 Office Square Lane, Ste. 202, Virgini
Duncan Booth wrote:
Simon Forman wrote:
...
if self.higher is self.lower is None: return
...
As a matter of style however I wouldn't use the shorthand to run two 'is'
comparisons together, I'd write that out in full if it was actually needed
here.
Speaking only to the style issue, when I'
Simon Forman writes:
> ## Second snippet
>
> if self.higher is None:
> if self.lower is None:
> return
> return self.lower
> if self.lower is None:
> return self.higher
>
> What do you think?
I'm not sure, but my guess is that what you are really trying to write
is something
Hello All,
I am trying to use python's subprocess module to launch a process.
but in order to do that I have to change the user.
I am not getting any clue how to do that?
so can anyone please tell me How can I spawn a process under different
user than currently I am logging in as.
Thank you,
san
Simon Forman wrote:
Hey I was hoping to get your opinions on a sort of minor stylistic
point.
These two snippets of code are functionally identical. Which would you
use and why?
The first one is easier [for me anyway] to read and understand, but
slightly less efficient, while the second is [margi
On 2009-07-02, Scott David Daniels wrote:
> Duncan Booth wrote:
>> Simon Forman wrote:
>> As a matter of style however I wouldn't use the shorthand to run two 'is'
>> comparisons together, I'd write that out in full if it was actually needed
>> here.
That part I don't really have a problem wit
David Lyon wrote:
On Wed, 01 Jul 2009 19:48:04 -0700, Brock Pytlik wrote:
Hi, I'm trying to find a way to get the value sys.path would have on a
particular system if python was started with an empty python path. I do
want it to include the site specific additional paths. I know I can hack
On 2009-07-02, Paul Rubin wrote:
[reformated with emphasis added]
>#self.higher and self.lower are each either "available" (i.e. are not
>#None), or unavailable (are None). [EMPHASIS] Return the highest of the
>#available values. [/EMPHASIS] If no value is available, return None.
Y
TextMagic (http://www.textmagic.com) offers a convenient way to send
text messages programmatically. This package provides a simple Python
API on top of the TextMagic HTTPS API.
Project documentation and source code is hosted at
http://code.google.com/p/textmagic-sms-api-python/
The package can b
sanket wrote:
Hello All,
I am trying to use python's subprocess module to launch a process.
but in order to do that I have to change the user.
I am not getting any clue how to do that?
so can anyone please tell me How can I spawn a process under different
user than currently I am logging in as.
why the following does not work? can you help me correct (if possible)?
1 import tarfile
2 import StringIO
3 sf1 = StringIO.StringIO("one\n")
4 sf2 = StringIO.StringIO("two\n")
5 tf = StringIO.StringIO()
6 tar = tarfile.open(tf , "w")
7 for name in [sf1 ,
Peter Otten schreef:
> Ulrich Eckhardt wrote:
>
>> Bearophile wrote:
>>> Ulrich Eckhardt:
a way to automatically release the resource, something
which I would do in the destructor in C++.
>>> Is this helpful?
>>> http://effbot.org/pyref/with.htm
>> Yes, it aims in the same direction. How
Tim Harig writes:
> If lower is 5 and higher is 3, then it returns 3 because 3 != None in the
> first if.
Sorry, the presumption was that lower <= higher, i.e. the comparison
had already been made and the invariant was enforced by the class
constructor. The comment should have been more explicit
On Jul 2, 1:58 pm, Tim Golden wrote:
> sanket wrote:
> > Hello All,
>
> > I am trying to use python's subprocess module to launch a process.
> > but in order to do that I have to change the user.
>
> > I am not getting any clue how to do that?
> > so can anyone please tell me How can I spawn a pro
Hi,
I am brand new to python and I love it, but I've been having some trouble
with a file parser that I've been working on. It contains lines that start
with a name and then continue with names, nicknames and phone numbers of
people associated with that name. I need to create a list of the names o
I have an (in-development) python system that needs to shuttle events /
requests around over the network to other parts of itself. It will also need
to cooperate with a .net application running on yet a different machine.
So, naturally I figured some sort of HTTP event / RPC type of would be
On Jul 2, 2009, at 6:05 PM, Hanna Michelsen wrote:
Hi,
I am brand new to python and I love it, but I've been having some
trouble
with a file parser that I've been working on. It contains lines that
start
with a name and then continue with names, nicknames and phone
numbers of
people asso
> I have an (in-development) python system that needs to shuttle events /
> requests
> around over the network to other parts of itself. It will also need to
> cooperate with a .net application running on yet a different machine.
>
> So, naturally I figured some sort of HTTP event / RPC t
1 - 100 of 164 matches
Mail list logo