See my code below.
I'm controlling a shell logged in as root with pexpect.
The class below has a method (startProc) which spawns a shell and
keeps it alive until told to destroy it (stopProc).
The other 2 methods in this class allow me to change the system clock
and to get the IP Address of
Hi,
I have just completed my B.tech this year and have above six months
experience in OpenERP framework as a technical consultant.In these six
months I have completed nearly 5 modules and acted as an active
member.Now, my company is going under a financial crisis and so, I
think I have to leave
On 12/26/2011 05:27 AM, Yigit Turgut wrote:
On Dec 25, 7:06 pm, Rick Johnsonrantingrickjohn...@gmail.com wrote:
On Dec 25, 9:33 am, Yigit Turguty.tur...@gmail.com wrote:
Hi all,
I have a text file as following;
0.2000470.00
0.2000530.16
0.2000590.00
On 12/26/2011 12:04 PM, Felipe O wrote:
Hi all,
Whenever I take any input (raw_input, of course!) or I read from a
file, etc., any backslashes get escaped automatically.
Python never escapes backslashes when reading from raw_input or files.
Python only ever escapes backslashes when displaying
In article mailman.4097.1324877003.27778.python-l...@python.org,
Devin Jeanpierre jeanpierr...@gmail.com wrote:
Um -- if you don't want a and c being passed in, why put them in the
function signature?
He wants both or neither to be passed in.
assert sum(foo is None for foo in [a, c]) % 2
In article
1f342621-0c96-447c-ad5d-f8c9dc777...@i6g2000vbe.googlegroups.com,
Saqib Ali saqib.ali...@gmail.com wrote:
I believe what is going on is that internally pexpect uses the system
clock to keep track of when it receives data from spawned processes.
When I mess with the clock, that
In article
CAMW75Yv5f=PdcZqt-ti=iee7gxgfzqp8jxh485zjohd9l63...@mail.gmail.com,
Alex Ter-Sarkissov ater1...@gmail.com wrote:
hi everyone, I run python 2.7.2. in Eclipse (recently upgraded from 2.6). I
have a problem with installing matplotlib (I found the version for python
2.7. MacOs 10.3, no
On Dec 25, 9:27 pm, Chris Angelico ros...@gmail.com wrote:
On Mon, Dec 26, 2011 at 4:44 AM, Rick Johnson
[...]
Conversely, why write an IDE into IDLE when perfectly-good IDEs
already exist? I don't use IDLE for development per se; it's for
interactive Python execution, but not editing of
GZ zyzhu2...@gmail.com writes:
I run into a weird problem. I have a piece of code that looks like the
following:
f(, a=None, c=None):
assert (a==None)==(c==None)
There is only one 'None' - so use 'a is None' rather than 'a == None'.
(In common lisp there is a particular language
On Mon, Dec 26, 2011 at 9:52 AM, Rick Johnson
rantingrickjohn...@gmail.com wrote:
On Dec 25, 9:27 pm, Chris Angelico ros...@gmail.com wrote:
On Mon, Dec 26, 2011 at 4:44 AM, Rick Johnson
[...]
Conversely, why write an IDE into IDLE when perfectly-good IDEs
already exist? I don't use IDLE for
On Dec 26, 11:28 am, Lie Ryan lie.1...@gmail.com wrote:
On 12/26/2011 05:27 AM, Yigit Turgut wrote:
On Dec 25, 7:06 pm, Rick Johnsonrantingrickjohn...@gmail.com wrote:
On Dec 25, 9:33 am, Yigit Turguty.tur...@gmail.com wrote:
Hi all,
I have a text file as following;
On Dec 26, 10:11 am, Nathan Rice nathan.alexander.r...@gmail.com
wrote:
On Mon, Dec 26, 2011 at 9:52 AM, Rick Johnson
rantingrickjohn...@gmail.com wrote:
On Dec 25, 9:27 pm, Chris Angelico ros...@gmail.com wrote:
On Mon, Dec 26, 2011 at 4:44 AM, Rick Johnson
[...]
Conversely,
Devin Jeanpierre wrote:
Um -- if you don't want a and c being passed in, why put them in the
function signature?
He wants both or neither to be passed in.
Ah -- right.
~Ethan~
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 26 Dec 2011 06:52:03 -0800, Rick Johnson wrote:
If Guido would just say something (or at least some of the top
Pythionistas (Hettinger i am looking at you!)) this community might work
together to fix this problem.
The sheer cluelessness displayed here about open source is painful.
If
On 12/24/2011 11:35 AM, Dennis Lee Bieber wrote:
On Sat, 24 Dec 2011 10:55:48 -0800, W. eWatson
wolftra...@invalid.com wrote:
Permissions as follows:
SYSTEM: All. From Full control to write
Account Unknown(S-1-5-21...): readexec, Read
Wayne: (normal use) All. From Full control to write
I have a loop as following ;
start = time.time()
end = time.time() - start
while(endN):
data1 = self.chan1.getWaveform()
end = time.time() - start
timer.tick(10) #FPS
screen.fill((255,255,255) if white else(0,0,0))
white = not white
On 12/27/2011 04:08 AM, Yigit Turgut wrote:
On Dec 26, 11:28 am, Lie Ryanlie.1...@gmail.com wrote:
On 12/26/2011 05:27 AM, Yigit Turgut wrote:
On Dec 25, 7:06 pm, Rick Johnsonrantingrickjohn...@gmail.comwrote:
On Dec 25, 9:33 am, Yigit Turguty.tur...@gmail.comwrote:
Hi all,
On Dec 26, 8:58 pm, Lie Ryan lie.1...@gmail.com wrote:
On 12/27/2011 04:08 AM, Yigit Turgut wrote:
On Dec 26, 11:28 am, Lie Ryanlie.1...@gmail.com wrote:
On 12/26/2011 05:27 AM, Yigit Turgut wrote:
On Dec 25, 7:06 pm, Rick Johnsonrantingrickjohn...@gmail.com wrote:
On Dec
On 12/26/2011 10:16 AM, W. eWatson wrote:
On 12/24/2011 11:35 AM, Dennis Lee Bieber wrote:
On Sat, 24 Dec 2011 10:55:48 -0800, W. eWatson
wolftra...@invalid.com wrote:
Permissions as follows:
SYSTEM: All. From Full control to write
Account Unknown(S-1-5-21...): readexec, Read
Wayne: (normal
On Tue, Dec 27, 2011 at 5:32 AM, Rick Johnson
rantingrickjohn...@gmail.com wrote:
Why has Guido not, at the very least, contacted me
privately? He could remain anonymous.
And how would you know if he did contact you anonymously?
As to your demand that one of the top Pythionistas [sic] say
On Mon, Dec 26, 2011 at 11:31 AM, Yigit Turgut y.tur...@gmail.com wrote:
I have a loop as following ;
start = time.time()
end = time.time() - start
while(endN):
data1 = self.chan1.getWaveform()
end = time.time() - start
timer.tick(10) #FPS
On Mon, Dec 26, 2011 at 1:01 PM, Ian Kelly ian.g.ke...@gmail.com wrote:
You essentially have two completely independent loops that need to run
simultaneously with different timings. Sounds like a good case for
multiple threads (or processes if you prefer, but these aren:
I accidentally sent
On Dec 26, 10:03 pm, Ian Kelly ian.g.ke...@gmail.com wrote:
On Mon, Dec 26, 2011 at 1:01 PM, Ian Kelly ian.g.ke...@gmail.com wrote:
You essentially have two completely independent loops that need to run
simultaneously with different timings. Sounds like a good case for
multiple threads (or
On Mon, Dec 26, 2011 at 1:13 PM, Yigit Turgut y.tur...@gmail.com wrote:
I had thought the same workaround but unfortunately loop is already
under a def ;
So nest the functions, or refactor it. Either way, that shouldn't be
a significant obstacle.
--
On Dec 25, 5:15 pm, Steven D'Aprano steve
+comp.lang.pyt...@pearwood.info wrote:
On Sun, 25 Dec 2011 06:55:28 -0800, Eelco wrote:
Anyway, braces are used at
least an order of magnitude more than collection packing/ unpacking in
typical code.
That's a wild and unjustified claim. Here's a
On Dec 25, 5:23 pm, Chris Angelico ros...@gmail.com wrote:
On Mon, Dec 26, 2011 at 2:38 AM, Eelco hoogendoorn.ee...@gmail.com wrote:
Until that time, im going
to ask you to take 'type constraint' by its literal meaning; a
coercion of the type of a symbol, rather than whatever particular
On Tue, Dec 27, 2011 at 7:39 AM, Eelco hoogendoorn.ee...@gmail.com wrote:
Now try it without changing the subject from round braces to
everything but round braces.
Around here, the term braces means the curly ones - { and } - that
delimit blocks of code in C, and dictionaries/sets in Python.
On Tue, Dec 27, 2011 at 7:58 AM, Eelco hoogendoorn.ee...@gmail.com wrote:
What you are talking about goes by the name of a 'dynamic type CHECK';
some kind of syntactic sugar for something like
'assert(type(obj)==sometype)'. Like a 'type cast', this is also a
runtime concept...
By contrast,
On Dec 25, 6:05 pm, Steven D'Aprano steve
+comp.lang.pyt...@pearwood.info wrote:
On Sun, 25 Dec 2011 07:38:17 -0800, Eelco wrote:
On Dec 25, 2:12 pm, Steven D'Aprano steve
+comp.lang.pyt...@pearwood.info wrote:
On Sat, 24 Dec 2011 06:39:39 -0800, Eelco wrote:
On Dec 20, 4:30 am, alex23
On Dec 26, 10:01 pm, Chris Angelico ros...@gmail.com wrote:
On Tue, Dec 27, 2011 at 7:39 AM, Eelco hoogendoorn.ee...@gmail.com wrote:
Now try it without changing the subject from round braces to
everything but round braces.
Around here, the term braces means the curly ones - { and } - that
On Dec 26, 10:05 pm, Chris Angelico ros...@gmail.com wrote:
On Tue, Dec 27, 2011 at 7:58 AM, Eelco hoogendoorn.ee...@gmail.com wrote:
What you are talking about goes by the name of a 'dynamic type CHECK';
some kind of syntactic sugar for something like
'assert(type(obj)==sometype)'. Like a
On Tue, Dec 27, 2011 at 8:51 AM, Eelco hoogendoorn.ee...@gmail.com wrote:
That proves the original point of contention: that [Steve's demo code] is
suboptimal language design, not because terseness always trumps
verbosity, but because commonly-used constructs (such as parenthesis
or round
This doesn't cause a crash, but rather incorrect results.
self.wordList=[The, quick, brown, fox, carefully,
jumps, over, the, lazy, dog, as, it,
stealthily, wends, its, way, homewards, '\b.']
foriinrange (len (self.wordList) ):
ifnot
On Tue, Dec 27, 2011 at 9:12 AM, Eelco hoogendoorn.ee...@gmail.com wrote:
On Dec 26, 10:05 pm, Chris Angelico ros...@gmail.com wrote:
A constraint can be applied at compile time or at run time. It'd be
valid to apply them at edit time, if you so chose - your editor could
refuse to save your
On Tue, Dec 27, 2011 at 9:23 AM, Charles Hixson
charleshi...@earthlink.net wrote:
This doesn't cause a crash, but rather incorrect results.
You may need to be a bit clearer. What line of code (or what
expression)? What did you expect to see, and what did you see?
From examining your code, I've
Roy Smith r...@panix.com wrote:
In article roy-aaaeea.10571424122...@news.panix.com,
Roy Smith r...@panix.com wrote:
len([x for x in zip(s1, s2) if x[0] != x[1]])
Heh, Ian Kelly's version:
sum(a == b for a, b in zip(str1, str2))
is cleaner than mine. Except that Ian's counts
On Dec 26, 4:23 pm, Charles Hixson charleshi...@earthlink.net wrote:
This doesn't cause a crash, but rather incorrect results.
self.wordList = [The, quick, brown, fox, carefully,
jumps, over, the, lazy, dog, as, it,
stealthily, wends, its, way,
On Tue, Dec 27, 2011 at 9:48 AM, Rick Johnson
rantingrickjohn...@gmail.com wrote:
Handy rules for reporting bugs:
1. Always format code properly.
2. Always trim excess fat from code.
3. Always include relative dependencies (self.wordlist is only valid
inside a class. In this case, change the
On Dec 26, 10:01 pm, Ian Kelly ian.g.ke...@gmail.com wrote:
On Mon, Dec 26, 2011 at 11:31 AM, Yigit Turgut y.tur...@gmail.com wrote:
I have a loop as following ;
start = time.time()
end = time.time() - start
while(endN):
data1 = self.chan1.getWaveform()
end =
Hi
I am trying to change @HWI-ST115:568:B08LLABXX:1:1105:6465:151103 1:N:
0: to @HWI-ST115:568:B08LLABXX:1:1105:6465:151103/1.
Can anyone help me with the regular expressions needed?
Thanks in advance.
Maurice
--
http://mail.python.org/mailman/listinfo/python-list
thanks Ned,
that's quite weird: if I run python2.7-32 in terminal, it works like you
said, but when I add it as an interpreter in Eclipse, matplotlib.pyplot
doesn't get imported for some reason. Even more strange, either way
platform.architecture() reports 64-bit. What's wrong here?
cheers,
thanks Ned,
that's quite weird: if I run python2.7-32 in terminal, it works like you
said, but when I add it as an interpreter in Eclipse, matplotlib.pyplot
doesn't get imported for some reason. Even more strange, either way
platform.architecture() reports 64-bit. What's wrong here?
cheers,
On Tue, Dec 27, 2011 at 10:45 AM, mauricel...@acm.org
mauricel...@gmail.com wrote:
Hi
I am trying to change one string to another string.
Can anyone help me with the regular expressions needed?
A regular expression defines a string based on rules. Without seeing a
lot more strings, we can't
In article
495b6fe6-704a-42fc-b10b-484218ad8...@b20g2000pro.googlegroups.com,
mauricel...@acm.org mauricel...@gmail.com wrote:
Hi
I am trying to change @HWI-ST115:568:B08LLABXX:1:1105:6465:151103 1:N:
0: to @HWI-ST115:568:B08LLABXX:1:1105:6465:151103/1.
Can anyone help me with the
On Tue, Dec 27, 2011 at 10:45 AM, mauricel...@acm.org
mauricel...@gmail.com wrote:
Hi
I am trying to change one string to another string.
Can anyone help me with the regular expressions needed?
A regular expression defines a string based on rules. Without seeing a
lot more strings, we
On Dec 27, 8:00 am, Chris Angelico ros...@gmail.com wrote:
On Tue, Dec 27, 2011 at 10:45 AM, mauricel...@acm.org
mauricel...@gmail.com wrote:
Hi
I am trying to change one string to another string.
Can anyone help me with the regular expressions needed?
A regular expression defines a
On Dec 27, 8:16 am, Jason Friedman ja...@powerpull.net wrote:
On Tue, Dec 27, 2011 at 10:45 AM, mauricel...@acm.org
mauricel...@gmail.com wrote:
Hi
I am trying to change one string to another string.
Can anyone help me with the regular expressions needed?
A regular expression
On Dec 26, 11:27 pm, Chris Angelico ros...@gmail.com wrote:
On Tue, Dec 27, 2011 at 8:51 AM, Eelco hoogendoorn.ee...@gmail.com wrote:
That proves the original point of contention: that [Steve's demo code] is
suboptimal language design, not because terseness always trumps
verbosity, but
On Tue, Dec 27, 2011 at 10:44 AM, Eelco hoogendoorn.ee...@gmail.com wrote:
extended collection unpacking, as in 'head,*tail=sequence', is quite a
rare construct indeed, and here I very strongly feel a more explicit
syntax is preferrable.
You may be right, but...
... if collection
On Mon, 26 Dec 2011 14:23:03 -0800, Charles Hixson wrote:
This doesn't cause a crash, but rather incorrect results.
Charles, your code is badly formatted and virtually unreadable. You have
four spaces between some tokens, lines are too long to fit in an email or
News post without
Thanks a lot everyone.
Can anyone suggest a good place to learn REs?
Start with the manual:
http://docs.python.org/py3k/library/re.html#module-re
--
http://mail.python.org/mailman/listinfo/python-list
Dear list,
Lately, I've had a personal itch to scratch, in that I run a couple of
Python programs as daemons, and sometimes want to inspect or alter them in
ad-hoc ways, or other times need to do things to them that are less
ad-hoc in nature, but nevertheless lack a natural user interface.
I'm confused about the following. The idea here is that the set of
instances of some class are small and finite, so I'd like to create them
at class creation time, then hijack __new__ to simply return one of the
preexisting classes instead of creating a new one each call.
This seems to work
On Mon, 26 Dec 2011 20:28:26 -0800, K. Richard Pixley wrote:
I'm confused about the following. The idea here is that the set of
instances of some class are small and finite, so I'd like to create them
at class creation time, then hijack __new__ to simply return one of the
preexisting classes
On Mon, 26 Dec 2011, mauricel...@acm.org wrote:
I've tried
re.sub('@\S\s[1-9]:[A-N]:[0-9]', '@\S\s', '@HWI-ST115:568:B08LLABXX:
1:1105:6465:151103 1:N:0:')
but it does not seems to work.
Indeed, for several reasons. First of all, your backslash sequences are
interpreted by Python as string
On Dec 26, 2011 4:13 PM, Yigit Turgut y.tur...@gmail.com wrote:
Why is there N variable in write_data function ? N is related to
timer.tick(N) which is related to display function ? time.sleep(N)
will pause writing to file for specified amount of time which is
exactly what I am trying to
On 12/26/11 20:53 , Steven D'Aprano wrote:
On Mon, 26 Dec 2011 20:28:26 -0800, K. Richard Pixley wrote:
I'm confused about the following. The idea here is that the set of
instances of some class are small and finite, so I'd like to create them
at class creation time, then hijack __new__ to
On Mon, 26 Dec 2011, K. Richard Pixley wrote:
I don't understand. Can anyone explain?
I'm also a bit confused about __new__. I'd very much appreciate it if
someone could explain the following aspects of it:
* The manual (http://docs.python.org/reference/datamodel.html) says
that
On Dec 20, 10:58 am, Andrea Crotti andrea.crott...@gmail.com wrote:
On 12/20/2011 03:51 AM, Raymond Hettinger wrote:
Do you use IDLE when teaching Python?
If not, what is the tool of choice?
Students may not be experienced with the command-line and may be
running Windows, Linux,
On Dec 25, 5:44 pm, Rick Johnson rantingrickjohn...@gmail.com wrote:
On Dec 19, 9:51 pm, Raymond Hettinger raymond.hettin...@gmail.com
wrote:
Do you use IDLE when teaching Python?
If not, what is the tool of choice?
I believe IDLE has the potential to be a very useful teaching tool and
Hello all:
I have a basic server I am working on, and wanted some input with an
error I'm getting.
I am initializing the logger like so:
if __name__ == __main__:
observer = log.PythonLoggingObserver()
observer.start()
logging.basicConfig(filename='logs/server.log', level=logging.DEBUG,
In article
camw75ysaeawo5+rjwggfkustyto1q+0zfkvachtuadodqy4...@mail.gmail.com,
Alex Ter-Sarkissov ater1...@gmail.com wrote:
that's quite weird: if I run python2.7-32 in terminal, it works like you
said, but when I add it as an interpreter in Eclipse, matplotlib.pyplot
doesn't get imported for
On Mon, Dec 26, 2011 at 10:48 PM, Fredrik Tolf fred...@dolda2000.com wrote:
I'm also a bit confused about __new__. I'd very much appreciate it if
someone could explain the following aspects of it:
* The manual (http://docs.python.org/reference/datamodel.html) says
that __new__ is a static
On 12/27/2011 04:48 PM, Fredrik Tolf wrote:
On Mon, 26 Dec 2011, K. Richard Pixley wrote:
I don't understand. Can anyone explain?
I'm also a bit confused about __new__. I'd very much appreciate it if
someone could explain the following aspects of it:
* The manual
New submission from INADA Naoki songofaca...@gmail.com:
I am one of Japanese translate of Python documents.
We have done translating Python 2.7 document and will start
translating Python 3.2 or 3.3.
I want to use sphinx-i18n and pootle to translate.
But http://pootle.python.org/ is very
Changes by Stefano Rivera pyt...@rivera.za.net:
--
nosy: +stefanor
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13508
___
___
Python-bugs-list
Devin Jeanpierre jeanpierr...@gmail.com added the comment:
C11 uses 'x' for this, for what it's worth.
This is not a duplicate issue. The openat solution is no easier than the
os.open solution.
--
nosy: +Devin Jeanpierre
___
Python tracker
Changes by Barry A. Warsaw ba...@python.org:
--
nosy: +barry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13508
___
___
Python-bugs-list mailing
Michael P. Reilly arc...@gmail.com added the comment:
Here is a patch to socketserver.py which can be applied to 2.6, 2.7 and 3.2.
The fix is for BaseServer, ForkingMixIn and ThreadingMixIn. All three now
correctly respond to the shutdown method. I have no way of testing Windows or
MacOSX
Michael P. Reilly arc...@gmail.com added the comment:
An update test program. Execute with appropriate PYTHONPATH (to dir to patched
module and explicit interpreter executable: PYTHONPATH=$PWD/2.7/b/Lib python2.7
$PWD/simpletest.py
--
Added file:
New submission from Jason R. Coombs jar...@jaraco.com:
While investigating #11638, I encountered another encoding issue related to
tarballs. Consider this command:
python -c import gzip; gzip.GzipFile(u'\xe5rchive', 'w',
fileobj=open(u'\xe5rchive', 'wb'))
When run, it triggers the following
Changes by Jason R. Coombs jar...@jaraco.com:
--
components: +Library (Lib)
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13664
___
___
Jason R. Coombs jar...@jaraco.com added the comment:
I've captured the cause of the UnicodeEncodeErrors as #13664.
After rebasing the changes to include the fix for #13639, I found that the
tests were still failing until I also reverted the patch to call tarfile.open
with 'w:gz'. Now all the
Changes by Jason R. Coombs jar...@jaraco.com:
Added file: http://bugs.python.org/file24095/dc1045d08bd8.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11638
___
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset dc1045d08bd8 by Jason R. Coombs in branch '2.7':
Issue #11638: Adding test to ensure .tar.gz files can be generated by sdist
command with unicode metadata, based on David Barnett's patch.
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset dc1045d08bd8 by Jason R. Coombs in branch '2.7':
Issue #11638: Adding test to ensure .tar.gz files can be generated by sdist
command with unicode metadata, based on David Barnett's patch.
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset f0fcb82a88e9 by Jason R. Coombs in branch 'default':
Ported some test cases from 2.7 for #11638
http://hg.python.org/cpython/rev/f0fcb82a88e9
--
___
Python tracker
Jason R. Coombs jar...@jaraco.com added the comment:
Since the tests now pass, and the only changes were to the tests, I've pushed
them to the master. And with that I'm marking this ticket as closed.
--
status: open - closed
___
Python tracker
New submission from Jason R. Coombs jar...@jaraco.com:
When constructing a ctypes.c_char_p with a unicode string, a confusing error
message is reported:
python -c import ctypes; ctypes.c_char_p('foo')
Traceback (most recent call last):
File string, line 1, in module
TypeError: string or
New submission from Stephen Kelly steve...@gmail.com:
There are several bugs on
http://docs.python.org/library/datetime.html
Section 8.1.6 references the method rzinfo.dst(), which does not exist.
Presumably this should be tzinfo.dst().
Section 8.1.4 contains an implementation of a GMT2
80 matches
Mail list logo