hi,all
i am python newbie,i try to connect to db2 use python,i find it on
python-db2 doc:
$ python
import DB2
conn = DB2.connect(dsn='sample', uid='db2inst1', pwd='ibmdb2')
curs = conn.cursor()
but i don't know about dsn,
i think a way like python
Op 2005-01-13, hanz schreef [EMAIL PROTECTED]:
Antoon Pardon wrote:
So if I have a call with an expression that takes more than
one line, I should assign the expression to a variable and
use the variable in the call?
Yes, that's sometimes a good practice and can clarify
the call.
But
Paul Rubin wrote:
Huh? Expressions are not statements except when they're expression
statements? What kind of expression is not an expression statement?
any expression that is used in a content that is not an expression statement,
of course.
Come on, that is vacuous. The claim was
Op 2005-01-13, Terry Reedy schreef [EMAIL PROTECTED]:
Antoon Pardon [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Op 2005-01-13, Fredrik Lundh schreef [EMAIL PROTECTED]:
Antoon Pardon wrote:
Well, it seems that Guido is wrong then. The documentation clearly
states that an
*damn* it :-) python rocks.
thx
michael .oO (resetting c/c++/java crap collected over the years)
--
http://mail.python.org/mailman/listinfo/python-list
Pierre Barbier de Reuille a écrit :
Antoon Pardon a écrit :
Well I find this a confusing behaviour on python's part. The fact
that instance.field can mean something different, depending on
where in a statement you find it, makes the behaviour inconsistent.
I know people in general here are against
yuzx wrote:
i try to connect to db2 use python,i find it on
python-db2 doc:
$ python
import DB2
conn = DB2.connect(dsn='sample', uid='db2inst1', pwd='ibmdb2')
curs = conn.cursor()
but i don't know about dsn,
It's the host name. In a former project (using module
Jeff Shannon wrote:
Chris Lasher wrote:
And besides, for long-term archiving purposes, I'd expect that zip et
al on a character-stream would provide significantly better
compression than a 4:1 packed format, and that zipping the packed
format wouldn't be all that much more efficient than zipping
Problem solved. I was actually using scipy_distutils and not distutils,
without good reason. Changing setup.py to use distutils made the
problem go away.
Cory.
Cory Davis wrote:
Hi all,
I have been successfully deploying my own python package with distutils
for some time now, but lately,
rbt wrote:
Nick Craig-Wood wrote:
Alex Stapleton [EMAIL PROTECTED] wrote:
Whenever I run python I get
Warning! you are running an untested version of Python.
prepended to the start of any output on stdout.
This is with Debian and python 2.3 (running the debian 2.1 and 2.2
Le 13 Jan 2005 21:58:36 -0800, mike kreiner a écrit :
I am having trouble importing a module I created. I'm running PythonWin
on Windows XP if that helps. I saved my module in a folder called
my_scripts in the site-packages directory. I edited the python path to
include the my_scripts folder
Op 2005-01-14, Fredrik Lundh schreef [EMAIL PROTECTED]:
Paul Rubin wrote:
Huh? Expressions are not statements except when they're expression
statements? What kind of expression is not an expression statement?
any expression that is used in a content that is not an expression
statement,
# -*- coding: latin-1 -*-
I am currently using the datetime package, but I find that the design is
oddly
asymmetric. I would like to know why. Or perhaps I have misunderstood
how it should be used?
I can make a datetime easily enough
datetime(2005, 1, 1)
datetime.datetime(2005, 1, 1, 0, 0)
On Thu, 13 Jan 2005 16:50:56 -0500, Leif K-Brooks [EMAIL PROTECTED] wrote:
Tim Roberts wrote:
Stephen Thorne [EMAIL PROTECTED] wrote:
I would actually like to see pychecker pick up conceptual errors like this:
import datetime
datetime.datetime(2005, 04,04)
Why is that a conceptual
Antoon Pardon wrote:
no, expressions CAN BE USED as statements. that doesn't mean
that they ARE statements, unless you're applying belgian logic.
No I am applying set logic. Any string that is in the set of
valid expressions is also in the set of valid statements.
since you're arguing that
Op 2005-01-14, Nick Coghlan schreef [EMAIL PROTECTED]:
Antoon Pardon wrote:
No I am applying set logic. Any string that is in the set of
valid expressions is also in the set of valid statements.
According to Python's grammar, this is not the case. It requires a NEWLINE or
; token on the end
Clark C. Evans wrote:
Hello. I was wondering if anyone has built a module that works with
urllib2 to upload file content via POST multipart/form-data. I'm
aware of ASPN 146306, however, I need to use urllib2 beacuse I'm
using HTTP Digest over SSL.
Cheers,
Clark
There is an example
Fredrik no, expressions CAN BE USED as statements. that doesn't mean
Fredrik that they ARE statements, unless you're applying belgian logic.
Hmmm... I'd never heard the term belgian logic before. Googling provided
a few uses, but no formal definition (maybe it's a European phrase so
Op 2005-01-14, Fredrik Lundh schreef [EMAIL PROTECTED]:
Antoon Pardon wrote:
no, expressions CAN BE USED as statements. that doesn't mean
that they ARE statements, unless you're applying belgian logic.
No I am applying set logic. Any string that is in the set of
valid expressions is also
On Thu, 13 Jan 2005 11:40:52 -0800, Jeff Shannon [EMAIL PROTECTED] wrote:
Bengt Richter wrote:
BTW, I'm sure you could write a generator that would take a file name
and oldbinstring and newbinstring as arguments, and read and yield nice
os-file-system-friendly disk-sector-multiple chunks, so
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
--
http://mail.python.org/mailman/listinfo/python-list
David Bear wrote:
How does one query the python environment, ie pythonhome
sys.prefix
pythonpath
sys.path
etc.
sys.etc
also, are there any HOWTO's on keeping multiple versions of python
happy?
I think it is sufficiently trivial that none is needed. Just make sure
the distributions are installed
Skip Montanaro wrote:
Fredrik no, expressions CAN BE USED as statements. that doesn't
mean
Fredrik that they ARE statements, unless you're applying belgian
logic.
Hmmm... I'd never heard the term belgian logic before. Googling
provided
a few uses, but no formal definition (maybe it's
I have summarized the discussion about the usability of lists (and
and other mutable types) as dictionary keys and put it into the
Python wiki.URL: http://www.python.org/moin/DictionaryKeys.
This summary might be used as a reference should the 'mutable
dictionary keys' issue come up again in
Hello guys,
I succeeded in convincing my CS teacher to use Python and Sqlite instead of
Microsoft Access to get started with databases.
We are working on a windows terminal server to which I have no admin access,
so I'd like to ask you which module is best suited to use Sqlite with Python
Peter Renzland wrote:
What is the simplest/fastest Python program to determine how many
IP addresses sum up to 666?
The simplest/fastest enumerator?
The simplest/fastest that determines which ones of them are home pages?
This seems to work although it could be made more efficient or elegant.
Nick Coghlan wrote:
as equivalent to:
def __use_stmt():
use-suite
def _in_clause():
in-suite
return names
return _in_clause()
__use_stmt_args = {}
names = __use_stmt()
del __use_stmt
The more I think about this return-based approach, the less I like it. It could
probably be made to
Xah Lee wrote:
gmane is great! its renaming of newsgroups is quite a headache.
i found that comp.lang.python corresponds to
gmane.comp.python.general.
do you know which one corresponds to comp.lang.perl.misc?
there's no .misc or .general...
--
i thought there a strick like preceding a line
John Thingstad wrote:
--
huygens lands on titan
Using M2, Opera's revolutionary e-mail client:
http://www.opera.com/m2/
I bet it didn't...
Regards,
Fuzzy
http://www.voidspace.org.uk/python/index.shtml
--
http://mail.python.org/mailman/listinfo/python-list
Craig Ringer schrieb:
And then we have iteration
(generator expressions, list comprehensions, for loops, ...?) over
(sequences, iterators, generators)
Just sequences and iterators. Generators are functions which return
iterators. Sequences and iterators provide two ways to build
containers.
Is there any way to build the python executable statically and
still be able to load modules built as shared libraries?
I'm trying to run python scripts on a stripped down FreeBSD (4.9)
machine which has no shared system libraries so I want to link it
statically against libc et al, but it would be
Peter Hansen wrote:
Lucas Raab wrote:
I have the statement: typedef unsigned long int word32 and later
on: word32 b[3] referencing the third bit of the integer.
If that's really exactly what you have, then you actually have
something defining an array of three unsigned long integers
named b.
Lucas Raab wrote:
Sorry, the third byte is what I meant. As for code samples, I hope the
following will work:
typedef unsigned long int word32 ;
void mu(word32 *a)
{
int i ;
word32 b[3] ;
b[0] = b[1] = b[2] = 0 ;
for( i=0 ; i32 ; i++ )
{
b[0] = 1 ; b[1] = 1 ; b[2] = 1 ;
On Fri, 14 Jan 2005 00:08:09 GMT, rumours say that [EMAIL PROTECTED] (Bengt
Richter) might have written:
As I'm sure you know, with 2.4's generator expressions you
don't have to build the temporary list.
Which could be important if 'something'
is (or generates) a huge sequence.
for i in
[Aki Niimura]
I started to use pickle to store the latest user settings for the tool
I wrote. It writes out a pickled text file when it terminates and it
restores the settings when it starts.
...
I guess DOS text format is creating this problem.
Yes.
My question is Is there any elegant way
Yogesh Sharma [EMAIL PROTECTED] wrote:
one more question to add:
Is there a way to have 2 local copies of python interpreter ?
Yogesh Sharma wrote:
Hi,
I have following setup:
OS Linux Fedora Core 3
Python 2.3.4
How can I embed two python interpreters in one C++ program ?
Thanks
Take
Skip Montanaro wrote:
Fredrik no, expressions CAN BE USED as statements. that doesn't mean
Fredrik that they ARE statements, unless you're applying belgian
logic.
Hmmm... I'd never heard the term belgian logic before. Googling
provided a few uses, but no formal definition
On Fri, Jan 14, 2005 at 04:01:13PM +0100, Francesco Montorsi wrote:
snip
PyObject *list = PyObject_Dir(m_pGlobals);
if (!list || PyList_Check(list) == FALSE)
return;
for (int i=0,max=PyList_Size(list); imax; i++) {
PyObject *elem = PyList_GetItem(list, i);
if
F. Petitjean wrote:
Le 13 Jan 2005 21:58:36 -0800, mike kreiner a écrit :
I am having trouble importing a module I created. I'm running PythonWin
on Windows XP if that helps. I saved my module in a folder called
my_scripts in the site-packages directory. I edited the python path to
include the
Joachim Boomberschloss wrote:
the code is already written in Python, using the
standard libraries and several extension modules
One thing to keep in mind is that Jython does not
integrate CPython, instead it understands python code
directly. So if you have a C extension that works with python
it
Tim Peters wrote:
[Martin MOKREJ]
...
I gave up the theoretical approach. Practically, I might need up
to store maybe those 1E15 keys.
We should work on our multiplication skills here wink. You don't
have enough disk space to store 1E15 keys. If your keys were just one
byte each, you would need
[Martin MOKREJ]
This comm(1) approach doesn't work for me. It somehow fails to
detect common entries when the offset is too big.
file 1:
A
F
G
I
K
M
N
R
V
AA
AI
FG
FR
GF
GI
GR
IG
IK
IN
IV
KI
MA
NG
RA
RI
VF
AIK
FGR
FRA
GFG
GIN
GRI
IGI
IGR
IKI
ING
IVF
KIG
Xah Lee wrote:
-
for perl syntax lookup, use perldoc in the command line. For example:
perldoc perl
Wrong. That command will give you a high-level overview of Perl but tell you
nothing about the syntax.
To lookup the Perl syntax you would have to use
perldoc perlsyn
Tim Peters wrote:
[Martin MOKREJ]
This comm(1) approach doesn't work for me. It somehow fails to
detect common entries when the offset is too big.
[...]
I'll repeat:
As I mentioned before, if you store keys in sorted text files ...
Those files aren't in sorted order, so of course `comm` can't do
Skip Montanaro wrote:
Fredrik no, expressions CAN BE USED as statements. that doesn't mean
Fredrik that they ARE statements, unless you're applying belgian logic.
Hmmm... I'd never heard the term belgian logic before. Googling provided
a few uses, but no formal definition (maybe it's a
Antoon Pardon wrote:
Op 2005-01-13, hanz schreef [EMAIL PROTECTED]:
Antoon Pardon wrote:
So if I have a call with an expression that takes more than
one line, I should assign the expression to a variable and
use the variable in the call?
Yes, that's sometimes a good practice and can clarify
the
Antoon Pardon wrote:
IMO we have a: dogs are mamals kind of relationship in Python.
I see what you mean, but I don't think it's true.
Every expression can be used where a statement is expected.
(And this can be worded as: every expression is a statement.)
Not really. An expression statement is a
Venkat B wrote:
Hi folks,
I'm looking build a CGI-capable SSL-enabled web-server around Python 2.4 on
Linux.
It is to handle ~25 hits possibly arriving at once. Content is non-static
and built by the execution of py cgi-scripts talking to a few backend
processes.
1) I was wondering if anyone has
Nick Coghlan wrote:
Is
this something to do with system modules being singletons?
They aren't singletons in the GoF design pattern sense. However,
Python's import
machinery operates in such a way that it takes effort to get multiple
version of
the same module into memory at the same time
Bengt Richter wrote:
On Thu, 13 Jan 2005 09:16:40 -0500, Steve Holden [EMAIL PROTECTED] wrote:
[...]
Any statement of the form
for i in [x for x in something]:
can be rewritten as
for i in something:
Note that this doesn't mean you never want to iterate over a list
comprehension. It's the
Op 2005-01-14, Roel Schroeven schreef [EMAIL PROTECTED]:
Antoon Pardon wrote:
IMO we have a: dogs are mamals kind of relationship in Python.
I see what you mean, but I don't think it's true.
Every expression can be used where a statement is expected.
(And this can be worded as: every
Fuzzyman [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Xah Lee wrote:
gmane is great!
I guess that most people use google to post to newsgroups is that they
don't have nntp access.
Anyone with a normal internet connection has nntp access. What some do not
get from their ISP
Antoon Pardon wrote:
Well IMO I have explained clearly that I understood this in a set
logical sense in my first response.
what does first mean on your planet?
/F
--
http://mail.python.org/mailman/listinfo/python-list
Peter Maas [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I have summarized the discussion about the usability of lists (and
and other mutable types) as dictionary keys and put it into the
Python wiki.URL: http://www.python.org/moin/DictionaryKeys.
This summary might be used as a
Ricardo Bugalho wrote:
thanks for the information. But what I was really looking for was
informaion on when and why Python started doing it (previously, it always
used sys.getdefaultencoding())) and why it was done only for 'print' when
stdout is a terminal instead of always.
It does that since
Rickard Lind wrote:
Is there any way to build the python executable statically and
still be able to load modules built as shared libraries?
I'm not what build statically means; if you talking about
building a statically linked interpreter binary - then no,
this is not possible. At a minimum, you
can someone please give me some info regarding subject
please advice
regards
brane
--
http://mail.python.org/mailman/listinfo/python-list
Brane wrote:
can someone please give me some info regarding subject
http://sourceforge.net/projects/mysql-python
Ask a broad question...
Robert Brewer
MIS
Amor Ministries
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
Your file probably need to (a) be in the cgi-bin, not public_html,
(b)
be flagged executable (chmod a+x file.py), and (c) begin with the
line: '#!/usr/bin/env python'
If the server doesn't provide you with CGI (or, strongly preferable,
SCGI or mod_python), you're probably
Thx Rob.
yes i know it's related to search path, but i don't know how to set it in a
practical way (beside hard coding).
my concern is, if i want to create a custom module/library, i don't know
what py file will import it and where the working directory should be.
sometime like my example, even i
Irmen de Jong wrote:
Tim Peters wrote:
Yes: regardless of platform, always open files used for pickles in
binary mode. That is, pass rb to open() when reading a pickle
file,
and wb to open() when writing a pickle file. Then your pickle
files
will work unchanged on all platforms. The
[EMAIL PROTECTED] wrote:
...
In Mythical Future Python I would like to be able to use any base in
integer literals, which would be better. Example random syntax:
flags= 2x00011010101001
umask= 8x664
answer= 10x42
addr= 16x0E84 # 16x == 0x
gunk= 36x8H6Z9A0X
I'd prefer using the
Tim Peters wrote:
That differences may exist is reflected in the C
standard, and the rules for text-mode files are more restrictive than
most people would believe.
Apparently. Because I know only about the Unix - Windows difference
(windows converts \r\n -- \n when using 'r' mode, right).
So it's
A search on google gave me this library, I haven't tested it though:
Brane wrote:
can someone please give me some info regarding subject
From Windows machine: http://adodbapi.sourceforge.net/
From elsewhere: FreeTDS + unixODBC + mxODBC is one of possible solutions.
--
Jarek Zgoda
http://jpa.berlios.de/ | http://www.zgodowie.org/
--
I'd like to save one Tkinter Canvas in order to use it on another
Canvas later. The problem is that it gets saved as EPS but it needs to
be GIF to be reuseable. How can I convert that format?
Peace,
STM
--
http://mail.python.org/mailman/listinfo/python-list
Thanks, for the link
--
http://mail.python.org/mailman/listinfo/python-list
Robert Brewer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Brane wrote:
can someone please give me some info regarding subject
http://sourceforge.net/projects/mysql-python
Ask a broad question...
Robert Brewer
Robert, the question was about 'mssql', not 'mysql'. As for mssql, a
On Fri, 14 Jan 2005 09:12:49 -0500, Tim Peters [EMAIL PROTECTED]
wrote:
[Aki Niimura]
I started to use pickle to store the latest user settings for the tool
I wrote. It writes out a pickled text file when it terminates and it
restores the settings when it starts.
...
I guess DOS text format
Is there an Index server available in Python? For example:
I have large intranet with several servers and I would like to index
documents like search engines do. Users then can search for a domument
in ALL intranet servers like I do on Google.
Thanks for answers
L.A.
--
Max M wrote:
# -*- coding: latin-1 -*-
I am currently using the datetime package, but I find that the design
is oddly
asymmetric. I would like to know why. Or perhaps I have misunderstood
how it should be used?
Yes, you did. datetime.timetuple is those who want *time module* format, you
Say again???
Reinhold Birkenfeld [EMAIL PROTECTED] wrote in
message news:[EMAIL PROTECTED]
It's me wrote:
Sorry if my question was a little lazy and yes, I was asking about the
lazy evaluation. :=)
I am surprised about this (and this can be dangerous, I guess).
If this is true, I
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] wrote:
I have a wxPython application that does a lot of things. One of them,
in particular, I have doubts on how to implement it. Essentially, this part
of my application calls an external executable (an oil reservoir
simulator). What I would
Brian Eable wrote:
perl -e '$a=194.109.137.226; @a = reverse split /\./, $a; for $i
(0..3) { $sum += $a[$i]*(256**$i) } print sum = $sum\n'
226 + 35072 + 7143424 + 3254779904 = 3261958626
http://3261958626/
Which is NOT 666.
Comrade, why perl here? :)
Are you afraid python? :)
--
Peter Hansen wrote:
Paul Rubin wrote:
Simon Wittber [EMAIL PROTECTED] writes:
Is there a reason NOT to use them? If a classic class works fine, what
incentive is there to switch to new style classes?
Perhaps classic classes will eventually disappear?
It just means that the formerly classic
Serge Orlov wrote:
Max M wrote:
Yes, you did. datetime.timetuple is those who want *time module* format, you should use datetime.data, datetime.time, datetime.year
and so on...
As they say, if the only tool you have is timetuple, everything looks like tuple
wink
Try this:
dt = datetime(2005,
Steven Bethard wrote:
It's me wrote:
Say again???
Please stop top-posting -- it makes it hard to reply in context.
Reinhold Birkenfeld wrote...
It's me wrote:
If this is true, I would run into trouble real quick if I do a:
(1/x,1.0e99)[x==0]
Lazy evaluation: use the (x==0 and 1e99 or
Thanks much..:)
On 14 Jan 2005 12:25:43 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
A search on google gave me this library, I haven't tested it though:
David Bear wrote:
How does one query the python environment, ie pythonhome, pythonpath,
etc.
also, are there any HOWTO's on keeping multiple versions of python
happy?
In general, (and in this case) the answer is system-specific.
You need to explain (A) what operating system, and (B) what you
mean
Have you tried using UDP instead of TCP? Also, it is common practice to
choose a random port over 1024 for opening a connection to a remote
server.
--
http://mail.python.org/mailman/listinfo/python-list
WEBoggle needs a new game board every three minutes. Boards take an
unpredictable (much less than 3min, but non-trivial) amount of time to
generate. The system is driven by web requests, and I don't want the
request that happens to trigger the need for the new board to have to
pay the time
Lucas Saab wrote:
Arich Chanachai wrote:
Jane wrote:
Lucas Raab [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Jane wrote:
[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
python.org = 194.109.137.226
194 + 109 + 137 + 226 = 666
What is this website with such a
On Fri, 14 Jan 2005 20:13:48 +0100, Reinhold Birkenfeld [EMAIL PROTECTED]
wrote:
Bengt Richter wrote:
On Thu, 13 Jan 2005 08:18:25 -0500, Peter Hansen [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
In Mythical Future Python I would like to be able to use any base in
integer literals,
[EMAIL PROTECTED] wrote:
Is there an Index server available in Python? For example:
I have large intranet with several servers and I would like to index
documents like search engines do. Users then can search for a domument
in ALL intranet servers like I do on Google.
Thanks for answers
L.A.
Take
Antoon Pardon wrote:
Op 2005-01-14, Peter Maas schreef [EMAIL PROTECTED]:
I have summarized the discussion about the usability of lists (and
and other mutable types) as dictionary keys and put it into the
Python wiki.URL: http://www.python.org/moin/DictionaryKeys.
This summary might be used as a
Max M wrote:
Serge Orlov wrote:
Max M wrote:
Yes, you did. datetime.timetuple is those who want *time module*
format, you should use datetime.data, datetime.time, datetime.year
and so on... As they say, if the only tool you have is timetuple, everything
looks like tuple wink Try this:
dt
Bengt Richter wrote:
On 12 Jan 2005 14:46:07 -0800, Chris Lasher [EMAIL PROTECTED] wrote:
[...]
Others have probably solved your basic problem, or pointed
the way. I'm just curious.
Given that the information content is 2 bits per character
that is taking up 8 bits of storage, there must be a good
Jeff Shannon wrote:
Chris Lasher wrote:
And besides, for long-term archiving purposes, I'd expect that zip et
al on a character-stream would provide significantly better
compression than a 4:1 packed format, and that zipping the packed
format wouldn't be all that much more efficient than zipping
In article [EMAIL PROTECTED],
Chris Lasher [EMAIL PROTECTED] wrote:
Hello,
I have a rather large (100+ MB) FASTA file from which I need to
access records in a random order. The FASTA format is a standard format
for storing molecular biological sequences. Each record contains a
header line
Bengt, and all,
Thanks for all the good input. The problems seems to be that .find()
is good for text files on Windows, but is not much use when it is
binary data. The script is for a Assy Language build tool, so I know
the exact seek address of the binary data that I need to replace, so
Denis S. Otkidach wrote:
Certainly, it can be done more efficient:
Yes, of course. I should have thought about the logic of my code before
posting. But I didn't want to spend any more time on it than I had to. ;-)
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/python-list
jtauber schreef:
see http://cleese.sourceforge.net/
There is not much to see there, most of the wiki is filled with spam...
--
JanC
Be strict when sending and tolerant when receiving.
RFC 1958 - Architectural Principles of the Internet - section 3.9
--
. # here's an example of if statement in python.
.
. x=-1
. if x0:
. print 'neg'
. elif x==0:
. print 'zero'
. elif x==1:
. print 'one'
. else:
. print 'other'
.
. # the elif can be omitted.
. --
. # here's an example of if statement in perl
.
.
On 14 Jan 2005 15:40:27 -0800, yaipa [EMAIL PROTECTED] wrote:
Bengt, and all,
Thanks for all the good input. The problems seems to be that .find()
is good for text files on Windows, but is not much use when it is
binary data. The script is for a Assy Language build tool, so I know
Did you try
Michael Hoffman wrote:
Denis S. Otkidach wrote:
Certainly, it can be done more efficient:
Yes, of course. I should have thought about the logic of my code before
posting. But I didn't want to spend any more time on it than I had to. ;-)
Bah, you satanic types are so lazy.
--
engsol wrote:
I didn't fully think through my application before posting my
question. Async com port routines to handle com port interrups
only work well if one has access to the low level operating
system. In that case the receive buffer interrupt would cause
a jump to an interrupt service
On Wed, Jan 12, 2005 at 10:36:54PM -0800, yaipa wrote:
What would be the common sense way of finding a binary pattern in a
.bin file, say some 200 bytes, and replacing it with an updated pattern
of the same length at the same offset?
Also, the pattern can occur on any byte boundary in the
Lucas Raab wrote:
Sorry, the third byte is what I meant.
Fair enough. Note, however, that as someone pointed out,
it's actually the *fourth* of something, and it would not
necessarily be a byte. In fact, in your case, it's not:
typedef unsigned long int word32 ;
void mu(word32 *a)
{
int i ;
Interesting discussion. My own thoughts:
http://www.oreillynet.com/pub/wlg/6224
http://www.oreillynet.com/pub/wlg/6225
Meanwhile, please don't make the mistake of bothering with XQuery.
It's despicable crap. And a huge impedance mismatch with Python.
--Uche
--
Peter Hansen wrote:
So why duplicate the posts by posting them to the newsgroups?
Because he's a well-known pest.
--
Erik Max Francis [EMAIL PROTECTED] http://www.alcyone.com/max/
San Jose, CA, USA 37 20 N 121 53 W AIM erikmaxfrancis
Yes I'm / Learning from falling / Hard lessons
-- Lamya
1 - 100 of 103 matches
Mail list logo