> This is the code section of my server class (I cut this from a Python
> example):
> def establishConnection(self):
> self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
> self.socket.connect((self.host, self.port))
> Do I have to use explicit typecasting? How can t
ble to do this with all types of image formats. It was suggested that
> a function such as 'B = numeric.from_image(A)' was used but I can't find
> it in any of the libraries. I was hoping you could help me on this.
You have to install the numeric library for that. Googling nume
> Is there a difference between the 'Numeric' and 'numeric' module?
> I have on my system only Numeric... And this has no function like
> 'from_image'.
I actually didn't check that - I just wanted to point the OP to the
numeric-module(s) available, as he suggested that
>The usual way of doing su
> I assume it's hitting some limit, but don't know where the limit is to
> remove it. I tried stepping into it repeatedly with Komodo, but didn't
> see the problem.
That's because it is buried in the C-library that is the actual
implementation. There has been a discussion about this a few weeks ag
dementrio wrote:
> Thanks for the hint!
>
> However now I have another problem - endianness (the client runs on
> powerpc, the server on x86). I found that simply reversing the stuff I
> recv() works, but is there any cleaner way for taking care of this?
Have you actually _read_ the struct docum
mrstephengross wrote:
> Ok, this is a neat idea... The uu module deals with files though, not
> strings. Is there a way in python to make a string act like a file
> handle?
(c)?StringIO
Diez
--
http://mail.python.org/mailman/listinfo/python-list
Patch / Bug Summary
___
Patches : 399 open ( +8) / 3042 closed ( +4) / 3441 total (+12)
Bugs: 923 open ( +8) / 5553 closed (+13) / 6476 total (+21)
RFE : 209 open ( +0) / 198 closed ( +1) / 407 total ( +1)
New / Reopened Patches
__
urllib pr
Pawel wrote:
> Hello,
> I plan to make Visual Reporting Editior, a new product for
> corporate-class systems. Data will be in XML and in my application,
> designer should be able to make fascinating templates of reports. I
> will use Python and MSVS 2005 Pro. My question is, which libaries will
>
asdsd sir wrote:
> Hi!I'm new in Python and i'd like to ask some general questions about
> stdin,stdout...
>
> Firstly...
>
> if we type like something like :
>cat "file.txt"|python somefile.py
>
> #somefile.py
> import sys
> text=sys.stdin.read()
>
>
> ...then "sys.stdin.read()"
Astan Chee wrote:
> Hi,
> Im rather new to threads in python but Im trying to terminate a function
> call (or the execution of the function) after a certain period of time
> has passed.
> Do i need to use threads with this? if i do, how do i go about doing it?
Yes and no. As you didn't tell us mu
> Based on all this, I have been investigating about postscript files. I
> realize that printers do handle this language, so I think if I have a
> .ps file and send it directly to the printer, it should do the job,
> right? (this is certainly a question) If the answer is True, no matter
> in what p
Lou G wrote:
> I'm trying to show a number of Checkbuttons (each with associated text
> based on a list of names) inside a y-scrollable Text widget like so:
>
> [ ] Bob
> [ ] Carol
> [ ] Ted
> [ ] Alice
> etc.
> etc.
>
> There may be quite a few (as many as 100 or so). I'm uncertain as to
> the
al pacino schrieb:
> hi,
>
> is it possible to address the 'screen pixels' using python , like
> analogous to older dos( functions that graphics.h provides') or win api
> calls for gdi.
Use one of the available GUI-Toolkits - Tkinter is included already. Or
pygame.
Diez
--
http://mail.python
calmar schrieb:
> Hi all,
>
> since I'm just a 'handicraft'/beginner or so,
>
> could anybody provide me with some (rough) hints, about how to enhance the
> code
> here:
- why are these {{{ thingies there?
- use string interpolation like "Foo %s %i" % ("bar", 1) instead of
concatenating s
> For example, if I'm running IronPython, can I access modules such as Numeric
> and numarray?
AFAIK not. You can run pure python modules, but not extensions
containing native code.
> As I understand it, interoperability with C# and .NET works in both
> directions with IronPython, but CPython mo
Ilias Lazaridis schrieb:
> remark: not sure if the term "dictionary" is correct here.
>
> I have the following situation:
>
> within a setup.cfg, settings are passed this way:
>
> settings=project_page=theProjectPage.com
> myVar=myValue
>
> those are accessible later like this:
>
> set
> However, I wondering how to approach the search of the nine regions of
> the grid. I am thinking of producing another nested list, again 9x9 to
> store the contents of each region, and to update this after each pass
> through -and update of- the main grid (row and column).
>
> I am not sure h
Diez B. Roggisch schrieb:
> The question is not so much which region a give square is in, but more
> which square contains which fields. If we assume that you number your
> squares row-wise (top-left zero, top-right 3, bottom-right 9), this
> function computes the field indices
Hi,
I've got to deal with a pretty huge XML-document, and to do so I use the
cElementTree.iterparse functionality. Working great.
Only trouble: The guys creating that chunk of XML - well, lets just say they
are "encodingly challanged", so they don't produce utf-8, but only cp1252
instead, togethe
> Both my python2.3 and python2.4 interpreters seem to know "Windows-1252":
>
import codecs
codecs.open("windows.xml", encoding="windows-1252")
>
>
> Maybe the problem lies in the python installation rather than
> cElementTree? Just guessing, though.
Hm. No idea why I was under the im
Grzegorz Smith schrieb:
> Hi all. I have got situation that I need make parameter injection into
> function and I want that parametet be a local variable of that function.
> eg. something like
> def decorator():
>
> @decorator
> def myfun():
>a = 20
>
[EMAIL PROTECTED] schrieb:
> So, so close The problem with this implementation is that it
> doesn't monitor usb keyboards under linux at all as far as I can
> tellsince no keyboard entry will show up in /proc/interrupts with a
> usb keyboard. I absolutely need the keyboard monitoring as w
Chris wrote:
> Update: Instead of disconnect / reconnect, I made it so that in case of
> 1084 errors I rollback and retry the same INSERT again.
> It worked... It's not beautiful code but it's working.
> So really I think something's fishy in dco2.c
> If someone tell me what should be investigated
[EMAIL PROTECTED] wrote:
> well wht can i say it simply refuses to compile...i m getting make
> errors. i think the culprit is the gcc-4.0..secondly i havent had a
> chance to really try it out..aneways does libfg manipulate inputs from
> webcams..like VideoCapture modules ..also i think libfg is
Patch / Bug Summary
___
Patches : 385 open (-14) / 3067 closed (+25) / 3452 total (+11)
Bugs: 864 open (-59) / 5621 closed (+68) / 6485 total ( +9)
RFE : 211 open ( +2) / 200 closed ( +2) / 411 total ( +4)
New / Reopened Patches
__
GNU uses
Bo Yang wrote:
> Hi,
> I know in java , we can use
>
> class.ForName("classname")
>
>
> to get an instance of the class 'classname' from a
> string , in python , how do I do that ?
You can use
getattr(module, classname)(*arguments)
Diez
--
http://mail.python.org/mailman/listinfo/python
Harald Armin Massa wrote:
> Hello,
>
> I am looking for a method to convince cx_Oracle and oracle to encode
> it's replies in UTF8.
>
> For the moment I have to...
>
> cn=cx_Oracle.connect("user","password", "database")
> cs=cn.Cursor()
>
> cs.execute("select column1, column2, column3 from ta
[EMAIL PROTECTED] wrote:
> Does anyone know how to call for the root prompt before launching your
> app?
> Kinda like synaptic or the superuser file manager does?
That is Windowmanager/Desktop dependand. For KDE, you can e.g. create links
to applications that instruct the KDE to first acquire roo
Luke Plant wrote:
> Bo Yang wrote:
>
>> I know in java , we can use
>>
>> class.ForName("classname")
>>
>>
>> to get an instance of the class 'classname' from a
>> string , in python , how do I do that ?
>
> In Python, classes are first class objects, so normally you would pass
> the class itsel
Sebastian Bassi wrote:
> Hello,
>
> How do I detect non-ascii letters in a string?
> I want to detect the condition that a string have a letter that is not
> here: string.ascii_letters
"äöü".decode("ascii")
should do the trick -- you get an UnicodeError when there is anything ascii
can't encode
[EMAIL PROTECTED] wrote:
> i am new to learning jython...
>
>
> i just tried compiling a small piece of code that is given below:
>
> def fac(x)
> if x<=1:return 1
> return x*fac(x-1)
You really have a book about python that doesn't mention that functions
definitions are closed by a colon? I
Dr. Pastor wrote:
> Several Documents about Python
> refer to PYTHONPATH.
> I could not find such variable.
> (Python 2.4.2, IDLE 1.1.2, Windows XP)
> How should/could I nominate a Directory to be
> the local Directory?
> Thanks for any guidance.
It's a so called environment-variable. You can set
Odd-R. wrote:
> I have come over a strange problem regarding exceptions
> This is my code:
>
> try:
> #some operation
> except Exception, info:
> #some message
> except:
> #??
>
> When executing my code, I get to the last block here. This
> I find rather strange, because I thought Exceptio
Roy Smith wrote:
> In article <[EMAIL PROTECTED]>,
> Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>
>> Side-effects aren't always bad (import, for example, does all its work by
>> side-effect). But they are generally frowned upon, and in functional
>> languages they are verboten.
>
> How do you d
luca72 wrote:
> Hello again my friends
>
> here's my new problem.
>
> How i can translate chr in to hex or int to integer value?
print "%x" % ord('a')
Diez
--
http://mail.python.org/mailman/listinfo/python-list
Bo Peng wrote:
> Dear list,
>
> I have not done a thorough test, but it occurs to me that
>
> 1. python code can be interrupted by Ctrl-C.
> 2. A C module, if I add a main() function and run independently, can be
> interrupted by Ctrl-C.
> 3. If I load the C module in python and run, the program
Michele Petrazzo wrote:
> Simple example extract from my code:
>
> #code
> def test():
> print type(t_fields), 11 in t_fields
> print t_fields[11]
> print "I'm here"
>
> print "ok"
> test()
> print "ok"
> #end code
>
> Output:
>
> ok
> False
>
> Here I see only one "ok" and not the "I'm here
gregarican schrieb:
> I have an PyQt app were I need one of the windows to be able to be
> opened more than one at a time. When I try to open it I only get one
> instance at the same time. The main class is the QWidget() class with a
> QGridLayout() displaying the various window components.
>
> Is
gregarican schrieb:
> The window isn't being created as a new class instance or anything.
Yes it is. QWidget() creates a new instance of QWidget.
> The
> main class is the application main window as a whole and this
> particular window is just part of that class. I have typed data into
> the win
> This code are inside a method into class that have no try/except. And
> called from a method inside a wx.Frame derivate. The other strange thing
> is that if I try the same code just before the "caller" to that method,
> it raise an exception:
So maybe the C-layer of wx in-between doesn't pro
> Use a separate thread for downloading.
Or the twisted select-reactor. No threads needed.
Diez
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] schrieb:
> Do I need to convert string to integer in python? or it will do it for
> me (since dynamic type)?
>
> In my python script, I have this line:
> x /= 10;
>
> when i run it, I get this error:
> TypeError: unsupported operand type(s) for /=: 'unicode' and 'int'
>
> I
[EMAIL PROTECTED] schrieb:
> I have a string array:
> colors = ["#ff", "#00FF00", "#FF"]
> colorIndex = 0;
>
> and I want to loop thru each element of colors
>
> for str in strings:
> print colors[colorIndex++ % colors.length]
>
>
> But i get an invalid syntax error when I execute the
[EMAIL PROTECTED] schrieb:
> okay, I try you suggestion, and re-write my code like this:
> colors = ["#ff", "#00FF00", "#FF"]
> colorIndex = 0
>
> def getText(nodelist):
>
>
> for str in strings:
>
> print colors[colorIndex % colors.length]
>
[EMAIL PROTECTED] schrieb:
> Can you please tell me what is the meaning of
> UnboundLocalError: local variable 'colorIndex' referenced before
> assignment
>
> in general?
Well, pretty much of what it says: You tried to access a variable without prior
assignment to
[EMAIL PROTECTED] schrieb:
> Can you please tell me what is the meaning this error in general?
>
> UnboundLocalError: local variable 'colorIndex' referenced before
> assignment
>
> In my python script,
> I have a variable define and init to 0, like this
> colorIndex = 0
>
> and in one of my fu
[EMAIL PROTECTED] schrieb:
> I am new to python, can you please tell me how can I convert my python
> script into an executable on linux?
> i.e. instead of typing 'python myscript.py abc', I just need to do
> 'myscript.py abc'?
> and how can I get the input argument from my script , in my example,
> I mean what I really would like is to have something C++ - like "for
> (int idx = a; idx < b; i++) { .. }" where no internal vector or
> something like that is allocated but only a few op's on registers are
> performed; in the whileloop in python the picture is
Sandra-24 wrote:
> I'd love to know why calling ''.join() on a list of encoded strings
> automatically results in converting to the default encoding. First of
> all, it's undocumented, so If I didn't have non-ascii characters in my
> utf-8 data, I'd never have known until one day I did, and then t
Patch / Bug Summary
___
Patches : 382 open ( -3) / 3079 closed (+12) / 3461 total ( +9)
Bugs: 880 open (+16) / 5624 closed ( +3) / 6504 total (+19)
RFE : 211 open ( +0) / 201 closed ( +1) / 412 total ( +1)
New / Reopened Patches
__
PEP 357 -
[EMAIL PROTECTED] wrote:
> I was messing around with the native ODBC module (I am using Python in
> a Win32 environment), e.g:
>
> import dbi, odbc
>
> ...and it seems to meet my needs. I'd rather use a module that comes
> natively with Python if it works (don't care about performance in this
>
[EMAIL PROTECTED] wrote:
> Great, thanks Diez! Should I just use str(n) to convert it to a format
> I can write out to a flat file? I'm also struggling with the strange
I guess so, yes.
> date object format that the ODBC module returns when I fetch rows. I
> need to convert that to a text string
[EMAIL PROTECTED] wrote:
> Sorry for the double-thanks Frank.
>
> I'm using Python 2.1 for Win32 and import datetime fails.
>
> Does the datetime module come standard with later releases of Python?
> If so, which release? If not, will datetime with with Python 2.1, if it
> will, where can I get
[EMAIL PROTECTED] wrote:
> If in Windows XP I use:
>
> openstring= "test.py >foo.txt"
> os.system(openstring)
>
> it works.
>
>
> But if I use:
>
> file1='foo.txt'
> openstring= "test.py >"+file1
>
> It gives an IOError about no such file or directory as
> \\mydidr\\foo.txt
>
> What does
[EMAIL PROTECTED] schrieb:
> I'm trying to write a simple dialog with PyQt. Ive got this code as
> one of the slots:
>
> def setFixed(self):
> if len(str(self.fixed_label.displayText())) == 0:
> QMessageBox.critical(self, "Label Missing", "You must enter
> a label.")
>
[EMAIL PROTECTED] schrieb:
> Is there a way to hide a python instance from the Task Manager process
> list?
Try sony's rootkit. Or any other.
Diez
--
http://mail.python.org/mailman/listinfo/python-list
Antoon Pardon schrieb:
> In a number of cases I have a program that looks like the following.
>
> for case in all_cases:
> try:
> treat(case)
> except Exception, ErrInfo:
> generate_traceback()
>
> The idea is to get as much information as possible when something
> goes wrong but at t
nuttydevil schrieb:
> I've tried various ways of doing this but keep coming unstuck along the
> way. Has anyone got any suggestions for how they would tackle this
> problem?
> Thanks for any help recieved!
Show us your ways, show us where you got stuck - then we'd might be able to
help you.
Diez
KraftDiner schrieb:
> Thank you that worked great!
>
> a = [[None] * 256] * 256
> for i in range(0,256):
> for j in range(0,256):
> a[i][j] = i**2
>
> Now.. Can I change this quickly into a 1 dimensional list of length
> 65536?
sum(a, [])
Diez
--
http://mail.python.org/ma
now. Or there is any lib in python that already implement a p2p
> protocol? Please insight me, thanks a lot ( :
Bittorrent, one of the most actively used p2p protocols is _written_ in
python.
--
Regards,
Diez B. Roggisch
--
http://mail.python.org/mailman/listinfo/python-list
Patch / Bug Summary
___
Patches : 322 open ( +6) / 2832 closed ( +1) / 3154 total ( +7)
Bugs: 920 open (+12) / 4952 closed (+11) / 5872 total (+23)
RFE : 186 open ( +8) / 156 closed ( +3) / 342 total (+11)
New / Reopened Patches
__
Info Asso
Patch / Bug Summary
___
Patches : 332 open (+10) / 2834 closed ( +2) / 3166 total (+12)
Bugs: 927 open ( +7) / 4959 closed ( +7) / 5886 total (+14)
RFE : 186 open ( +0) / 157 closed ( +1) / 343 total ( +1)
New / Reopened Patches
__
Feature e
python.org/sf/1202533 opened by Armin Rigo
Problem with abs function (2005-05-16)
http://python.org/sf/1202946 opened by ric-b
Bugs Closed
___
time module ignores timezone changes (2005-05-09)
http://python.org/sf/1198275 closed by bcannon
SystemError: error retu
Patch / Bug Summary
___
Patches : 342 open ( +3) / 2839 closed ( +1) / 3181 total ( +4)
Bugs: 936 open ( -2) / 4974 closed (+12) / 5910 total (+10)
RFE : 189 open ( +2) / 159 closed ( +2) / 348 total ( +4)
New / Reopened Patches
__
optparse
that could be tried is to feed that dom tree
instead of a xml string to a validation process - but if that's doable I'm
not sure, and it doesn't buy you too much performance gain. So stick with
the write/validate process described above.
--
Regards,
Diez B. Roggisch
--
http://mail.python.org/mailman/listinfo/python-list
> (0xFF 0x00 0x00 0x00 0x00 0x00 0xF0F0F0F0 0x)
An arry has one typecode that applies to all its elements - so what you
want can't be done.
But you can use two lists and the module struct to create a string that
resembles the memory layout you want.
data1 = [0] * 6
data2 =
[EMAIL PROTECTED] wrote:
> Hello,
>
> Is it possible to convert unsigned long( 4 bytes) to unsigned char(1
> byte), so that i could define a common array for both.
>
> import array
> temp = array('B', '\0' * 512)
>
> for i in range( 2):
>
[EMAIL PROTECTED] wrote:
> I am constructing a packet, with the first 6 bytes being the
> destination address, followed by src, and type.
As I told you - use struct.
> The remaining space
> will be filled with data. I need to use an array because of the
> buffer_info method i am calling.
That's
Thomas W wrote:
> I want to monitor a given USB-device, like a Memory Card-reader, and
> when a memory card is inserted I want to move the data on the card to a
> different location on the filesystem ( or do something else with the
> files).
>
> Does anybody know how to do this ( on Linux and/or w
Patch / Bug Summary
___
Patches : 344 open ( +2) / 2845 closed ( +6) / 3189 total ( +8)
Bugs: 916 open (-20) / 5014 closed (+40) / 5930 total (+20)
RFE : 191 open ( +2) / 163 closed ( +4) / 354 total ( +6)
New / Reopened Patches
__
Optimizat
> Arrays are homogenous. No chance concatenating them.
This should of course read "No chance concatenating arrays of different
typecodes".
--
Regards,
Diez B. Roggisch
--
http://mail.python.org/mailman/listinfo/python-list
) == section]
It looks from the root throug all the descending childs
//
after nodes with name section
section
that fulfill the predicate
[id==$id_param]
>From this out we collect all immediate children
/node()
that are not of type section [!name() == section]
--
Regards,
Diez
rbt wrote:
> Peter Hansen wrote:
>
>> Philosophy not entirely aside, you should note that object code in any
>> language can "easily" be reverse-engineered in the same way, with the
>> only difference being the degree of ease involved. If the code is
>> worth enough to someone that they are wi
>
> Yes, in fact:
>
> //[EMAIL PROTECTED]//*[name()!='section']
>
> would do the trick.
>
> I was trying to avoid using anything not in the standard Python
> distribution if I could help it; I need to be able to use my code on
> Linux, OS X and Windows.
>
> The xml.path package is from PyXML,
>
> I've managed to test for specific elements and extract values. I want to
> place the reults in arrays with array index equal to element ID. So as I
> walk the tree I temporarily store IDs and DeptValues in lists. I'm ok so
> far. I then intend to create an array of size determined by the maxim
[EMAIL PROTECTED] wrote:
X-No-Archive: yes
Can some one help me improve this block of code...this jus converts the
list of data into tokens based on the range it falls into...but it
takes a long time.Can someone tell me what can i change to improve
it...
if data[i] in xrange(r
> I don't see a "break" so why the "/2" ? also IIUC the
That was the assumption of an equal distribution of the data. In
O-notationn this would be O(n) of course.
Diez
--
http://mail.python.org/mailman/listinfo/python-list
Tom Anderson wrote:
> This strikes me as a rather common thing to want to do, but i can't see
> a method for it; it seems i have to go through elem.childNodes myself,
> fishing out the ones i want. Or rather, to write exactly the same
> three-line helper function that millions of other people mu
>
> That looks quite good, except that Trolltech doesn't yet have a GPL-qt
> for Win32. I might take another look at it whenever qt4 comes out, but
> in the meantime (since I'm unfortunately developing on a win2k system)
> it's not useful.
Look at qt feee win edition, available here:
http://
Johan Segernäs wrote:
> I'm put on building a system in Python and I haven't used either webservices,
> SOAP or Python so I'm a bit lost.
>
> This system will require callback functions, should I use Python thru Apache
> for this or build my own listening daemon? Use module for Apache or do I make
[EMAIL PROTECTED] wrote:
> Hello,
>
> How do i pack different data types into a struct or an array. Examples
> would be helpful.
>
> Say i need to pack an unsigned char( 0xFF) and an long( 0x)
> into a single array? The reason i need to do this is send a packet over
> a network.
You've b
> Basically, don't write the implementation to talk to the SOAP/WDSL-services
> in Python, find something else and this 'something else' produces an XML file
> which I then parse with Python?
For example - or better, instead of passing XML use an RPC mechanism
Python is good at - e.g. corba. So y
Patch / Bug Summary
___
Patches : 339 open ( -5) / 2857 closed (+12) / 3196 total ( +7)
Bugs: 908 open ( -8) / 5036 closed (+22) / 5944 total (+14)
RFE : 189 open ( -2) / 168 closed ( +5) / 357 total ( +3)
New / Reopened Patches
__
Trivial t
M1st0 wrote:
> where I can find the grammar of python bytecode ? ( better if is in BCF
> ).
There is no grammar for bytecodes - the are like assembly instructions.
And what's BCF supposed to mean - BNF is a form for grammars, BCF I
never heard of.
And besides that: tell us what you're after, we
M1st0 wrote:
> Ops yes is BNF :P Bacus Normal Form if I am not wrong...
>
> However..
>
> I'am tryng to recognizing patterns in a bytecoded file in orderd to
> optimize...
>
> But I would like to "parse" i.e reconstruct it in something like a
> tree..
> in order to apply rules on a tree rec
sinan , wrote:
> hi everybody, i have a small mysql connection code
>
>
import MySQLdb
db=MySQLdb.Connection(host="localhost",user="root",db="nux")
>
> Traceback (most recent call last):
> File "", line 1, in ?
> File "/usr/lib/python2.3/site-packages/MySQLdb/__init__.py", line
> 66,
Will McGugan wrote:
> Marketing types need a bandwagon to jump on. Point out that Google is
> used by Google, ILM and NASA.
Certainly a true statement - but I've got the sneaky suspicion that the
first google was supposed to be python.
Diez
--
http://mail.python.org/mailman/listinfo/python-lis
Patch / Bug Summary
___
Patches : 338 open ( -1) / 2861 closed ( +4) / 3199 total ( +3)
Bugs: 909 open ( +1) / 5047 closed (+11) / 5956 total (+12)
RFE : 188 open ( -1) / 170 closed ( +2) / 358 total ( +1)
New / Reopened Patches
__
byteorder
[EMAIL PROTECTED] wrote:
> Hi,
>
> I'm writing a program which requires the use of three serial ports and
> one parallel port. My application has a scanning devices on each port,
> which I can access fine with pyserial. However, I'm unsure of how
> exactly I should be designing the program, I th
cpunerd4 wrote:
> what I mean by secure is that no one can steal the code. I want to
> create comercial applications eventually. (although I will work on open
> source I hope, so don't get mad at me) and calling me cpunerd4 will be
> fine.
Commercial applications don't suffer from code-stealing. T
ai wrote:
> Yes, you are right.
> But from this problem, could I infer that the statement "del xxx"
> doesn't release the memory which xxx used?
It just removes the name xxx from the current scope - which will result in a
reference counter decrease. If that was the last reference, the object will
stef wrote:
> hello,
>
> doing a simulation of another language (JAL),
> I translate the other language into Python code,
> then I execute this converted Python code.
>
> Now I need todo some checks and give visual feedback to the user,
> each time a line of code is executed.
>
> One way of rea
Steve Howell wrote:
> --- Sergey Dorofeev <[EMAIL PROTECTED]> wrote:
>> > What syntax would you suggest for a lambda
>> enhanced to cover your use
>> > case?
>> > I suppose you will end up with roughly the same
>> number of characters, all
>> > crammed in one line -- or broken into lines at a
>> r
> Ok, I stand corrected.
>
> Duplicate subexpressions are pretty easy to avoid in
> Python, so though an optimization would not be
> impossible here (checking for immutability of
> builtins, etc., which still assumes the idea that
> multiplication is more expensive than checking for
> immutability
per9000 wrote:
> On Jun 4, 9:11 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>> In <[EMAIL PROTECTED]>, per9000
>> wrote:
>> >
>> > [...]
>> >
>> > So another question emerges:
>> > * is the use of magic names encouraged and/or part of good coding
>> > practice.
>>
>> What do you mean
chewie54 wrote:
> Hi All,
>
> I have read some posts on this subject but I haven't been able to make
> a decision whether to use Python or not.
>
> I'm considering converting a Java CAD program to Python/C with
> wxWdigets for the GUI.
>
> I don't have good answers for:
>
> 1) Can I use py2ex
> Hello Diez,
>
> I did look at PythonCad but the distribution and install methods for
> Windows is not user freindly. Since the public domain software, I
> don't think they protect the source code either.
The subject of code obfuscation in python has been beaten to death quite a
few times on th
stef wrote:
> hello
>
> I can find all kind of procedures to convert an array to a bitmap
> (wxPython, PIL),
> but I can't find the reverse,
> either
>- convert a bitmap to an array
> or
> - read a bitmap file to an array
Not true for PIL, Image.getdata and Image.putdata are your friends.
JonathanB wrote:
> Ok, this is probably definitely a newbie question, but I have looked
> all over the Python library reference material and tutorials which I
> can find online and I cannot find a clear definition of what these are
> and more importantly how to use them. From what I can tell from
Pieter,
I've found when I have questions like this, that thinking about how I'd
do it in C/C++, then searching on some of those key words leads me to a
Python equivalent solution, or at least heading down the right path.
In this case, I believe you'll find the "file" module helpfull. You can
rea
1401 - 1500 of 4465 matches
Mail list logo