Martin v. Löwis wrote:
>> path += '/' + b
>> UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 1:
>> ordinal not in range(128)
>>
>> Any ideas?
>
> path is a Unicode string, b is a byte string and contains the
> byte \xd0.
>
> The problem is that you have a directory with f
This:
for root, dirs, files in os.walk(search_path):
for f in files:
print f
###
Produces this:
Traceback (most recent call last):
File "/home/brad/Desktop/my_script.pyw", line 340, in -toplevel-
hunt(target_files(search_path, skip_file_extensions(),
skip_file
Bjoern Schliessmann wrote:
> RTFM?
One last things... here's a *very* small sample netstat output from a
threaded py script:
> tcp0 1 192.168.1.100:41066 192.168.17.132:www SYN_SENT
> tcp0 1 192.168.1.100:46412 192.168.5.132:www SYN_SENT
> tcp
Bjoern Schliessmann wrote:
> tubby wrote:
>
>> Have you tried it? Nmap is sequential.
>
> RTFM?
I urge you to actually try it and see for yourself. From my experience,
it sucks... even when only doing 1 port it takes hours regarless of what
the man page implies.
I'l
Bjoern Schliessmann wrote:
> tubby wrote:
>> Right now I'm just prototyping and the threaded hosts portion
>> works very well for my needs. I'd just like to add a threaded
>> ports check and wanted to know if anyone had done something
>> similar in Python.
I have a program written in Python that checks a class B network (65536
hosts) for web servers. It does a simple TCP socket connect to port 80
and times out after a certain periods of time. The program is threaded
and can do all of the hosts in about 15 minutes or so. I'd like to make
it so tha
Dieter Deyke wrote:
>> sout = os.popen('pdftotext "%s" - ' %f)
> Your program above should read:
>
>sout = os.popen('pdftotext "%s" - ' % (f,))
What is the significance of doing it this way?
--
http://mail.python.org/mailman/listinfo/python-list
David Boddie wrote:
> The pdftotext tool may do what you want:
>
> http://www.foolabs.com/xpdf/download.html
>
> Let us know how you get on with it.
>
> David
Perhaps I'm just using pdftotext wrong? Here's how I was using it:
f = filename
try:
sout = os.popen('pdftotext "%s" - ' %f)
David Boddie wrote:
> The pdftotext tool may do what you want:
>
> http://www.foolabs.com/xpdf/download.html
>
> Let us know how you get on with it.
I have used this tool. However, I need PDF read ability on Windows and
Linux and in the future Macs. pdftotext works great on Linux, but poorly
I know this question comes up a lot, so here goes again. I want to read
text from a PDF file, run re searches on the text, etc. I do not care
about layout, fonts, borders, etc. I just want the text. I've been
reading Adobe's PDF Reference Guide and I'm beginning to develop a
better understandin
Ross Ridge wrote:
> tubby wrote:
>> Silly question, but here goes... what's a good way to determine when a
>> file is an Open Office document? I could look at the file extension, but
>> it seems there would be a better way. VI shows this info in the files:
ine when I need to do that versus
just reading the file.
Thanks,
Tubby
--
http://mail.python.org/mailman/listinfo/python-list
Does a py script written to open and read binary files on Windows affect
files on a Linux or Mac machine in a negative way? My concern is
portability and safety. I want scripts written within Windows to work
equally well on Linux and Mac computers.
Is this the safest, most portable way to open
How are Python users dealing with some of the new OASIS Open Document
formats (Open Office) or MS Open XML formats. These formats store data
in a file which is actual a zip archive that contains numerous files and
folders. For example, a file saved from Open Office 2.0 named 'test.odt'
can be u
cyberco wrote:
> Go for wxPython, it'll fulfill all your GUI needs. Handsdown the best
> GUI toolkit I ever ran into.
Thanks a lot! I had no idea wxPython was so easy to use. I added a
progress bar from wx to the app. Less than 20 lines of code and it only
took about 5 minutes!
--
http://mail.p
Hi guys,
I have a Python script that I've prettied-up for Windows users by adding
things like shell.SHBrowseForFolder and win32gui.MessageBox, etc. In
short, it looks like this:
1. Pretty window where user can browse for folder. (instead of typing
path into cmd prompt)
2. win32gui.MessageBox
16 matches
Mail list logo