It's quite weird when I import cx_Oracle in python interactive shell,
it works perfectly.
but when I import cx_Oracle in a *,py script, handled by
mod_python.publisher, it keep reportint :
ImportError: libclntsh.so.10.1: cannot open shared object file: No
such file or directory
Can I anyone have
> (my smtp mail server has been down for a few hours, so you have some other
> responses.)
>
> yes, as far as I can tell from the docs, the 'b' flag doesn't matter in
> Unix/Linux. Note that I haven't actually been on a Unix machine since
> starting with Python, but it matches what else I know. A
2009/5/8 :
> On May 8, 5:08 am, Li Wang wrote:
>> Hi Dave:
>> Thank you very much for you explanation:)
>>
>> > Chances are you forgot the "b" parameter to open(). Unnecessary in Unix,
>> > it
>> > tells the library to *not* translat
2009/5/8 Scott David Daniels :
> Li Wang wrote:
>>
>> So, if I am using python in Linux, do open('file', 'r') and
>> open('file', 'rb') work the same way?
>
> You get identical results, but you ar lying to the reader of your code
Hi Dave:
Thank you very much for you explanation:)
> Chances are you forgot the "b" parameter to open(). Unnecessary in Unix, it
> tells the library to *not* translate \r\n to \n upon read, or the inverse
> on write. In other words, with the "b" parameter, the file is read in
> unchanged.
So
Hi:
Problem solved
Thank you very much, it works, It is my own problem:)
All the best,
Li
2009/5/8 Li Wang :
> 2009/5/8 Chris Rebert :
>> On Thu, May 7, 2009 at 10:04 PM, Li Wang wrote:
>>> Hi all:
>>>
>
>> the file, e.g. open("the_file.xls"
2009/5/8 Chris Rebert :
> On Thu, May 7, 2009 at 10:04 PM, Li Wang wrote:
>> Hi all:
>>
> the file, e.g. open("the_file.xls", "rb")
> Unlike *nix, Windows differentiates between binary and text files,
> hence the need for the "b" flag to spec
Hi all:
I am trying to read a non-text file as a string by using Python
read(), however, it seems there is some thing wrong with it. I can use
read() on text file correctly, but unable to read .xls file correctly.
(The program can read any file correctly in Fedora 10)
Any idea how to solve this p
Hi everyone:
I want to measure the actual memory cost of a particular step in my program
(Python program), does anyone know if there is some function in Python could
help me to do this job? Or should I seek other tools to help me?
Thank you very much!
--
Li
--
Time is all we have
and you ma
Hi everyone:
I want to measure the actual memory cost of a particular step in my program
(Python program), does anyone know if there is some function in Python could
help me to do this job? Or should I seek other tools to help me?
Thank you very much!
--
Li
--
Time is all we have
and you m
2009/4/29 Tim Chase :
>>> You omit some key details -- namely how do you know that
>>> "1001" is 4 bits and not "1001" (8-bits)? If it's a
>>> string (as your current code shows), you can determine the
>>> length. However, if they are actually ints, your code should work fine &
>>> be O(1).
>
2009/4/29 Tim Chase :
>> I want to concatenate two bits string together: say we have '1001' and
>> '111' which are represented in integer. I want to concatenate them to
>> '100' (also in integer form), my method is:
>> ('1001' << 3) | 111
>> which is very time consuming.
>
> You omit some key d
2009/4/29 Tim Chase :
> Li Wang wrote:
>>
>> Hi:
>>
>> If I use an integer to represent bits:
>> e.g. 99 represents '1100011'
>>
>> How can I locate, say the second bit of 99(i.e. '1')?
>>
>> Although bin(99)[4] coul
Hi:
If I use an integer to represent bits:
e.g. 99 represents '1100011'
How can I locate, say the second bit of 99(i.e. '1')?
Although bin(99)[4] could be used to locate it, this transform cost
too much memory (99 only needs 2Bytes, while string '1100011' needs
7Bytes).
Anyone knows how to loca
>> I have a bit-code :'1011011', how can I reverse it to '1101101'?
>>
>> Another question is I know how to transform the string '110' into
>> integer 6, does anyone know how to transform integer 6 to a string
>> '110'?
>>
>> Thank you very much:)
>
> Assuming that you are using 2.6:
>
> a = 0b1011
Hi:
I have a bit-code :'1011011', how can I reverse it to '1101101'?
Another question is I know how to transform the string '110' into
integer 6, does anyone know how to transform integer 6 to a string
'110'?
Thank you very much:)
--
Li
--
Time is all we have
and you may find one day
you
16 matches
Mail list logo