read string in bits
hi, is there a way to read a character/string into bits in python? i understand that character is read in bytes. Do i have to write a function to convert it myself into 1010101 or there is a library in python that enable me to do that? -- http://mail.python.org/mailman/listinfo/python-list
Re: read string in bits
On Jan 14, 3:32 pm, Chris Rebert wrote: > On Tue, Jan 13, 2009 at 11:21 PM, ts wrote: > > hi, is there a way to read a character/string into bits in python? > > > i understand that character is read in bytes. Do i have to write a > > function to convert it myself into 1010101 or there is a library in > > python that enable me to do that? > > It's not quite clear to me what you mean, but here are 2 guesses: > - If you want to convert an ASCII character to its ASCII integer > value, use ord() > - If you want to convert an integer into a string of its base-2 > representation, use bin() [requires Python 2.6, I think] > > Cheers, > Chris > > -- > Follow the path of the Iguana...http://rebertia.com hi, bin() is what i'm looking for. But only python 2.4 is available to me. Is there a replacement of bin() in python 2.4? -- http://mail.python.org/mailman/listinfo/python-list
python3 fail to start
i just install the python 3.1 dmg onto my mac. when i run python3, it fail with : Fatal Python error: Py_Initialize: can't initialize sys standard streams LookupError: unknown encoding: Abort trap couldnt understand the problem. anyone can help? -- http://mail.python.org/mailman/listinfo/python-list
stop/start windows services -python command
hello all,what is the command to stop and start windows services ? i can't install win32serviceutil bec am using latest python version. -- https://mail.python.org/mailman/listinfo/python-list
Python code change
Im trying to run a Python application but im stuck on a problem. The application requires a log in and password to run the application. The only problem that I'm having is that the code was written to connect to a data base and from there it sees the username and password that is linked to the data base. The file application was in .pyc, I already uncompyled to py. I was wondering if there is any way that I can change the code to where the log in and username are in the code and not in the database with the same outcome of course. I can send you the code if that'll be helpful? Thank you. -- https://mail.python.org/mailman/listinfo/python-list
Prevent Modification of Script?
Is it possible to prevent modification of a python file once its been deployed? File permissions of the OS could be used..but that doesn't seem very secure. The root of my question is verifying the integrity of the application and the scripts being run. Is this possible, if so, how? -- http://mail.python.org/mailman/listinfo/python-list
Re: Prevent Modification of Script?
On Apr 4, 6:10 pm, Michael Ekstrand <[EMAIL PROTECTED]> wrote: > One significant factor: are you worried about other > users on your systems (or other users who share systems with you under a > third party's control), or are you worried about what people will do on > their own systems? Michael, Ben & others: The short answer is others on a shared system, or malware that could modify the scripts. I'm new to python programming and there are just some paradigms I'm having trouble grasping. If the scripts can be modified (very easily), how can the application be trusted? i.e. If its an address book, then it would be trivial for malware to modify the script to override data or send it somewhere else... It would also seem like it makes user authentication through a password/ username, or encryption useless. The script could easily be modified to by-pass authentication and encryption could be disabled. Please correct any wrong assumptions that I might be making.. In a compiled application its not impossible to by pass the code.. but its not so easy. Perhaps this is just a side-effect of being a scripted language - not a flaw, just me trying to use it for something its not well suited for. - Kiel -- http://mail.python.org/mailman/listinfo/python-list
Re: Hide the python-script from user
On Apr 6, 3:19 pm, hlubenow <[EMAIL PROTECTED]> wrote: > recently there was a thread about hiding the python-script from the user. > The OP could use Interesting - thanks -- http://mail.python.org/mailman/listinfo/python-list