> So why is it that in the first case I got UnicodeEncodeError: 'ascii'
> codec can't encode? Seems as if, within Idle, a utf-8 codec is being
> selected automagically... why should that be so there and not in the
> first case?
I'm a bit confused on what you did when the error appears if you t
Michael >>
>> Does Python 2.4 support it?
>
> Not precisely, but you can *usually* get away with:
>
> a and b or c
This is really bad advice, as long as you don't explain why it "usually"
works (and often enough not). This for example won't work:
Gregor Stich wrote:
> Dear all,
>
> I hope my question is here in the right place...
> What I want to achieve is a communication between Java and Python. We
> have a pretty strong framework of existing python scripts and modules.
> Now I want to use jython in order to faciliate the communication
[EMAIL PROTECTED] schrieb:
> Hi all. I'm learning python these days. I'm going to use this thread
> to post, from time to time, my annoyances with python. I hope someone
> will clarify things to me where I have misunderstood them.
>
> Annoyances:
>
> 1. Underscores! What's the deal with that? Esp
TimC schrieb:
> Donald 'Paddy' McCarthy <[EMAIL PROTECTED]> wrote
>
>> Could you split the program into one handling the outer loop and
>> calling another program, with data transfer, to handle the inner
>> loops?
>>
>> - Paddy.
>
> I'm afraid this isn't possible, because the python macro is call
ChrisW schrieb:
> Hi,
>
> I need a relatively technical answer to the above question - I've
> looked through the Jython docs / FAQs and Googled it but to no
> avail... if anyone can let me know I'd be most grateful,
The jython mailing list is the better place to ask this.
However, actually this
Pradnyesh Sawant schrieb:
> Hello,
> I have a pyqt4 code in which i'm trying the signal/slot mechanism. The
> (stripped) code is as follows:
>
> class D(QtCore.QThread):
>def __init__(self):
>QtCore.QThread.__init__(self)
>tpl = ("Primary", "priSec")
>print "tpl:", tpl
Florian Demmer schrieb:
> Hi!
>
> I have a number of ftp uploads running in parallel using
> ftplib.storbinary and threading and in case one of them fails I need
> to interrupt all the others (but not exit the program completely)...
> do you guys have an idea how i could implement the interruption
Patch / Bug Summary
___
Patches : 356 open ( -1) / 3756 closed (+11) / 4112 total (+10)
Bugs: 968 open (+10) / 6673 closed (+16) / 7641 total (+26)
RFE : 254 open ( +3) / 282 closed ( +2) / 536 total ( +5)
New / Reopened Patches
__
fixes bug
人言落日是天涯,望极天涯不见家 schrieb:
> On Apr 29, 7:37 pm, "Daniel Nogradi" <[EMAIL PROTECTED]> wrote:
>>> I made a C/S network program, the client receive the zip file from the
>>> server, and read the data into a variable. how could I process the
>>> zipfile directly without saving it into file.
>>> In the d
eated some
> widgets. It could be show in the window. Does it indicated the life
> time of varable m,n,j is base on the object range?
Python has no variables. It has objects, which can be bound to names. Each
binding to a name will increase a reference counter. Each unbinding will
decrease
> I understand what you are saying, and at the same time don't
> understand why it doesn't work. Isn't "everything an object" in
> python? And if something is an object does it not implies it's an
> instance of some class?
It means that, but it seems that you can't subclass everything, especially
tooru honda schrieb:
> Hi,
>
> I am a newbie to mac and python.
>
> Is there an easy way to play wav or mp3 sound file ? I used to use
> winsound module before switching to mac, but that only works for windows.
pygame might help.
Diez
--
http://mail.python.org/mailman/listinfo/python-list
loial schrieb:
> I am running on an AIX system with time zone set to BST
>
> If I run the following, I get the GMT time, i.e an hour less than the
> correct time.
>
> How can I get the correct time
>
> now = time()
>
> timeProcessed = strftime("%H:%M",gmtime(now))
>
localtime?
[EMAIL PROTECTED] schrieb:
> I know it's a long shot but does anyone have any pointers to generic
> algorithms - or, even better, Python code - for comparing images and
> computing a value for the "difference" between them?
>
> What I want to do is to compare two bitmap images (taken from a
> webc
loial schrieb:
> OK, I have it working with dictionaries.
>
> However I have another scenerio :
>
> I am reading a file containing records like the following :
>
>
>
>
> ..
> ..
>
>
> I need to substitute MYVARIABLE with the current value of MYVARIABLE
> in my python script and write the fi
Efrat Regev schrieb:
> [EMAIL PROTECTED] wrote:
>> On May 1, 2:23 pm, Efrat Regev <[EMAIL PROTECTED]> wrote:
>>
>>> So my question is if there's a way to "grab" the output as it's being
>>> generated. It doesn't matter if the solution is blocking (as opposed to
>>> callback based), since threads ca
[EMAIL PROTECTED] schrieb:
> Hi,
> a python newbe needs some help,
>
> I read the python doc at
> http://docs.python.org/lib/module-curses.ascii.html
>
> I tried
> Import curses.asciicurses.ascii
> Print ascii('a')
>
> I get an error saying module curses.ascii8 does not exsist.
>
> How can I ge
[EMAIL PROTECTED] schrieb:
> Hello
> I don't have permission to install new application on the PC I'm
> using, I need a zipped version of python that I can copy on my
> external drive. Where can I get a zip version?
http://www.voidspace.org.uk/python/movpy/
Diez
--
http://mail.python.org/mailma
> You probably need to setDaemon (True) on your threads
> after you've created them and before they run. That
> tells the OS: don't bother waiting for these ones to
> finish if the program exits. (At least I think that's
> what it does; I don't use threads all that much)
Actually all it does is to
gt; One particular use for this would be to implement "lazy evaluation".
> For example it would allow us to get rid of all the temporary arrays
> produced by NumPy.
>
> For example, consider the expression:
>
> y = a * b + c * d
>
> If this expression is evaluated
Patch / Bug Summary
___
Patches : 360 open ( +4) / 3760 closed ( +4) / 4120 total ( +8)
Bugs: 971 open ( +3) / 6683 closed (+10) / 7654 total (+13)
RFE : 257 open ( +3) / 282 closed ( +0) / 539 total ( +3)
New / Reopened Patches
__
test_1686
> Notice that I copied the Twisted terminology, but
> I did not look at Twisted implementation because I did not want to
> use a select (I assume that the GUI mainloops do not use it either).
Why do you assume that? It's a wrong assumption. Yielding a thread/process
until the OS wakes it up becaus
Anand wrote:
> Greetings,
>
> How do I convert programmatically the file names from WIN32 to UNIX
> format?
>
> A code snippet would be of great help.
> We are new to python! :)
unix_name = win_name.replace("\\", "/")
But this of course won't work for anything that starts with a drive letter
f
>
> Well then I wanted to draw graphs and I found that pydot is working
> really nicely.
> BUT I'd like to do this, an interactive program to see ho the
> algorithms works...
> For example in the breath search first, every time the algorithm
> colors a node, the program should redraw the graphs. W
> Ok thank you very much I'll try with that.
> But I have some design doubts, I'd like to keep the algorithm (for
> example bfs) as clean as possible, being independent from the drawing
> methods.
> And how could I make it step through algorithms without having a more
> complicated code? Maybe usin
king kikapu wrote:
> Hi, i am reading the book "Python Cookbook, 2nd edition" and i
> encountered a very handy recipe, the one that is called "Combining
> GUIs and Asynchronous I/O with Threads"
>
> It is talking about retain a main GUI thread, doing async work with
> worker threads and have both
Jorgen Bodde wrote:
> Hi,
>
> I am trying to simplify my code, and want to automate the assigning of
> variables I get back from a set. I was thinking of putting the
> variables I want changed in a list:
>
> L = [self._varA, self._varB ]
>
> self._varA is a variable I want to change when I pass
>> It depends on the toolkit you use. Qt has thread-safe custom events in
>> 3.x, and afaik signal/slots (and thus events) are generally thread-safe
>> in 4.x. So, no problems there.
>>
>> Diez
>
> Aha...So you do not use polling there (in Qt), correct ?
You don't need to, no.
Diez
--
http://m
Within a script on a *nix machine, I use os.chdir then os.popen, and it
appears to me as though the os.chdir had no effect so far as the
os.popen is concerned. Why's that? Here's what I'm doing:
>>> import os
>>> os.path.realpath( os.curdir )
'/home/jlooney'
>>> print os.popen( "echo $PWD" ).rea
ok, nevermind. My coworker pointed out part of what's wrong. Guess
I'll need to do more spelunking in my script to figure out what I'm
messing up.
-JB
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Looney, James B
Sent: Tuesday,
, its value is
> returned; otherwise, y is evaluated and the resulting value is returned."
>
> Based on what is said above, shouldn't my first expression (
> string.find('020914A','.') and len('020914A') > 10) evaluate to
> false b/c m
Alan Isaac wrote:
>
> "Peter Otten" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Alan Isaac wrote:
>> There is nothing wrong with the random module -- you get the same numbers
> on
>> every run. When there is no pyc-file Python uses some RAM to create it
>> and therefore your
I'm using Vim (http://www.vim.org/).
-JB
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of T. Crane
Sent: Wednesday, May 09, 2007 12:07 PM
To: python-list@python.org
Subject: preferred windows text editor?
Right now I'm using Notepad++. What are other peop
[EMAIL PROTECTED] schrieb:
> I have written a program that runs portfolio simulations with
> different parameters and prints the output, but am mystified by the
> behavior of a mutable class variable. A simplified version of the
> program follows - would you kindly help me understand why it behaves
27;t work as it is a tuple of lists, as opposed to a list of tuples.
> Is there an elegant solution to this? Is there a way to merge lists
> into a list of tuples to allow moving through multiple lists, or is
> the for i in range(len(listkeys)): the only solution?
>
> Any suggestions?
Jean-Paul Calderone schrieb:
> On 10 May 2007 05:45:24 -0700, [EMAIL PROTECTED] wrote:
>> Hi,
>>
>> please consider the following code:
>>
>>
>> from __future__ import with_statement
>>
>> class safe_dict(dict):
>>def __init__(self, *args, **kw):
>>self.lock = threading.Lock()
>>
t; in list attributes of others, e.g.:
All your code below shows that you don't create classes, but _instances_
of classes. So - is that what you mean to do? Or do you really want to
create classes?
> class A:
> def __init__(self):
> self.id = 'A1'
>
Patch / Bug Summary
___
Patches : 362 open ( +2) / 3766 closed ( +6) / 4128 total ( +8)
Bugs: 968 open ( -3) / 6692 closed ( +9) / 7660 total ( +6)
RFE : 256 open ( -1) / 286 closed ( +4) / 542 total ( +3)
New / Reopened Patches
__
Fix off-b
The case sensitivity has to do with the OS you're on. So, using glob
from Un*x is case sensitive, but from Windows it isn't.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Stef Mientki
Sent: Monday, May 14, 2007 3:39 PM
To: python-list@python.org
Subje
> with the same hash value.
> That is, you should define __hash__ and one of (__cmp__ or __eq__).
> __neq__ (inequality) isn't required nor used by dict/set implementation.
> (Anyway, Python will transform a!=b into not(a==b), if __neq__ isn't
> defined). Neither <,
Ondrej Baudys wrote:
> Hi,
>
> After trawling through the archives for a simple quote aware split
> implementation (ie string.split-alike that only splits outside of
> matching quote) and coming up short, I implemented a quick and dirty
> function that suits my purposes.
Maybe using the csv m
[EMAIL PROTECTED] wrote:
> Hi,
> I am parsing an xml file ,before that i have replaced a string in
> the original xml file with another and made a new xml file which will
> now be parsed.I am also opening some more files for output.The
> following code shows some i/o commands.
> file_input = r
> - Java (and possibly Jython) or Mono/C# (or possibly IronPython) on the
> server. Requirements are: A strong and fair threading model. This is
> actually what drove me away from Perl and what essentially prevents
> using a normal Python interpreter on the server. I don't know whether
> th
>
> Hmm,
>
> As an experienced developer I'm rather new to Python, so please forgive me
> any non-Pythonic babbling.
> From a language point you're probably right, but from a design point I'd
> like to have methods that are clearly associated with a class as methods
> of that class, even if they
Samuel wrote:
> Hi,
>
> I am trying to get the files from this tutorial to work:
> http://www.grisby.org/presentations/py10code.html
>
> Direct link to the files:
> http://www.grisby.org/presentations/py10code/adder.idl
> http://www.grisby.org/presentations/py10code/adderServer.py
>
> It produc
Samuel wrote:
> Hi,
>
> I am trying to get the files from this tutorial to work:
> http://www.grisby.org/presentations/py10code.html
>
> Direct link to the files:
> http://www.grisby.org/presentations/py10code/adder.idl
> http://www.grisby.org/presentations/py10code/adderServer.py
>
> It produc
Samuel wrote:
> On May 22, 1:54 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>> It indeed does open a connection - because it wants to register with a
>> NameServer.
>
> Ah, I see now how this works. I happen to run Ubuntu here, so I tried
> the foll
Patch / Bug Summary
___
Patches : 364 open ( +2) / 3769 closed ( +3) / 4133 total ( +5)
Bugs: 986 open (+18) / 6701 closed ( +9) / 7687 total (+27)
RFE : 258 open ( +2) / 287 closed ( +1) / 545 total ( +3)
New / Reopened Patches
__
syslog sy
Ramashish Baranwal wrote:
> Hi,
>
> I want to get a module's contents (classes, functions and variables)
> in the order in which they are declared. Using dir(module) therefore
> doesn't work for me as it returns a list in alphabetical order. As an
> example-
>
Siah wrote:
> I think that's because:
No idea what is because of what. Please quote essential parts of the posting
you refer to.
[] is []
> False
() is ()
> True
This is an implementation artifact. The interpreter chose to create only one
instance for the empty tuple for optimization
Wildemar Wildenburger wrote:
> Bruno Desthuilliers wrote:
>> here's an example using a property:
>>
>> class cpu_ports(object):
>> def __init__(self, value=0):
>> self._d = value
>> @apply
>> def value():
>> def fset(self, value):
>> print 'vv'
>>
George Sakkis wrote:
> I'm looking for any existing packages or ideas on how to implement the
> equivalent of a generator (in the Python sense, i.e.
> http://www.python.org/dev/peps/pep-0255/) in a parallel/distributed
> way. As a use case, imagine a function that generates a range of
> primes. I'
Wildemar Wildenburger schrieb:
> Diez B. Roggisch wrote:
>> It is that very apply.
>>
>> And apply takes a function as argument + additional arguments, and
>> executes
>> that function, returning the result of that function-call. It was used
>> before the
&
George Sakkis schrieb:
> On May 23, 2:11 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>
>> George Sakkis wrote:
>>> I'm looking for any existing packages or ideas on how to implement the
>>> equivalent of a generator (in the Python sense, i.
[EMAIL PROTECTED] schrieb:
> Can we have change a unicode string Type object to a Tuple type
> object.. If so how
Why? Are you getting an error that makes you think that's a good idea?
Tuples are basically structs, unicode objects are strings. There is no
canonical way to convert them. Tel
Carl K schrieb:
> I am trying to use this:
> http://python.net/crew/atuining/cx_Oracle/html/cx_Oracle.html
> it is a real module, right?
>
> sudo easy_install cx_Oracle did not easy_install cx_Oracle.
>
> http://www.python.org/pypi/cx_Oracle/4.3.1 doesn't give me any clue.
>
> I got the source f
[EMAIL PROTECTED] schrieb:
> On May 24, 5:11 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] schrieb:
>>
>>> Can we have change a unicode string Type object to a Tuple type
>>> object.. If so how
>> Why? Are you g
[EMAIL PROTECTED] schrieb:
> as i understand there are two ways to write data to a file: using
> f.write("foo") and print >>f, "foo".
> what i want to know is which one is faster (if there is any difference
> in speed) since i'm working with very large files. of course, if there
> is any other way
Stef Mientki schrieb:
> hello,
>
> after 4 months playing around with Python,
> and I still have troubles with egg files.
> Sometimes it works, sometimes it doesn't.
>
> If I google on "python egg", I get lost of links,
> which contains huge pages of information,
> and I'm totally scared off.
>
Karim Ali schrieb:
> Hi,
>
> I am writing a program that will take several days to execute :) and
> would like to append to a log file but be able to open that file at any
> time and see the errors that have occured.
>
> So this is what I am doing:
>
> -
Steve Holden schrieb:
> Diez B. Roggisch wrote:
>> Karim Ali schrieb:
> [...]
>>
>> install cygwin bash, and use
>>
>> tail out.log
>>
> I think Diez meant
>
> tail -f out.log
I did. Thanks.
diez
--
http://mail.python.org/mailman/listinfo/python-list
ai schrieb:
> It assumes that there is a module A which have two global variables X
> and Y. If I run "import A" in the IDLE shell, then I can use A.X and
> A.Y correctly. But if I want to change the module A and then delete
> the variable Y, I find I can use A.Y just the same as before!
> In fact,
pycraze wrote:
> Hi ,
>
> I am currently trying to implement base64 encoding and decoding
> scheme in C . Python has a module , base64 , that will do the
> encoding and decoding with ease . I am aware of OpenSSL having support
> for base64 encoding and decoding , but i will have to now impleme
james_027 wrote:
> hi bruno,
>
> That seems to be hard to read at all, or I am just very new to python?
>
> With that decorator how do I take advantage of it compare when I just
> write a function that could do the same as what the decorator did? I
> could translate the could from above into ...
Gabriel Dragffy schrieb:
> Dear list members
>
> I must admit I am a new user of Python, but it is a language that I
> enjoy using.
>
> For one of my university projects I need to write a program that can
> read several bytes from an ISA port. It has been suggested to me that I
> look at using
Clement schrieb:
> Is it possible to close the socket connection immediately in
> Python.. Because i am getting error even though i close it after
> all the transfer I read from one article it is possible in C
> socket Whether is it possible in Python?
>
Which error? And usually the p
uld possibly be represented like this. 65535 is presumably
> white, but converting this into chunks of 5 gives me a 31, 31, 31, a
> dark shade of grey.
>
> I guess I'm on the wrong track completely?
>
> I'm a bit unsure about how to treat what the guide calls 'UWORD'...
ANDing and SHIFTing are your friends here:
v = 0x0bcd
b = v & 0xf
v >>= 4
g = v & 0xf
v >>= 4
r = v & 0xf
print r, g, b
Diez
--
http://mail.python.org/mailman/listinfo/python-list
> > tuple to a function f so that I make a function call f(1,2,3). In perl
>> > it is a given, but in python, I haven't figured out a way to do it.
>> > (Maybe apply? but it is deprecated?)
>> >>> def foo(a, b, c): print a, b, c
>> ...
>> &
Alex Popescu schrieb:
> Hi all!
>
> I was reading through Python Cookbook the Singleton recipe. At this moment
> I am a bit puzzled as the example in the book is not working resulting in:
>
> TypeError: type.__new__(SingleSpam): SingleSpam is not a subtype of type
>
> (I haven't presented the o
> HELLO,
>
> On this group I ask for serious help and now we talk about
> communication. Then I you don't know how to help me then please DON'T
> SAY ANYTHING
Your lack of command of the python language and programming concepts in
general is only excelled by your inabillity to react properly in
[EMAIL PROTECTED] schrieb:
> On 26 srp, 13:43, Steve Holden <[EMAIL PROTECTED]> wrote:
>> Thorsten Kampe wrote:
>>> * (Wed, 25 Jul 2007 11:22:03 -0700)
On 25 srp, 17:31, Wildemar Wildenburger <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
>>> And while we're on the topic of com
Patch / Bug Summary
___
Patches : 399 open ( +5) / 3836 closed ( +9) / 4235 total (+14)
Bugs: 1056 open (+10) / 6776 closed ( +3) / 7832 total (+13)
RFE : 263 open ( +1) / 294 closed ( +1) / 557 total ( +2)
New / Reopened Patches
__
utilize 2
>> v = 0x0bcd
>> b = v & 0xf
>> v >>= 4
>> g = v & 0xf
>> v >>= 4
>> r = v & 0xf
>> print r, g, b
>>
>>
> Alternatively, using 5-bit colors you would use
>
> b = v & 0x1f
> g = (v >> 5) & 0x
> Before you can even get started with Python web-development, you have
> to understand this entire alphabit soup of: CGI, FASTCGI, MOD_PYTHON,
> FLUP, WSGI, PASTE, etc. For me, configuring fastcgi has been the most
> difficult part of getting django to work. PHP developers don't have to
> bother w
Tina I schrieb:
> Hi,
>
> Is there a way to submit a form and then open the resulting page in the
> default browser? (Writing the form submission code is not a problem by
> the way)
> I guess what I'm asking is how I can get the resulting URL and feed it
> to the webbrowser module.
> I need to
james_027 schrieb:
> hi,
>
> is cls & self the same thing?
>
> I have seen something like
>
> class A:
> def dosomething(cls):
>#doing something
>
> How is cls & self differ? How is it use?
cls and self are just names. And you most certainly haven't seen the
above, but this instea
Tim Arnold schrieb:
> Hi, I'm beginning to understand the encode/decode string methods, but I'd
> like confirmation that I'm still thinking in the right direction:
>
> I have a file of latin1 encoded text. Let's say I put one line of that file
> into a string variable 'tocline', as follows:
> to
Will McGugan wrote:
> Hi,
>
> Is there some reference regarding how to package a Python application
> for the various platforms? I'm familiar with Windows deployment - I use
> Py2Exe & InnoSetup - but I would like more information on deploying on
> Mac and Linux.
On mac, there is py2app that all
Neil Cerutti wrote:
> On 2007-07-30, André <[EMAIL PROTECTED]> wrote:
>> On Jul 30, 9:39 am, Neil Cerutti <[EMAIL PROTECTED]> wrote:
>>> I don't understand the qualification, "at runtime," you're
>>> making. What's wrong with just importing what you want and
>>> using it? If it's already been enab
Edward K Ream wrote:
> It looks like both exec and execfile are converting "\n" to an actual
> newline
> in docstrings!
>
> Start idle:
>
> Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)]
> on win32
> [rest of signon deleted]
>
s = '''\
> strings = 'abc'.split("\n
Mike Howarth schrieb:
> I've been having a few problems with connecting to SQL Server, initially I
> was using dblib however found some problems with returning text fields
> whereby all text fields were ignored and it bawked at multiline sql
> statements.
>
> Having found these major stumbling blo
ASCII escapes
>> codes.
>>
>> Why do you care about \b anyway :-) ?
>>
>> --
>> Lawrence, oluyede.org - neropercaso.it
>> "It is difficult to get a man to understand
>> something when his salary depends on not
>> understanding it" - Upto
Gerardo Herzig schrieb:
> Hi all. I dont know if this is the right place for asking this, but
> maybe some of you know where i must go.
> The thing is:
>
> Im writing a very simple class (in python) to access some LDAP server. A
> companion will access to the same LDAP server too, but his develo
beginner wrote:
> Hi Everyone,
>
> I am looking for a way to allow a standalone python process to easily
> interactive with a few web pages. It has to be able to easily receive
> requests from the web and post data to the web.
>
> I am thinking about implementing a standalone soap server, but I
beginner wrote:
> On Jul 31, 10:53 pm, beginner <[EMAIL PROTECTED]> wrote:
>> Hi All,
>>
>> This is just a very simple question about a python trick.
>>
>> In perl, I can write __END__ in a file and the perl interpreter will
>> ignore everything below that line. This is very handy when testing my
Bruno Desthuilliers schrieb:
> beginner a écrit :
>> On Aug 1, 5:04 am, Bruno Desthuilliers > [EMAIL PROTECTED]> wrote:
>>> beginner a écrit :
>>> (snip)
>>>
Yes exactly. I just don't want to reinvent the wheel as I imagine
there are already tons of libraries and frameworks that support R
vml schrieb:
> Hello,
>
>
> I am trying to promote python in my job, my collegue only see matlab
> and microsoft scripting language.
> I understood that there willl be no backward compatibility between
> python 2.x and 3.0, does it means that:
>
> - my script using pywin32 for the COM layer and
Roman schrieb:
> Is there a package that converts a string that contains special
> characters in xml to to literal value. For instance, converts string
> http://myhome/¶m to http://myhome/¶m.
import xml.sax.saxutils
print xml.sax.saxutils.escape("I'm a happy & friendly guy, and 1 < 3 -
neve
[EMAIL PROTECTED] schrieb:
> I don't personally use __call__ methods in my classes, but I have
> encountered it every now and then here at work in code written by other
> people. The other day I replaced __call__ with a more obvious method name,
> so now instead of executing
>
> obj(foo, bar,
Jean-Paul Calderone schrieb:
> On Thu, 02 Aug 2007 21:16:04 +0200, "Diez B. Roggisch"
> <[EMAIL PROTECTED]> wrote:
>> vml schrieb:
>>> Hello,
>>>
>>>
>>> I am trying to promote python in my job, my collegue only see matlab
>>&g
be called,
> because A is True.
>
> And I agree with Laurent that it should be better to write a clean code,
> so it doesn't matter whether you write in Python or in Delphi.
>
> Gabriel: you pointed me to this page:
> The exact behavior is defined in the Language R
Patch / Bug Summary
___
Patches : 404 open ( +5) / 3847 closed (+11) / 4251 total (+16)
Bugs: 1059 open ( +3) / 6784 closed ( +8) / 7843 total (+11)
RFE : 263 open ( +0) / 295 closed ( +1) / 558 total ( +1)
New / Reopened Patches
__
struni: F
Nitro wrote:
> Hello,
>
> today I wrote this piece of code and I am wondering why it does not work
> the way I expect it to work. Here's the code:
>
> y = 0
> def func():
> y += 3
> func()
>
> This gives an
>
> UnboundLocalError: local variable 'y' referenced before assignment
>
> If I c
Flavio wrote:
> Hi, I have been playing with set operations lately and came across a
> kind of surprising result given that it is not mentioned in the
> standard Python tutorial:
>
> with python sets, intersections and unions are supposed to be done
> like this:
> In [7]:set('casa') & set('por
7stud schrieb:
> Suppose I write:
>
> f = open("myimg.jpg")
> f.read(10)
>
>
> According to the docs,
> ---
> read([size])
>
> Read at most size bytes from the fileThe bytes are returned as a
> string object.
> --
>
> How does python convert a byte to a string?
A string _i
Marc 'BlackJack' Rintsch wrote:
> On Wed, 08 Aug 2007 11:40:28 +, NicolasG wrote:
>
>> Couple of day's ago I asked for your help on how to create a single
>> file of a python executable. Now I want to proceed a little bit
>> further asking how can I avoid (or at least make it difficult) for
>
[EMAIL PROTECTED] schrieb:
> I am having a general problem getting Zope installed as part of my
> linux distro.
We have a general problem solving problems that lack any concrete
description of what is not working. We need stacktraces and so forth.
Maybe reading this helps:
http://catb.org/~es
indu_shreenath schrieb:
> Hey,
> I want to get the output of "DIR /AD /B" command to a varriable using
> python. How can I do this?
Using the subprocess-module.
However, I'm not sure what DIR /AD /B does - but there are many
functions in module os that might deliv
[EMAIL PROTECTED] schrieb:
> Hi,
>
> I'm using Jython in combination with java.
>
> I wrote a jython skript, which calls a function from another jython
> module called library.py.
>
> So, executing the function genData() in skript .py runs without
> problem but if I execute the same function aga
1601 - 1700 of 4468 matches
Mail list logo