On Mon, Oct 4, 2010 at 10:33 PM, Arnaud Delobelle wrote:
> MRAB writes:
>> On 05/10/2010 02:10, Mark Phillips wrote:
>>> I have the following string - "['1', '2']" that I need to convert into a
>>> list of integers - [1,2]. The string can contain from 1 to many
>>> integers. Eg "['1', '7', '4',..
On 05/10/10 00:11, Diez B. Roggisch wrote:
Pascal Polleunus writes:
Hi,
I've problems to install psycopg2 in a virtualenv on Ubuntu 10.04.
My problem is also explained on stackoverflow:
http://stackoverflow.com/questions/3847536/installing-psycopg2-in-virtualenv-ubuntu-10-04-python-2-5
I
On 2010-10-05, Lawrence D'Oliveiro wrote:
> In message <87iq1hz6rc@benfinney.id.au>, Ben Finney wrote:
>> Don't ever use a bare ???except??? unless you know exactly why you're doing
>> so.
> In other news, don???t ever put a loaded gun in your mouth and pull the
> trigger unless you know exa
Hi. Im making a simple database explorer in PyQt. I hope somebody here
might find it usefull :)
http://code.google.com/p/simple-database-explorer/
Simple database explorer for:
- Netezza
- Oracle
- Sqlite
- MySQL
- PostgreSQL
- all the others having ODBC drivers...
--
http://mail.python.or
In message <4ca96440$0$1674$742ec...@news.sonic.net>, John Nagle wrote:
> Yes, "bool" is a subtype of "int" in Python. This was
> because the original design of Python didn't have "bool"
> (a rather strange mistake for a language designed this late)
> and the retrofit had to have some backwa
In message , Antoon
Pardon wrote:
> On Wed, Sep 29, 2010 at 01:38:48PM +0200, Hrvoje Niksic wrote:
>
>> BTW adding "==True" to a boolean value is redundant and can even break
>> for logically true values that don't compare equal to True (such as the
>> number 10 or the string "foo").
>
> But lea
In message <877hi44w53@xemacs.org>, Hrvoje Niksic wrote:
> BTW adding "==True" to a boolean value is redundant and can even break
> for logically true values that don't compare equal to True (such as the
> number 10 or the string "foo").
I wonder if there’s a name for this sort of thing: “boo
In message , Philip
Semanchuk wrote:
> Does Python make any guarantee that int(True) == 1 and int(False) == 0
> will always hold, or are their values an implementation detail?
There has never been a rationally-designed language where this was merely
“an implementation detail”.
--
http://mail.p
In message
, James
Harris wrote:
> On 29 Sep, 18:20, Seebs wrote:
>
>> On 2010-09-29, Tracubik wrote:
>>
>>> button = gtk.Button(("False,", "True,")[fill==True])
>>
>> Oh, what a nasty idiom.
>
> I'm surprised you don't like this construct. I hadn't seen it until I
> read the OP's question ju
In message
, TheOne
wrote:
> I want the source files to have BOM character.
What exactly is the point of a BOM in a UTF-8-encoded file?
--
http://mail.python.org/mailman/listinfo/python-list
In message <87iq1hz6rc@benfinney.id.au>, Ben Finney wrote:
> Don't ever use a bare ‘except’ unless you know exactly why you're doing
> so.
In other news, don’t ever put a loaded gun in your mouth and pull the
trigger unless you know exactly why you’re doing so.
Some people have a problem. T
In message , Edward A. Falk wrote:
> In article ,
> Roy Smith wrote:
>
>>Google for "Big-O notation". Depending on your level of interest,
>>expect to spend anywhere from an hour to the next four years reading
>>what pops out :-)
>
> Yeah, that's my problem with Wikipedia too.
Which part of “
MRAB writes:
> On 05/10/2010 02:10, Mark Phillips wrote:
>> I have the following string - "['1', '2']" that I need to convert into a
>> list of integers - [1,2]. The string can contain from 1 to many
>> integers. Eg "['1', '7', '4',..,'n']" (values are not sequential)
>>
>> What would be the
Hello,
Is there a Python library for interacting with Amazon MWS (https://
sellercentral.amazon.com/gp/mws/index.html)?
I found Ruby, Perl, PHP, C#, and Java versions, but not Python:
http://github.com/dmichael/amazon-mws
http://github.com/frodwith/Amazon-MWS
https://sellercentral.amazon.com/gp/m
Steven D'Aprano writes:
> Why is it misleading? Is there some circumstance in Python where the
> literal 1 could have a false value?
It's misleading as to the intent.
> "while 1" was the accepted idiom for infinite loops in Python for many
> years, before the introduction of bools in (I think
On Tue, 05 Oct 2010 13:57:11 +1100, Ben Finney wrote:
> chad writes:
>
>> while 1:
>
> A minor point: this is more explanatory and less misleading if you write
> it as ‘while True’.
Why is it misleading? Is there some circumstance in Python where the
literal 1 could have a false value?
"whil
On Sep 30, 1:38 pm, Lie Ryan wrote:
> The /most/ correct version of maximum() function is probably one written
> in Haskell as:
>
> maximum :: Integer -> Integer -> Integer
> maximum a b = if a > b then a else b
>
> Integer in Haskell has infinite precision (like python's int, only
> bounded by me
Try to use sys.exit(0)
Maybe you should print out the error in your except block.
2010/10/5, chad :
> Given the following..
>
> #!/usr/bin/python
>
> import urllib2
> import sys
> import time
>
> while 1:
> try:
> con = urllib2.urlopen("http://www.google.com";)
> data = con.re
Hello all,
So, I started learning python just recently. I got inspired
by a project that related to the semantic web. I can see why this would
be a language chosen for the applications that help to build the
semantic web. It is interesting to see that indeed python does have
structures
On 10/4/2010 10:38 PM, chad wrote:
Given the following..
#!/usr/bin/python
import urllib2
import sys
import time
while 1:
try:
con = urllib2.urlopen("http://www.google.com";)
data = con.read()
print "connected"
#The loop doesn't exit if I use sys.exit(1
chad writes:
> while 1:
A minor point: this is more explanatory and less misleading if you write
it as ‘while True’.
> try:
> con = urllib2.urlopen("http://www.google.com";)
> data = con.read()
> print "connected"
> #The loop doesn't exit if I use sys.exit(1)
your bare except is catching the SystemExit raised by sys.exit(1)
--
http://mail.python.org/mailman/listinfo/python-list
Given the following..
#!/usr/bin/python
import urllib2
import sys
import time
while 1:
try:
con = urllib2.urlopen("http://www.google.com";)
data = con.read()
print "connected"
#The loop doesn't exit if I use sys.exit(1)
break
except:
time.s
On 05/10/2010 02:10, Mark Phillips wrote:
I have the following string - "['1', '2']" that I need to convert into a
list of integers - [1,2]. The string can contain from 1 to many
integers. Eg "['1', '7', '4',..,'n']" (values are not sequential)
What would be the best way to do this? I don't
On 2010-10-05, Lawrence D'Oliveiro wrote:
> In message , Anssi Saari wrote:
>> Because for the common case it's simple and easy and one might learn
>> something interesting?
> You consider it ???interesting??? to reinvent stuff that others have already
> done?
That isn't what the other poster s
On Tue, 05 Oct 2010 11:25:58 +1000, James Mills wrote:
> On Tue, Oct 5, 2010 at 11:10 AM, Mark Phillips
> wrote:
>> I have the following string - "['1', '2']" that I need to convert into
>> a list of integers - [1,2]. The string can contain from 1 to many
>> integers. Eg "['1', '7', '4',..,'n
On Sep 30, 10:07 am, kj wrote:
> This is a recurrent situation: I want to initialize a whole bunch
> of local variables in a uniform way, but after initialization, I
> need to do different things with the various variables.
>
I'm curious what a typical use case for this is. It seems funny to
hav
On Mon, 04 Oct 2010 09:51:18 -0700, Dennis Lee Bieber wrote:
> On 04 Oct 2010 05:08:20 GMT, Steven D'Aprano
> declaimed the following in
> gmane.comp.python.general:
>
>
>> from luncheon_meats import Ham
>>
>> class Spam(Ham):
>> def __init__(self):
>> self.__x = "yummy"
>>
>>
>>
On Mon, Oct 4, 2010 at 6:25 PM, James Mills
wrote:
> On Tue, Oct 5, 2010 at 11:10 AM, Mark Phillips
> wrote:
>> I have the following string - "['1', '2']" that I need to convert into a
>> list of integers - [1,2]. The string can contain from 1 to many integers. Eg
>> "['1', '7', '4',..,'n']"
On Mon, Oct 4, 2010 at 6:10 PM, Mark Phillips
wrote:
> I have the following string - "['1', '2']" that I need to convert into a
> list of integers - [1,2]. The string can contain from 1 to many integers. Eg
> "['1', '7', '4',..,'n']" (values are not sequential)
>
> What would be the best way t
On Tue, Oct 5, 2010 at 11:10 AM, Mark Phillips
wrote:
> I have the following string - "['1', '2']" that I need to convert into a
> list of integers - [1,2]. The string can contain from 1 to many integers. Eg
> "['1', '7', '4',..,'n']" (values are not sequential)
>
> What would be the best way
I have the following string - "['1', '2']" that I need to convert into a
list of integers - [1,2]. The string can contain from 1 to many integers. Eg
"['1', '7', '4',..,'n']" (values are not sequential)
What would be the best way to do this? I don't want to use eval, as the
string is coming fr
On Oct 4, 9:26 pm, de...@web.de (Diez B. Roggisch) wrote:
> TheOne writes:
> > Hi.
>
> > I installed eclipse/pydev today.
> > I created a pydev project and added python source files with utf-8
> > BOM.
> > Eclipse/Pydev reports lexical error :
> > Lexical error at line 1, column 1. Encountered:
PyCon 2011 will be held March 9th through the 17th, 2011 in Atlanta,
Georgia. (Home of some of the best southern food you can possibly find on
Earth!) The PyCon conference days will be March 11-13, preceded by two
tutorial days (March 9-10), and followed by four days of development sprints
(March 1
In article ,
Roy Smith wrote:
>In article ,
> Tobiah wrote:
>
>Google for "Big-O notation". Depending on your level of interest,
>expect to spend anywhere from an hour to the next four years reading
>what pops out :-)
Yeah, that's my problem with Wikipedia too. Plus, they like to just
roll
In message , MRAB
wrote:
> An alternative is to create a namespace in an instance of a class and
> then add attributes to it:
>
> class Namespace(object):
> pass
>
> n = Namespace()
> for v in ('spam', 'ham', 'eggs'):
> setattr(n, v, init(v))
>
> foo(n.spam)
> bar(n.ham)
> baz(n.eggs
In article ,
Tobiah wrote:
> Don't do it that way, it will result in O(n**2)!
> [...]
> I want to google this, but I'm not sure what
> keywords to use. Is there a wikipedia article about this
> subject? I imagine that it has a concise name.
Google for "Big-O notation". Depending on your leve
In message , Anssi Saari wrote:
> Lawrence D'Oliveiro writes:
>
>> The Linux kernel includes built-in support for something close to two
>> dozen different partition formats, from the common ones like MS-DOS,
>> Solaris, SGI, Ultrix, EFI and BSD on down. Why reinvent parts of that
>> when you ca
In message
, Dun
Peal wrote:
> That's what I'm doing right now, but since this is a mission-critical
> process, it would be nice to have a more reliable exception detection
> and handling mechanism.
You can already check the exit status from the subprocess. What more do you
need?
> For instanc
On Oct 4, 3:09 pm, Gregory Ewing wrote:
> Carl Banks wrote:
> > Numpy uses + for elementwise addition, and a function
> > called concatenate for concatenation. If Python lists used a separate
> > concatenation operator, then Numpy arrays could use that for
> > concatenation.
>
> Actually it could
On 04Oct2010 09:02, Adam Tauno Williams wrote:
| I'm using a call to the resource module's getrusage method. On openSUSE
| this works, on CentOS [python26-2.6.5-3.el5] it 'works' but just returns
| zeros for the memory utilization values.
|
| resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
|
Hello guys,
I have been looking throughout the web for some PyQt Image Viewer :
http://nullege.com/codes/show/src%40pyformex-0.8.2%40pyformex%40gui%40imageViewer.py/78/PyQt4.QtGui.QImage#
Unfortunately, everytime I input any kind of image type
(.jpeg, .tga, .png, whatver) It doesn´t show me the
Kruptein writes:
> Hey, I released the 0.2.1 version of my text-editor written for linux
> in python using the wxPython toolkit.
>
> I would like to know whether it is good/bad and what could be changed/
> added
>
> this version added
> -syntax-highlighting for 78 languages
> -Tab completion in
Pascal Polleunus writes:
> Hi,
>
> I've problems to install psycopg2 in a virtualenv on Ubuntu 10.04.
>
>
> My problem is also explained on stackoverflow:
> http://stackoverflow.com/questions/3847536/installing-psycopg2-in-virtualenv-ubuntu-10-04-python-2-5
>
>
> I tried different things explaine
Carl Banks wrote:
Numpy uses + for elementwise addition, and a function
called concatenate for concatenation. If Python lists used a separate
concatenation operator, then Numpy arrays could use that for
concatenation.
Actually it couldn't, except for the special case of
concatenating along the
On Oct 4, 4:04 pm, Lawrence D'Oliveiro wrote:
> Why not just call Git itself?
That's what I'm doing right now, but since this is a mission-critical
process, it would be nice to have a more reliable exception detection
and handling mechanism. With my straight calling-out-to-git
implementation, the
Hi,
I've problems to install psycopg2 in a virtualenv on Ubuntu 10.04.
My problem is also explained on stackoverflow:
http://stackoverflow.com/questions/3847536/installing-psycopg2-in-virtualenv-ubuntu-10-04-python-2-5
I tried different things explained there:
http://www.saltycrane.com/blog/
On Mon, 04 Oct 2010 23:30:58 +0200
"Jonas H." wrote:
>
> > [...] here's a minimal, but __complete__, module that defines a new type:
> >
> > [...]
> > static PyTypeObject noddy_NoddyType = {
> > [...]
> > 0, /*tp_dealloc*/
> > [...]
> > };
>
> So I thought "co
On 10/04/2010 10:46 AM, Jonas H. wrote:
On 10/03/2010 11:52 PM, Antoine Pitrou wrote:
You probably have a problem in your tp_dealloc implementation.
`tp_dealloc` is NULL...
Alright, `tp_dealloc` must not be NULL because it's called by
`_Py_Dealloc`. The C-API tutorial is quite confusing he
In message , Seebs wrote:
> On 2010-10-02, Sandy wrote:
>
>> I want to find how much free memory (RAM) is available in my system
>> using python.
>
> The question is essentially incoherent on modern systems.
And then there’s the fact that, on most Linux systems, by default you never
get a fail
In message <4ca94af8$0$1637$742ec...@news.sonic.net>, John Nagle wrote:
> On 10/3/2010 5:40 PM, Lawrence D'Oliveiro wrote:
>> In message<4ca8c9b6$0$1598$742ec...@news.sonic.net>, John Nagle wrote:
>>
>>> (Personally, I like MySQL, but I fear Oracle will mess it up.)
>>
>> Doesn’t matter whet
This is the code what i use to save the file.
tmpData = str(rawData)[1:].strip("' '")
tmp = tmpData.split('\\r')
for piece in tmp:
for slice in piece.split('\n'):
if 'Content-Disposition' in slice:
filename = slice.split(';')[2].split('=')[1]
h = open('home/hidura/'+filename.strip('" "'), 'wb')
el
On Oct 4, 9:14 am, Ethan Furman wrote:
> Antoon Pardon wrote:
> > Suppose you write your class so that '+' will provide addition and
> > you provide a method concat to concatenate. Now no matter how usefull
> > the sequence library would be for you, you can't use it. You will
> > have to rewrite t
On 10/2/2010 8:36 AM, Carl Banks wrote:
On Oct 1, 9:38 pm, Steven D'Aprano wrote:
If so, then we haven't gained anything, and the only thing that would
satisfy such people would be for every function name and operator to be
unique -- something which is impossible in practice, even if it were
de
RG writes:
> There are only two possibilities: either you have a finite-state
> machine, or you have a Turning machine. (Well, OK, you could have a
> pushdown automaton, but there are no programming languages that model a
> PDA. Well, OK, there's Forth, but AFAIK there are no static type
>
On 2010-10-04, MRAB wrote:
> On 04/10/2010 19:38, Tobiah wrote:
>> It gets used here frequently, but not
>> having majored in programming, I'm not
>> familiar with it. One might say:
>>
>> Don't do it that way, it will result in O(n**2)!
>>
>> Or something like that. I read this to mean
>> that
> On Tue, Oct 5, 2010 at 12:08 AM, Tobiah wrote:
>> It gets used here frequently, but not
>> having majored in programming, I'm not
>> familiar with it. One might say:
>>
>> Don't do it that way, it will result in O(n**2)!
>>
>> Or something like that. I read this to mean
>> that the execution t
Or the complexity of an algorithm.
2010/10/4 MRAB
> On 04/10/2010 19:38, Tobiah wrote:
>
>> It gets used here frequently, but not
>> having majored in programming, I'm not
>> familiar with it. One might say:
>>
>> Don't do it that way, it will result in O(n**2)!
>>
>> Or something like that. I
Here you are:
http://en.wikipedia.org/wiki/Big_O_notation
Best regards,
Matteo
On Mon, Oct 4, 2010 at 8:38 PM, Tobiah wrote:
> It gets used here frequently, but not
> having majored in programming, I'm not
> familiar with it. One might say:
>
> Don't do it that way, it will result in O(n**2)!
this might help:
http://en.wikipedia.org/wiki/Analysis_of_algorithms
On Tue, Oct 5, 2010 at 12:08 AM, Tobiah wrote:
> It gets used here frequently, but not
> having majored in programming, I'm not
> familiar with it. One might say:
>
> Don't do it that way, it will result in O(n**2)!
>
> Or so
On 04/10/2010 19:38, Tobiah wrote:
It gets used here frequently, but not
having majored in programming, I'm not
familiar with it. One might say:
Don't do it that way, it will result in O(n**2)!
Or something like that. I read this to mean
that the execution time varies with the square
of the n
On Oct 4, 12:38 pm, Tobiah wrote:
> It gets used here frequently, but not
> having majored in programming, I'm not
> familiar with it. One might say:
>
> Don't do it that way, it will result in O(n**2)!
>
> Or something like that. I read this to mean
> that the execution time varies with the squ
It gets used here frequently, but not
having majored in programming, I'm not
familiar with it. One might say:
Don't do it that way, it will result in O(n**2)!
Or something like that. I read this to mean
that the execution time varies with the square
of the number of iterations, or items being
>
> Personally, I think that subclassing is cleaner, but if you must monkeypatch,
> then you should monkeypatch the multiprocessing.forking._python_exe variable,
> not sys.exec_prefix.
>
> --
> Robert Kern
thanks, good point.
--
http://mail.python.org/mailman/listinfo/python-list
On 10/4/10 12:43 PM, Scott Pigman wrote:
On Oct 4, 1:41 pm, Scott Pigman wrote:
_python.exe variable is built from sys.exec_prefix. So, I think that
sorry, _python_exe.
Personally, I think that subclassing is cleaner, but if you must monkeypatch,
then you should monkeypatch the multiproc
On Oct 4, 1:41 pm, Scott Pigman wrote:
> _python.exe variable is built from sys.exec_prefix. So, I think that
sorry, _python_exe.
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 4, 1:34 pm, Robert Kern wrote:
> My previous statement notwithstanding, there is a way to hack this. The
> windows-specific implementation of the class multiprocessing.forking.Popen
> uses
> a global variable, _python_exe, to determine the executable to use. Instead,
> you
What I've bee
On 10/4/10 11:39 AM, Scott Pigman wrote:
I believe that the solution is to have both win32 and x64 versions of
python installed, and then execute the win32 code inside of a new
process which uses the win32 version of Python. I'm already using
multiprocessing to run that code inside a new proces
On 10/4/10 11:39 AM, Scott Pigman wrote:
I want to use the 64 bit version of python but run some code inside a
spawned process that uses the 32 bit version. Is there an official
way to do this, or can anybody make a recommendation about the
cleanest way to do this? If someone has a better soluti
kj writes:
> I want to implement a "class of classes", so that, instead of the
> usual:
>
> spam = MyClass(eggs)
>
> ...I can write
>
> spam = MyClass(ham)(eggs)
>
> ...where ham is a parameter that will end up as the value of a class
> variable of the class returned by MyClass(ham).
>
> In other
I want to use the 64 bit version of python but run some code inside a
spawned process that uses the 32 bit version. Is there an official
way to do this, or can anybody make a recommendation about the
cleanest way to do this? If someone has a better solution to the
problem I describe below, I'd app
Antoon Pardon wrote:
Suppose you write your class so that '+' will provide addition and
you provide a method concat to concatenate. Now no matter how usefull
the sequence library would be for you, you can't use it. You will
have to rewrite those function you need, in terms of a concat method
inst
在 2010-10-04一的 08:00 -0700,Richard Thomas写道:
> > >>> L=[1,2,3,4]
> > >>> L[3:1]
> > []
> > >>> print L
> > [1, 2, 3, 4]
> > >>> L[3:1]=['?']
> Chard.
thx for all,I know it ^^
thx
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 4 Oct 2010 15:59:51 + (UTC) kj wrote:
> I want to implement a "class of classes", so that, instead of the
> usual:
>
> spam = MyClass(eggs)
>
> ...I can write
>
> spam = MyClass(ham)(eggs)
Use a factory function:
def MyClass(param):
class TemplateClass:
# Do stuff wit
I want to implement a "class of classes", so that, instead of the
usual:
spam = MyClass(eggs)
...I can write
spam = MyClass(ham)(eggs)
...where ham is a parameter that will end up as the value of a class
variable of the class returned by MyClass(ham).
In other words, MyClass is a metaclass:
Hi folks,
I'm writing a Python program to operate on Git repositories.
The program works at the user level of abstraction: i.e. it needs to
do everything that an end user can do with Git.
I'm talking about the high-level commands like git-clone, git-branch,
git-fetch, git-merge, git-rebase, git-
sd44 wrote:
> In
> part III
> how does Python handle it if you try to extract a sequence in reverse,
> with the lower bound greater than the higher bound (e.g., L[3:1])? Hint:
> try
> assigning to this slice (L[3:1]=['?']), and see where the value is put.
>
>
L=[1,2,3,4]
>
L[3:1]
> [
On 10/04/10 09:33, Anssi Saari wrote:
But can you really get all that for free, in python? in other words,
is there a python API for all that? The stuff in /proc/partitions
seems rather limited to me, although I have only vanilla partitions on
my computers.
A similar question regarding reading
On Oct 4, 3:26 pm, sd44 wrote:
> In
> part III
> how does Python handle it if you try to extract a sequence in reverse,
> with the lower bound greater than the higher bound (e.g., L[3:1])? Hint:
> try
> assigning to this slice (L[3:1]=['?']), and see where the value is put.
>
> >>> L=[1,2,3,4]
>
On Sat, Oct 02, 2010 at 05:03:17AM +, Steven D'Aprano wrote:
> On Fri, 01 Oct 2010 14:56:52 +0200, Antoon Pardon wrote:
>
> > Think about the following possibility.
> >
> > Someone provides you with a library of functions that act on sequences.
> > They rely on the fact that '+' concatenates.
Lawrence D'Oliveiro writes:
> The Linux kernel includes built-in support for something close to two dozen
> different partition formats, from the common ones like MS-DOS, Solaris, SGI,
> Ultrix, EFI and BSD on down. Why reinvent parts of that when you can get it
> all for free?
Because for th
In
part III
how does Python handle it if you try to extract a sequence in reverse,
with the lower bound greater than the higher bound (e.g., L[3:1])? Hint:
try
assigning to this slice (L[3:1]=['?']), and see where the value is put.
>>> L=[1,2,3,4]
>>> L[3:1]
[]
>>> print L
[1, 2, 3, 4]
>>> L[3:
TheOne writes:
> Hi.
>
> I installed eclipse/pydev today.
> I created a pydev project and added python source files with utf-8
> BOM.
> Eclipse/Pydev reports lexical error :
> Lexical error at line 1, column 1. Encountered: "\ufeff" (65279),
> after : ""
>
> I want the source files to have BOM
On Fri, Oct 01, 2010 at 09:44:34AM -0700, Emile van Sebille wrote:
> On 10/1/2010 5:56 AM Antoon Pardon said...
>
> >Someone provides you with a library of functions that act on sequences.
> >They rely on the fact that '+' concatenates.
> >
> >Someone else provides you with a library of functions
I'm using a call to the resource module's getrusage method. On openSUSE
this works, on CentOS [python26-2.6.5-3.el5] it 'works' but just returns
zeros for the memory utilization values.
resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
openSUSE: returns 5512
CentOS: returns 0
Anyone know wha
tekion writes:
> On Oct 3, 2:09 pm, de...@web.de (Diez B. Roggisch) wrote:
>> tekion writes:
>> > On Oct 2, 5:32 am, de...@web.de (Diez B. Roggisch) wrote:
>> >> tekion writes:
>> >> > All,
>> >> > I have the following xml tag:
>> >> >
>> >> >
>> >> > httpRequest
>> >> > HTTP://cm
I have a socks5 server in my home.When I was outside, i want to
connect into the home of the socks5 server. and then I pass out all
Internet traffic away from home.
I don't know how to start.What should I look at books or documents?
--
http://mail.python.org/mailman/listinfo/python-list
TerryP writes:
> On Oct 4, 4:12 am, Kushal Kumaran
> wrote:
>> Is virtualenv what you need?
>>
>> http://pypi.python.org/pypi/virtualenv
>>
>> >
>>
>> --
>> regards,
>> kushal
>
>
> Not quite. It basically amounts to a UNIX version of xcopy'ing an
> existing Python installation.
>
> ... insta
On Sat, Oct 02, 2010 at 04:38:16AM +, Steven D'Aprano wrote:
> On Fri, 01 Oct 2010 10:24:11 -0700, Carl Banks wrote:
>
> > On Sep 26, 8:20 am, Grant Edwards wrote:
> [..]
> >> So now I suppose "+" for string concatenation is a bad thing.
> >
> > Yes. It's not the end of the world, but a sep
Dsrt Egle wrote:
> Hi,
>
> I am trying to use Pylint with Emacs on Windows XP. My Emacs version
> is EmacsW32 23.1, pylint is 0.21.3 with Python 2.5. After easy_install
> pylint, I added the code block below to Emacs init file, copied form
> Emacs Wiki.
there are some files provided by pylint fo
On 10/03/2010 11:52 PM, Antoine Pitrou wrote:
You probably have a problem in your tp_dealloc implementation.
`tp_dealloc` is NULL...
--
http://mail.python.org/mailman/listinfo/python-list
On 29 Sep, 18:20, Seebs wrote:
> On 2010-09-29, Tracubik wrote:
>
> > Hi all,
> > I'm studying PyGTK tutorial and i've found this strange form:
>
> > button = gtk.Button(("False,", "True,")[fill==True])
>
> > the label of button is True if fill==True, is False otherwise.
>
> > i have googled for
Hi,
Need help in formatting xml document using xml.doc.minidom
I have a raw xml output, I need to format the xml output and write it to a
file.
rawdata="""Santosh 29
Bangalore """
I would appreciate your help.
Thanks,
Santosh
--
http://mail.python.org/mailman/listinfo/python-list
Alexandre Fayolle wrote:
> Dsrt Egle wrote:
>
>> Hi,
>>
>> I am trying to use Pylint with Emacs on Windows XP. My Emacs version
>> is EmacsW32 23.1, pylint is 0.21.3 with Python 2.5. After easy_install
>> pylint, I added the code block below to Emacs init file, copied form
>> Emacs Wiki.
>
> th
On Oct 4, 4:12 am, Kushal Kumaran
wrote:
> Is virtualenv what you need?
>
> http://pypi.python.org/pypi/virtualenv
>
> >
>
> --
> regards,
> kushal
Not quite. It basically amounts to a UNIX version of xcopy'ing an
existing Python installation.
... install Python X.Y by any means
python vir
On 10/1/2010 10:19 PM, Paul Rubin wrote:
Steven D'Aprano writes:
Incorrect. bools *are* ints in Python, beyond any doubt.
Python 2.6.2 (r262:71600, Jun 4 2010, 18:28:58)
>>> type(3)==type(True)
False
Yes, "bool" is a subtype of "int" in Python. This was
because the ori
Hi.
I installed eclipse/pydev today.
I created a pydev project and added python source files with utf-8
BOM.
Eclipse/Pydev reports lexical error :
Lexical error at line 1, column 1. Encountered: "\ufeff" (65279),
after : ""
I want the source files to have BOM character. How could I shut off
thi
use minidom to parse from string and then write it to a file
from xml.dom.minidom import parse, parseString
parseString(rawdata)
On Mon, Oct 4, 2010 at 11:33 AM, Santosh Mohan wrote:
> Hi,
>
> Need help in formatting xml document using xml.doc.minidom
>
>
> I have a raw xml output, I need to
On Sun, 03 Oct 2010 21:32:25 -0700, Dennis Lee Bieber wrote:
> Well... then use the double __ prefix so your instance variables
> have a class specific name... That IS what the __ are designed to do --
> ensure that the name, as used /in/ that class itself is unique, and not
> referencing so
99 matches
Mail list logo