7;s good enough.
Thanks
-Message d'origine-
De : Python-list [mailto:python-list-bounces+pedronac=gmail@python.org] De
la part de Jerry Hill
Envoyé : mardi 13 février 2018 19:01
À : python-list (General)
Objet : Re: Can't Uninstall !
On Tue, Feb 13, 2018 at 10:30 AM, Pe
février 2018 01:07
À : python-list@python.org
Objet : Re: Can't Uninstall !
On 2018-02-12 11:54, Pedro Crescencio wrote:
> Hello,
> I tried to uninstall Python, but it is not possible.
>
> Even when message say it is uninstalled :
> The software is still on applications menu:
&g
Atlassian.
Best regards,
Pedro
--
https://mail.python.org/mailman/listinfo/python-list
mes);
# apply "where" condition
z = x[ (x['Age'] == 55) ]
# prints row WHERE age == 55
print (z);
What is happening in this statement:
z = x[ (x['Age'] == 55) ]
Thanks,
Pedro Exposito
The information containe
Assume a python program sets a handler function for the
`signal.SIGALRM` signal, and then schedules an alarm in T seconds with
`signal.alarm(T)`.
Assume the program later cancels any scheduled alarm with `signal.alarm(0)`.
Can the program safely assume that after the call to `signal.alarm(0)`
com
On Saturday, December 12, 2015 at 4:48:46 PM UTC-5, Pedro Vincenty wrote:
> Hello, I'm wondering how to append a line from a file onto a list(easy part)
> provided that the line contains strings specific to a previous list I've
> already made(hard part). I have this right
Hello, I'm wondering how to append a line from a file onto a list(easy part)
provided that the line contains strings specific to a previous list I've
already made(hard part). I have this right now,
for line in satellite_dataread:
if any(i in line for i in list2):
line= line.
All were really helpful thanks a lot. Now I'm interested in identifying a
particular index after being able to print out each word. Printing each word
to the console I have :
['METEOSAT-7']
['1', '24932U', '97049B', '15319.57839525', '.0058', '0-0', '0+0',
'0', '9994']
['2', '249
pedro@microboard:~$ /usr/bin/python3
Python 3.3.2+ (default, Feb 28 2014, 00:52:16)
[GCC 4.8.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 1-0.95
0.050044
>>>
How to get 0.05 as r
- Original Message -
> From: Gregory Ewing
> To: python-list@python.org
> Cc:
> Sent: Thursday, June 12, 2014 8:38 AM
> Subject: Re: Lines on a tkinter.Canvas
>
> Pedro Izecksohn wrote:
>> The Canvas' method create_line turns on at least 2 pixels. B
- Original Message -
> From: Gregory Ewing
> To: python-list@python.org
> Sent: Thursday, June 12, 2014 8:38 AM
> Subject: Re: Lines on a tkinter.Canvas
>
> Pedro Izecksohn wrote:
>> The Canvas' method create_line turns on at least 2 pixels. But I want
As Peter Otten did not see the same result that I saw, I prepared an image
that shows the result on my notebook:
http://izecksohn.com/pedro/python/canvas/tk_window.xcf
For those that might not know: xcf is the Gimp's file format.
- Original Message -
> From: Peter Otten
>
The code available from:
http://izecksohn.com/pedro/python/canvas/testing.py
draws 2 horizontal lines on a Canvas. Why the 2 lines differ on thickness and
length?
The Canvas' method create_line turns on at least 2 pixels. But I want to turn
on many single pixels on a Canvas. How sho
Today I wrote the following API. It was not implemented on C yet. Do you have
any comment? Could you help me to implement it?
http://www.izecksohn.com/pedro/python/fingerprint/fingerprint.001.py
--
https://mail.python.org/mailman/listinfo/python-list
Shouldn't pickle.dump (obj, conn) raise an Exception if conn is a TCP
connection that was closed by the remote host?
--
https://mail.python.org/mailman/listinfo/python-list
I think for new projects one should go with 3.x this is the right thing to
do. If you require a module that's 2.x only it's easy enough to port it
unless it depends on some monster like protobuf which doesn't have
python3.x support
Pedro.
On Wed, Jan 8, 2014 at 3:30 PM, Mark
--
https://mail.python.org/mailman/listinfo/python-list
On Saturday, May 4, 2013 5:37:42 AM UTC-4, Irmen de Jong wrote:
> On 4-5-2013 4:13, Pedro wrote: > SERVER: > > import socket # Import socket
> module > > s = socket.socket() # Create a socket object > host =
> socket.gethostname() # Get local machine name > port =
On Friday, May 3, 2013 11:56:01 PM UTC-4, Chris Angelico wrote:
> On Sat, May 4, 2013 at 1:37 PM, Pedro wrote:
>
> > On Friday, May 3, 2013 10:23:38 PM UTC-4, Chris Angelico wrote:
>
> >> The accept() call should block. It's not going to spin or anything. If
>
On Friday, May 3, 2013 10:23:38 PM UTC-4, Chris Angelico wrote:
> On Sat, May 4, 2013 at 12:13 PM, Pedro wrote:
>
> > First - this code constantly loops around an open socket. Is there a way to
> > use something like an interrupt so I don't have to loop constantly to
I'm writing a simple app that uses socket programming, I'm using the following
from tutorialspoint as a framework but I'm having a couple of issues
implementing it.
First - this code constantly loops around an open socket. Is there a way to use
something like an interrupt so I don't have to lo
Alasdair McAndrew on Thu, 29 Nov 2012 wrote:
> Probably the combinations of OpenCV, Scipy.ndimage and scikits-image
> would cover pretty much all of my needs.
Hi,
All of those (+ mahotas, which is the package I wrote & imread which
might be useful for microscopy file formats) will work on nu
Try incrementing the variable cursor.arraysize a lot.
Pedro.
On Tue, Aug 28, 2012 at 11:20 PM, Dennis Lee Bieber
wrote:
> On Tue, 28 Aug 2012 10:25:35 -0700 (PDT), bruceg113...@gmail.com
> declaimed the following in gmane.comp.python.general:
>
>>
>> Doesn't the last p
_with pypy_
On Wed, Aug 22, 2012 at 12:16 AM, Mark Lawrence wrote:
> On 21/08/2012 22:55, Pedro Larroy wrote:
>>
>> Hi
>>
>> Anyone knows if it's possible to use protobuffers with pypy? Seems
>> there isn't much info on the web about this.
>>
On Aug 10, 2012, at 3:52 PM, Chuck wrote:
>if __name__ == '__main__':
>
>quiz()
>
>
You need to instantiate your class:
foo = ElementsQuiz()
foo.quiz()
Pedro
-
http://pedrokroger.net
http://musicforgeeksandnerds.com
--
http://mail.py
ss simple example. After all,
the whole point of pyknon is to be able to generate music programmatically
using Python:
http://kroger.github.com/pyknon/
> You could consider posting Pyknon to comp.music.midi ;
> it's very low traffic, but some real gurus lurk there.
Good idea, thanks
thon packages while virtualenv creates an
isolated Python environment
For instance, I just installed docx and its dependencies with:
pip install docx lxml datutils PIL
And I did that inside a testing virtualenv, so I wouldn't mess up my Python
setup.
pip and virtualenv make it really easy
On Jul 30, 2012, at 3:33 PM, Ethan Furman wrote:
> Pedro Kroger wrote:
>> Pyknon is a simple music library for Python hackers.
>
> Sounds cool. How is 'Pyknon' pronounced?
I pronounce it similarly as google translate does:
http://translate.google.com/#English|Engli
nmidi import Midi
from pyknon.music import NoteSeq
notes1 = NoteSeq("D4 F#8 A Bb4")
midi = Midi(1, tempo=90)
midi.seq_notes(notes1, track=0)
midi.write("demo.mid")
It's available on PyPI and its homepage is
http://kroger.github.com/pyknon/
B
want (it generates MIDI files) but it's a nice library and it may be a good
starting point:
http://code.google.com/p/midiutil/
Pedro
--
http://pedrokroger.net
http://musicforgeeksandnerds.com/
--
http://mail.python.org/mailman/listinfo/python-list
with pygame 1.9.0.
python -m pygame.examples.midi --output
(http://wiki.python.org/moin/PythonInMusic)
Pedro
--
http://pedrokroger.net
http://musicforgeeksandnerds.com/
On May 9, 2012, at 1:33 PM, Toby wrote:
> On 05/09/2012 09:13 AM, Dave Angel wrote:
>> On 05/09/2012 11:52 AM
Isn't virtualenv for this kind of scenario?
Pedro.
On Fri, May 4, 2012 at 3:46 PM, Dave Angel wrote:
> On 05/04/2012 08:21 AM, Neal Becker wrote:
>> I'm testing some software I'm building against an alternative version of a
>> library. So I have an alternative l
Have you tried to use the function list?:
foo = (1,2,3)
list(foo)
Cheers,
Pedro
--
http://pedrokroger.net
On May 1, 2012, at 5:18 PM, ksals wrote:
> Please help a newbe. I have a string returned from an esygui
> multchoicebox that looks like
> this: ('ksals', '
On 2012-03-13 12:44 PM, Paul Rudin wrote:
Just out of interest why do people object to job adverts here? Seems
harmless enough...
Wannabe list admins... Or list admins with a need to proof themselves...
Or none of the above.
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Dec 13, 2011 at 3:22 PM, prakash jp wrote:
>
> Hi All,
>
> Want to publish a log file as a web page, is there a parser to retain the
> format of the text as is and then convert to html. Please provide the
> relevant pointers
Hey, You can use this: http://txt2tag
idy
If you like to write your own script, or if what you want is similar,
but not the same, the source code is a good place to start:
http://lacusveris.com/PythonTidy/PythonTidy-1.20.python
--
Att;
Pedro Henrique G. Souto
--
http://mail.python.org/mailman/listinfo/python-list
a Python script.
> I looked up around but I can't find anything useful, any advice?
You can use the strip() method:
[http://docs.python.org/release/2.3/lib/module-string.html]
While reading the file as strings, the strip() method rips out all of
the extra whitespace.
> Thanks,
> A
nt of view.
If you just want to run python scripts in those machines (not developing
in it), you can use something like py2exe [http://www.py2exe.org/].
It converts a python script to a standalone executable.
Good luck!
--
Att;
Pedro Henrique G. Souto
╔═╗
)
Thanks a lot.
That means (in a free translation)
"For each one of 'x' in 'y', do this"
'y' is a list, for example, then it means: "For each one of the elements
of the list 'y' (the element on the current iteration is named 'x'), do
t
# blablabla
if __name__ == '__main__':
main()
If the program is running directly, the variable __name__ will be
'__main__', if not, __name__ will be the name of the module ('program',
in this case).
Att;
Pedro
--
http://mail.python.org/mailman/listinfo/python-list
Hi
pickling
Just crossposting this from stackoverflow:
http://stackoverflow.com/questions/6857006/python-monotonically-increasing-memory-usage-leak
Any hints?
Pedro.
--
Pedro Larroy Tovar | http://pedro.larroy.com/
--
http://mail.python.org/mailman/listinfo/python-list
ascii' codec can't encode character u'\xe9' in position
0: ordinal not in range(128)
So, python is not being able to detect the encoding of the output in a
situation like that, in which the python script is called not directly but
around ``.
Why does happen? Is th
Hello, my name Pedro Igor, I am a student and develop applications in
python for 1 year. I enrolled in the group to contribute in developing
this wonderful language that helps me both in day-to-day, but I'm
going through some difficulties because they do not know where to
start, can someone p
On 04/03/10 19:52, ccc31807 wrote:
> On Mar 4, 11:51 am, Juan Pedro Bolivar Puente
> wrote:
>> No, relations are data.
>
> This depends on your definition of 'data.' I would say that
> relationships is information gleaned from the data.
>
>> "Data
On 04/03/10 16:21, ccc31807 wrote:
> On Mar 3, 4:55 pm, toby wrote:
>>> where you have to store data and
>>
>> "relational data"
>
> Data is neither relational nor unrelational. Data is data.
> Relationships are an artifact, something we impose on the data.
> Relations are for human convenience,
On Wed, Nov 25, 2009 at 09:38:54AM -0800, doug wrote:
>
> When I type C-c C-c my emacs window just hangs. If I use Task Manager
> to kill cmdproxy I can get emacs back but of course interactivity with
> Python is not accomplished. By the way, if I do C-c ! then I get a
> functional python shell.
Dear all,
I would like to know how to convert a list of points into a polygon
shapefile (esri).
Thanks!
Best regards,
Luis Pedro Almeida
--
http://mail.python.org/mailman/listinfo/python-list
The scripts i need to run but be executed with no apparent delay
specially when the text transforms are simple.
On Oct 26, 2008, at 11:13 AM, James Mills wrote:
On Sun, Oct 26, 2008 at 11:23 AM, BJörn Lindqvist
<[EMAIL PROTECTED]> wrote:
How are you getting those numbers? 330 μs is still pr
Hi guys,
Is there a way to improve the interpreter startup speed?
In my machine (cold startup) python takes 0.330 ms and ruby takes
0.047 ms, after cold boot python takes 0.019 ms and ruby 0.005 ms to
start.
TIA
--
http://mail.python.org/mailman/listinfo/python-list
Hi
I'm trying to build a small application that can display some images
in a toplevel window. I have this code:
def Results(master):
from Tkinter import Toplevel, Button, Label
from PIL import ImageTk
figures = ['first.png', 'second.png']
ResultsWindow = Toplevel(master)
Res
t it now. :) It already works. I wasn't putting the module
on my working dir.
(I created the module testpackageaddon.py and I did the "override" on
it, then imported it after the import testpackage on my working
script.)
Thanks.
Pedro Machado Santa
--
http://mail.python.org/mailman/listinfo/python-list
testpackage
import testpackageaddon
testpackage.testClass() #my hacked class defined on
testpackageaddon.py
And on testpackageaddon.py:
import testpackage
class testClass():
#...
testpackage.testClass = testClass
Any tips, ideas on how to do this?
Many thanks.
Pedro Machado Santa
--
http://mail
me up also with other sorts of applications. This lead me to think that there might be some inconsistency in the Registry of Windows or some files that have been left behind after uninstall. I've tried to address these two possibilities but so far I did not succeed :(
pedro
On 11/8/06, Bugr
the I get the same problem :(
Has anyone every experienced such a thing? Suggestions on how to solve this?
greetings,
pedro rodrigues
--
http://mail.python.org/mailman/listinfo/python-list
There is now a list to help put together such a group:
http://groups.google.com/group/python-porto
Regards,
Pedro Lima
PS. please forward this message to people you think that could be
interested.
--
http://mail.python.org/mailman/listinfo/python-list
Java way... if you don't want to do it,
put both classes in the same file.
--
Pedro Werneck
--
http://mail.python.org/mailman/listinfo/python-list
with a different behavior. It's better for you to override
__contains__() too.
--
Pedro Werneck
--
http://mail.python.org/mailman/listinfo/python-list
tom _init method for
each one of them.
You can use the subclass __new__, but that's definitely 'unpythonic'.
--
Pedro Werneck
--
http://mail.python.org/mailman/listinfo/python-list
easonable thing to do, exactly for
what you mentioned on your code... someone could easily break a lot of
stuff doing it the wrong way, instead if not using __dict__.
I mailed the list because someone else thought it might be a bug and I
was in doubt... now it's clear it was the right thing to do.
Regards,
--
Pedro Werneck
--
http://mail.python.org/mailman/listinfo/python-list
;>> class C(object):
... __metaclass__ = M
...
>>> C.y = 'bar'
>>> C.x
'foo'
>>> C.y
'bar'
>>> o = C()
>>> o.x
...
AttributeError: 'C' object has no attribute 'x'
>>> o.y
'bar'
>>>
So... both 'x' and 'y' are class attributes, but 'x' is a virtual
attribute implemented with M.__getattr__. From the instance I have
access to 'y' but not to 'x'.
Regards,
--
Pedro Werneck
--
http://mail.python.org/mailman/listinfo/python-list
>>> x is y
True
But __init__ will be called once for each time you call A, even if it's
always the same instance returned. If this is a problem, you'll need
another method to use for initialization and call it only once.
--
Pedro Werneck
--
http://mail.python.org/mailman/listinfo/python-list
oid some problems with method and descriptors creation,
since someone using metaclasses and custom __getattribute__ at the same
time is asking for trouble, but... I googled for it and tried to find
something on the list but, nothing. From the source it seems like a
generic wrapper is used. What's the real case here ?
Regards,
--
Pedro Werneck
--
http://mail.python.org/mailman/listinfo/python-list
.
Thank you very much in advance. :-D
Pedro.
//...
// C++ code..
//...
#include
#define OPTION1
//#undef OPTION1
struct Base
{
virtual ~Base
[EMAIL PROTECTED] wrote:
> My version is similar to Just one:
>
> from random import shuffle
>
> def scramble_text(text):
> """Return the words in input text string scrambled
> except for the first and last letter."""
> def scramble_word(word):
Nice. You can have functions inside funct
[EMAIL PROTECTED] wrote:
> Just:
>> [previous post, hand inserted]
>>> def scramble_text(text):
>>> def scramble_word(word):
>>
>> Btw. I find the use of a nested function here completely bogus: you
>> don't need the surrounding scope.
>
> I don't agree, nested functions are useful to better st
Just wrote:
> In article <[EMAIL PROTECTED]>,
> Pedro Graca <[EMAIL PROTECTED]> wrote:
>
[snip: very un-pythonic code]
>
> def curious(text):
> """ Return the words in input text scrambled except for the
> first and last le
I'm sure this isn't very pythonic; comments and advice appreciated
def curious(text):
""" Return the words in input text scrambled except for the first and
last letter. """
new_text = ""
word = ""
for ch in text:
if ch in "abcdefghijklmnopqrstuvwxy
metaclass__ = LazyInit
... def __init__(self, x, y):
... print "init was called", x, y
... self.x = x
... self.y = y
...
>>> o = Foo(1, None)
>>> o
<__main__.Foo object at 0x402cc96c>
>>> o.x
init was called 1
;n',
'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
>>> [chr(x) for x in xrange(ord('d'), ord('p') + 1)]
['d', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p']
>>> [chr(x) for x in xrange(ord('A'), ord('Z') + 1)]
['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
etc...
--
Pedro Werneck
--
http://mail.python.org/mailman/listinfo/python-list
is really just a documentation problem.
Check the comments on the bug report here:
http://sourceforge.net/tracker/index.php?func=detail&aid=1294232&group_id=5470&atid=105470
--
Pedro Werneck
--
http://mail.python.org/mailman/listinfo/python-list
taclass I set explicitly.
I will change the bug report and add some of the suggested
documentation.
Thanks
--
Pedro Werneck
--
http://mail.python.org/mailman/listinfo/python-list
and "explicit is better
than implicit". If it's just a documentation issue, the first rule in
search order is much more complex than documented. If I am completely
wrong in all of this, maybe it's better stop wasting our time. :)
Thank you
--
Pedro Werneck
http://sourceforge.net/tracker/index.php?func=detail&aid=1294232&group_id=5470&atid=105470
--
http://mail.python.org/mailman/listinfo/python-list
must be a
(non-strict) subclass of the metaclasses of all its bases
>>> class C(B): __metaclass__ = M_A
...
>>> C.__metaclass__
>>> C.__class__
> You are free to post the bug report and look at the opinions of the
> developers.
I posted a few hours ago.
Thank you.
--
Pedro Werneck
--
http://mail.python.org/mailman/listinfo/python-list
.net/tracker/index.php?func=detail&aid=1294232&group_id=5470&atid=105470
--
Pedro Werneck
--
http://mail.python.org/mailman/listinfo/python-list
class conflict error. But with M_A, the error is ignored, probably
because PyType_IsSubtype is returning 1 for M_A being a subtype of M_B
and the winner and metatype are exchanged later, so we end with M_B as
C's real type.
> I suggest you to file a documentation bug. Unfortunately the basic
> d
7:47)
[GCC 3.3.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> class M_A(type): pass
...
>>> class A: __metaclass__ = M_A
...
>>> class B(A): __metaclass__ = type
...
>>> B.__class__
>>> B.__metaclass__
Regards,
--
Pedro Werneck
--
http://mail.python.org/mailman/listinfo/python-list
_class__ to M_B!
>>> class C(B): __metaclass__ = type
...
>>> C.__metaclass__
>>> C.__class__
>>> type(C)
Since the explicit __metaclass__ attribute has priority over parent
classes, a case like this is an error and should raise an exception like
the metaclass conflict, right ?
Regards,
--
Pedro Werneck
--
http://mail.python.org/mailman/listinfo/python-list
aryfunc)Pin_and, /*nb_and*/
(binaryfunc)Pin_xor, /*nb_xor*/
(binaryfunc)Pin_or, /*nb_or*/
0, /*nb_coerce*/
...
};
Thanks for any help...
--
Pedro Werneck
--
http://mail.python.org/mailman/listinfo/python-list
Hi
The problem is that '\x00' is a escape sequence...
Try something like this:
>>> x = '\x00'
>>> int(repr(x)[3:-1], 16)
0
>>> x = '\x15'
>>> int(repr(x)[3:-1], 16)
21
>>>
On Sat, 05 Feb 2005 06:51:32 -0700
Earl Eiland <[EMAIL PROTECTED]> wrote:
> I'm trying to process the IP packet lengt
What about this ?
#
if sys.version_info >= (2,4):
def sorted(iterable, *args, **kwds):
seq = list(iterable)
seq.sort(*args, **kwds)
return seq
#
It worked against the TestSorted in lib/test/test_builtins.py
On Sun, 30 Jan 2005 08:30:17 +0100
"Fredrik Lundh" <[EM
Hi,
If you need direct access to some atribute, use object.__getattribute__.
>>> class DefaultAttr(object):
... def __init__(self, default):
... self.default = default
... def __getattribute__(self, name):
... try:
... value = object.__getattribute__(self, na
Hi,
Up to Python 2.2, type() was just a function to return an object type.
>From 2.2 on, type have this behavior when called with only one argument
and is used to create a new type when called with 3 arguments.
>From http://www.python.org/2.2/descrintro.html :
"The signature of type() requires
On Tue, 25 Jan 2005 13:44:32 +
Martin Franklin <[EMAIL PROTECTED]> wrote:
> > thanks for this info - I had to abandon the createfilehandler() method
> > as it is not supported in windows and the GUI "might" be used there at
> > some time ...
Take a look here:
http://www.pythonbrasil.com.br/m
On Mon, 24 Jan 2005 18:45:46 +0100
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote:
> George Sakkis wrote:
>
> > Why does slicing a tuple returns a new tuple instead of a view of
> > the existing one, given that tuples are immutable ?
>
> really?
Well... seems like this case (slicing the whole tuple
On Mon, 24 Jan 2005 18:45:46 +0100
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote:
> George Sakkis wrote:
>
> > Why does slicing a tuple returns a new tuple instead of a view of
> > the existing one, given that tuples are immutable ?
>
> really?
Well... seems like this case is optimized to return th
A quick example for you:
###
import SocketServer
class EchoRequestHandler(SocketServer.BaseRequestHandler):
def setup(self):
print self.client_address, 'connected!'
self.request.send('hi ' + str(self.client_address) + '\n')
def handle(self):
while 1:
Hi,
Maybe something like this...
from Tkinter import *
import itertools
class Application(Frame):
def __init__(self, master=None):
Frame.__init__(self, master)
self.grid()
self.createWidgets()
def createWidgets(self):
self.stop = Button(self,text='Emerge
can
send it to you in pvt, if you want.
Pedro Werneck
On Fri, 21 Jan 2005 10:27:20 +0100
David <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm getting the following error:
>
>
> Traceback (most recent call last):
> File "..\kk.py", line 37,
88 matches
Mail list logo