New submission from billiejoex:
asyncore's module readwrite() function, used when invoking
asyncore.loop(use_poll=1), erroneously calls handle_read_event() when
receiving OOB (Out Of Band) data. handle_expt_event() should be called
instead.
The patch in attachment does that.
In addition I
billiejoex added the comment:
+1.
Another inconsistency are the argument names used in __init__ methods,
one called sock and the other called conn:
asyncore:
def __init__(self, sock=None, map=None):
asynchat:
def __init__ (self, conn=None):
--
nosy: +billiejoex
billiejoex added the comment:
The current implementation of asynchat.async_chat.initiate_send method
doesn't look at what is specified in ac_out_buffer_size attribute which
represents the buffer size of the outgoing data defaulting to a maximum
of 4096 bytes to send in a single socket.send
New submission from billiejoex:
uu module on line 53 erroneously tries to catch an AttributeError
exception type.
try:
mode = os.stat(in_file).st_mode
except AttributeError:
pass
This is not correct since os.stat(), as far as I know
billiejoex added the comment:
What about other platforms?
I think it should be an alias for all platforms which does not support
symbolic links, not only Windows.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1364
billiejoex added the comment:
Thanks.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1364
__
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman
Changes by billiejoex:
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1345
__
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs
New submission from billiejoex:
os module documentation says about lstat():
lstat( path)
Like stat(), but do not follow symbolic links.
Availability: Macintosh, Unix.
This is not true since os.lstat() is also available under Windows
(tested under Win XP sp, Python 2.5).
Moreover
billiejoex added the comment:
What does this do when a line longer than 4096 bytes
is found? Does it report an error to the SMTP client?
That's my only concern.
Sorry for replying so late.
No, it does not report the error and this is bad.
I've searched through RFCs and I found that RFC
Changes by billiejoex:
Added file: http://bugs.python.org/file8587/smtpd.diff
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1745035
_
___
Python-bugs-list mailing list
Hi there,
into a module of mine I 'warn' a message if a certain situation
occurs:
def add_anonymous_user(permissions=('r'):
if 'w' in p:
import warnings
warnings.warn(it's not rencommended assigning 'w'
permission to anonymous user., RuntimeWarning, stacklevel=2)
I'd
On 10 Set, 17:15, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
On Sep 10, 7:08 am, billiejoex [EMAIL PROTECTED] wrote:
Hi there,
into a module of mine I 'warn' a message if a certain situation
occurs:
def add_anonymous_user(permissions=('r'):
if 'w' in p:
import
Hi there,
I'm having problems with creating an installer for a module of mine by
using distutils. I'll try to explain my problem as clear as I can
(sorry but English is not my first language).
This is the structure of my module:
setup.py
mypackage/
__init__.py
import os
hasattr(os, 'sep')
True
hasattr(os.path, 'sep')
True
By chance I noticed it.
Are there differences (I think not...)?
IMHO, if there are no differences os.path.sep should be removed since
it may be confusing.
--
http://mail.python.org/mailman/listinfo/python-list
Gabriel Genellina wrote:
As someone already suggested, why don't you use TemporaryFile or
NamedTemporaryFile and avoid such problems?
Because I don't want file to be removed after closing.
--
http://mail.python.org/mailman/listinfo/python-list
Hi there.
I'm trying to generate a brand new file with a unique name by using
tempfile.mkstemp().
In conjunction I used os.fdopen() to get a wrapper around file
properties (write read methods, and so on...) but 'name' attribute
does not contain the correct file name. Why?
import os
import
Thanks all.
Another question: I have to open file for writing ('wb') but I noticed
that both tempfile.mkstemp() and os.fdopen() accept a mode argument.
It's not clear *when* do I have to specify such mode. When using
tempfile.mkstemp?
fileno, name = tempfile.mkstemp(text=False)
fd =
New submission from billiejoex:
http://docs.python.org/lib/module-asyncore.html
asyncore documentation erroneously report ac_in_buffer_size and
ac_out_buffer_size attributes which does not exist in
asyncore.dispatcher class. They're used in asynchat.async_chat class,
instead.
Moreover, asynchat
On 24 Ago, 09:57, Antoon Pardon [EMAIL PROTECTED] wrote:
I have to write a little program that has to run on a number of hosts.
Versions of python range from 2.2.3. to 2.4.2.
The easiest way to implement the necessary behaviour seems to me to
use the tarfile module. However that was only
On 23 Ago, 10:38, Tim Golden [EMAIL PROTECTED] wrote:
billiejoex wrote:
Hi there. I'm writing a modification for a FTP server library I'm
maintaining.
Depending on the system I'd want to temporarily impersonate the logged
user to perform actions on filesystem.
Something like:
try
On 23 Ago, 13:13, Chris Mellon [EMAIL PROTECTED] wrote:
On 8/23/07, billiejoex [EMAIL PROTECTED] wrote:
On 23 Ago, 10:38, Tim Golden [EMAIL PROTECTED] wrote:
billiejoex wrote:
Hi there. I'm writing a modification for a FTP server library I'm
maintaining.
Depending
On 23 Ago, 23:20, Steve Holden [EMAIL PROTECTED] wrote:
billiejoex wrote:
On 23 Ago, 13:13, Chris Mellon [EMAIL PROTECTED] wrote:
[...]
Note that running your process as a user with enough priviledges to
impersonate another user pretty much eliminates all the benefits of
running as a low
On 22 Ago, 03:11, Evan Klitzke [EMAIL PROTECTED] wrote:
On 8/21/07, codesite-noreply [EMAIL PROTECTED] wrote:
On 22 Ago, 02:09, Evan Klitzke [EMAIL PROTECTED] wrote:
On 8/21/07, billiejoex [EMAIL PROTECTED] wrote:
Hi there,
I'm facing a case where I need to get the traceback
Hi there. I'm writing a modification for a FTP server library I'm
maintaining.
Depending on the system I'd want to temporarily impersonate the logged
user to perform actions on filesystem.
Something like:
try:
change_user('user', 'password')
os.rmdir('dir')
except:
print some error
On 21 Ago, 23:07, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
Hey all,
I've been using libgmail to send out automated notification emails for
my company's nightly regression testing. Last night these emails
started failing, though the python code has not changed. I updated to
the latest
Hi there,
I'm facing a case where I need to get the traceback outptut when
occurring an exception.
I solved such problem by using traceback module in conjunction with
StringIO:
import StringIO, traceback
try:
raise Exception
except:
f = StringIO.StringIO()
traceback.print_exc(file=f)
On 21 Ago, 22:36, Brad Johnson [EMAIL PROTECTED] wrote:
Joel Andres Granados joel.granados at gmail.com writes:
Hello list:
I have tried various times to use an IDE for python put have always been
disapointed.
Not sure which platform you're on, but I've really liked PyScripter for the
Hi all,
I would like to use tempfile module to generate files having unique
names excepting that I don't want them to be removed after closing.
Does it is possible?
--
http://mail.python.org/mailman/listinfo/python-list
On 9 Ago, 20:31, [EMAIL PROTECTED] wrote:
On Aug 9, 11:21 am, billiejoex [EMAIL PROTECTED] wrote:
Hi all,
I would like to use tempfile module to generate files having unique
names excepting that I don't want them to be removed after closing.
Does it is possible?
Looks like
On 25 Lug, 09:48, [EMAIL PROTECTED] wrote:
Hi,
I write the following script to retrieve a part of a large file
from a FTP site:
import ftplib
class ftp_getter(object):
def __init__(self):
self.handle = ftplib.FTP('ftp_server_address')
Hi there.
I'm setting up test suite for a project of mine.
From test suite, acting as a client, I'd like to know, in certain
situations, if the socket is closed on the other end or not.
I noticed that I can detect such state if a call to socket.read()
returns 0 but it seems a little poor to me.
On 25 Lug, 16:37, Roy Smith [EMAIL PROTECTED] wrote:
This isn't really a Python question, it's a Berkeley Socket API question.
You don't say, but I assume you're talking about a TCP (i.e. SOCKSTREAM)
connection?
Yes.
The answer is you can use the select() system call to detect exceptional
Hi there,
In an asyncore based FTP server I wrote I should be able to receive
OOB data from clients.
A client sending such kind of data should act like this:
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('127.0.0.1', 21))
s.sendall('hello there\r\n',
If it could be useful I attach the complete server application I used
for doing tests:
code
import asyncore, asynchat, socket, os
class Handler(asynchat.async_chat):
def __init__(self, sock_obj):
asynchat.async_chat.__init__(self, conn=sock_obj)
self.remote_ip,
Douglas Wells wrote:
Second, when I look at the FTP specification, I don't find the
concept of OOB anywhere. So, it's not clear what OOB data would
mean in terms of the defined FTP commands in any case.
Steve Holde wrote:
You are correct, however, in stating that the FTP
protocol doesn't
os.listdir(path) return a list of file names independently if the path-
argument used is absolute or relative:
os.getcwd()
'/home/user'
os.listdir('Desktop')
['file.py']
os.listdir('/home/user/Desktop')
['file.py']
glob.glob, instead, return file names only if given path is relative:
On 20 Giu, 06:52, John Nagle [EMAIL PROTECTED] wrote:
billiejoex wrote:
Hi there,
unfortunately, I'm compelled to apply a sort of monkey patching at the
code of an existing libreary that I can't modify directly.
...
...(if it is possible) how can I get, from method called, the name
Hi there,
unfortunately, I'm compelled to apply a sort of monkey patching at the
code of an existing libreary that I can't modify directly.
Here's my question
Having such code:
class test:
def caller(self):
self.b()
def called(self):
pass
...(if it is possible) how can
On 19 Giu, 22:50, Stefan Sonnenberg-Carstens
[EMAIL PROTECTED] wrote:
billiejoex schrieb:
Hi there,
unfortunately, I'm compelled to apply a sort of monkey patching at the
code of an existing libreary that I can't modify directly.
Here's my question
Having such code:
class test
Hi there,
I've noticed that os.path.normpath does not collapse redundant
separators if they're located at the beginning of the string:
print os.path.normpath('/a//b//c')
\a\b\c
print os.path.normpath('//a//b//c')
\\a\b\c
Is it intentional or is it a bug?
--
On 14 Giu, 22:35, Michael Hoffman [EMAIL PROTECTED] wrote:
Intentional.
http://en.wikipedia.org/wiki/Path_(computing)#Universal_Naming_Conven...
--
Michael Hoffman
Got it.
Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
On 14 Giu, 19:25, samuraisam [EMAIL PROTECTED] wrote:
FTP LST/LIST/NLST date field formatting function for all those seekers
out there...
import time
import datetime
def ftpdateformat(value):
Formats dates from most FTP servers
if : in value: # within 6 months
return
On 8 Giu, 16:54, Dave Borne [EMAIL PROTECTED] wrote:
I'm trying to figure out how to use FTP/SSL (FTPS) - just as a client. Can I
do this in Python? Is everything I need in ftplib? Where else do I look? And
- any good newbie references on using FTPS?
Hi, Nancy,
I'm not sure if ftplib can
On 14 Mag, 06:51, Paul Kozik [EMAIL PROTECTED] wrote:
I have trouble finding a solid example for what I need. Python.org and
other sites provide simple examples, but they appear more intended for
servers that simply send one peice of data to the client.
Not a big deal. asynchat / asyncore are
On 14 Mag, 06:51, Paul Kozik [EMAIL PROTECTED] wrote:
I have trouble finding a solid example for what I need. Python.org and
other sites provide simple examples, but they appear more intended for
servers that simply send one peice of data to the client.
Not a big deal. asynchat / asyncore are
On 26 Apr, 16:29, Florian Demmer [EMAIL PROTECTED] wrote:
Hi!
I have a number of ftp uploads running in parallel using
ftplib.storbinary and threading and in case one of them fails I need
to interrupt all the others (but not exit the program completely)...
do you guys have an idea how i
On 24 Apr, 19:51, Viewer T. [EMAIL PROTECTED] wrote:
I would like to know which modules I would need in order to create
peer-to-peer chat program in python using Tkinter.
If I would need modules that do not come packaged with python, I would
appreciate information on where I can get them.
Hi,
I developed an ftp-server library and now I would like to add support
for SSL/TLS as described in RFC 2228: http://tools.ietf.org/html/rfc2228
Currenlty I'm searching for documentation about this subject and I
would like to start to ask some questions:
- I noticed that socket module provides
I wish to do some low level network stuff using python.
I've googled somewhat and came up with pylibpcap[1], trouble is I
can't compile it on my Ubuntu 6.10 workstation.
I would suggest pcapy:
http://oss.coresecurity.com/projects/pcapy.html
Higher level, easier Object-Oriented API and support
On 20 Mar, 17:44, John Nagle [EMAIL PROTECTED] wrote:
When you ask questions like this, please specify what
operating system you're using. Thanks.
That was a Linux Ubuntu 6.10. I submitted a bug report on sourceforge:
Hi,
I'm writing a small asyncore-based server application serving a lot of
clients. When I have to handle more than 1021 client simoultaneously
the 'binded' socket object raises an error:
[...]
connections: 1018
connections: 1019
connections: 1020
connections: 1021
Traceback (most recent call
or higher
Bug reports / Contacts
billiejoex -_[AT]_- gmail (dot) com
--
http://mail.python.org/mailman/listinfo/python-announce-list
Support the Python Software Foundation:
http://www.python.org/psf/donations.html
frameworks.
pyftpdlib is actually the most complete RFC959 FTP server
implementation available for Python language.
Requirements
==
Python 2.2 or higher
Bug reports / Contacts
billiejoex [EMAIL PROTECTED] gmail (dot) com
--
http://mail.python.org/mailman/listinfo/python-list
frameworks.
pyftpdlib is actually the most complete RFC959 FTP server
implementation available for Python language.
Requirements
==
Python 2.2 or higher
Bug reports / Contacts
billiejoex -_[AT]_- gmail (dot) com
--
http://mail.python.org/mailman/listinfo/python-list
frameworks.
pyftpdlib is actually the most complete RFC959 FTP server
implementation available for Python programming language.
Requirements
==
Python 2.2 or higher
Bug reports / Contacts
billiejoex -_[AT]_- gmail (dot) com
--
http://mail.python.org/mailman/listinfo/python
On 5 Mar, 15:13, Duncan Booth [EMAIL PROTECTED] wrote:
billiejoex [EMAIL PROTECTED] wrote:
Hi all,
I'm proud to announce the first beta release of pyftpdlib available at
the following urls:
Announcing it once will do. Three times with minor edits is a bit much.
I'm sorry. I removed them
Hi all. I noticed that with the original pcap sniffing library it is
possible to listen on multiple devices by using select() or poll()
function.
These function aren't present in pcapy module. Do you got any suggestion to
avoid this problem?
--
If you are intrested in speed my personal advice is to use UDP insted of
TCP.
The great majority of network games use it.
Here's a simple UDP implementation:
http://www.evolt.org/article/Socket_Programming_in_Python/17/60276/
For an online game I'm developing I need some advice concerning
Impacket module can helps you to construct the ip/icmp packet structure,
then you can send the packet and wait for the ECHOREPLY by using a
RAW_SOCKET.
Here's an example:
http://oss.coresecurity.com/impacket/ping.py
Cheers
I need a simple script to run the ping command with some parameters
Hi all. I'm searching for a portable (working on *nix and win32) function
that executes a system command and encapsulate its output into a string.
Searching for the web I found this:
os.popen('command').read()
It is perfect but when che command return an error the funciotn returns an
empy
Thank you for your help but I'm searching a different way.
Moreover it doesn't work always (for exaple: try a 'dir' command).
Because of I'm implementing a remote shell the
[[os.popen('command').read()]] rapresents the best for me because it can
also accepts arguments direclty (for example:
Thanks for suggestions.
I'll try one of these solutions soon.
--
http://mail.python.org/mailman/listinfo/python-list
Hi all. The source below is a simple icmp sniffer made with pcapy.
To decode packets I'm using the EthDecoder() function that returns a
rapresentation of the packet including ICMP type, ICMP code, IP source and
IP destination.
All I need, now, is to get the ip src and ip dst only but I don't
Hi all. I'm trying to make a simple icmp sniffer by using SOCK_RAW.
The code below works but ONLY if I first use the sendto() function.
Does anybody knows why?
Regards
from socket import *
import select
def recv():
while 1:
if s in select.select([s],[],[],99)[0]:
reply =
Clear. Thank you all.
--
http://mail.python.org/mailman/listinfo/python-list
Hi all. I'm sorry for a noob question like this but I'll try to ask it
anyway.
One of the greatest problem that may discourage a new user to choose Python
language is it's interpreted nature.
Another important problem is that no interpreter is installed on Windows
machine by default and this
I'm sorry. Maybe you misunderstanded.
I know the great advanteges deriving by using interpretation too, I
appreciate it very much (I'm newbie in Python and the interpeter really
helps me out in many situations), but a 'pure' interpretated language needs
obligatorily an interpreter and (sorry
there are noob questions and there are uneducated questions, yours
are of the latter ( actually yours are STATEMENTS not questions ), and
just trolling for what it is worth, if you would take the time to read
what Python is and why it is you would not be asking these questions.
I'm really
Hi all. Hi would like to use two threads in a program but all the examples I
found on the net use oop programming that I doesn't love too much. :-)
Can you code me a short example in wich two different functions are executed
at the same time, plz?
Thank you all.
--
Thank you for your helping.
--
http://mail.python.org/mailman/listinfo/python-list
I wanted the round up the number (5.0 = 5.0, not 6.0.). The ceil funciotn is
the right one for me.
Thanks to all.
Grant Edwards wrote:
On 2005-08-30, Devan L [EMAIL PROTECTED] wrote:
RoundToInt(2.0) will give you 3.
That's what the OP said he wanted. The next bigger integer
after 2.0
Hi all. I tried to compile this little source with py2exe:
http://pastebin.com/350143
...but once I execute the program I encount this error:
C:\src\distsniffer.exe
Traceback (most recent call last):
File sniffer.py, line 24, in ?
File sniffer.py, line 18, in get_int
LookupError: no codec
Really thank you. It works.
--
http://mail.python.org/mailman/listinfo/python-list
Hi all. I'd need to aproximate a given float number into the next (int)
bigger one. Because of my bad english I try to explain it with some example:
5.7 -- 6
52.987 -- 53
3.34 -- 4
2.1 -- 3
Regards
--
http://mail.python.org/mailman/listinfo/python-list
Thank you. :-)
--
http://mail.python.org/mailman/listinfo/python-list
Awesome. :-)
Thank you.
You may find that CTRL/Break works even when CTRL/C doesn't.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
--
http://mail.python.org/mailman/listinfo/python-list
Hi all. I'm using pcapy module to sniff some ICMP packets. I would like to
modify this source:
http://www.google.it/search?hl=itq=pcapybtnG=Cerca+con+Googlemeta=
and visualize only the DATA filed of the sniffed packets instead of all
fields that are generally visualized (for example: ip src, ip
I'm really sorry. I was talking about this source:
http://oss.coresecurity.com/impacket/sniff.py
...but nevermind. I discovered the get_data_as_string() function that
resolved my problem
Sorry, but *which* source are you talking about? The link you provided
appears to be merely a page of
Hi all.
I was wondering if it ispossible to integrate C source in a python project.
Best regards
--
http://mail.python.org/mailman/listinfo/python-list
Than you James. I'll take a look as soon as possible.
It is possible do the contrary (integrates python source in a C project)?
James [EMAIL PROTECTED] ha scritto nel messaggio
news:[EMAIL PROTECTED]
billiejoex wrote:
Hi all.
I was wondering if it ispossible to integrate C source in a python
platforms.
Maybe do can I process the unicode outputs and converting them into valid
strings?
Happy summer and happy coding! :-)
Regards
billiejoex
pcapy.findalldevs()
[u'\u445c\u7665\u6369\u5c65\u504e\u5f46\u6547\u656e\u6972\u4e63\u6964\u5773\u6e6
1\u6441\u7061\u6574r\u445c\u7665\u6369\u5c65
The problem was my winpcap version. I was using the 3.1.
Now, with the 3.0 it works.
Really thanks. :-)
For what it's worth, I can run that on my XP Professional SP2 machine and
it works perfectly:
pcapy.findalldevs()
[u'\\Device\\NPF_{15310604-FCFC-4016-9D36-14DAA948A600}',
Hi all. I got a problem when using socket modules.
By using them I can't stop my program by pressing ctrl+c.
The only way to doit is by killing the python.exe process manually.
Is there a solution to avoid this?
Regards
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for your help. Like you suggested I converted the integer value in a
string one by using the repr() funtion applied on the print:
print '%d \n %s' %(count, repr(iface))
The program now permit me to select the interface. The output is in a
strange hex-similar form:
C:\Python24test.py
0
Sorry... the text has been wrong formatted. Read this, plz
Thanks for your help. Like you suggested I converted the integer value in a
string one by using the repr() funtion applied on the print:
print '%d \n %s' %(count, repr(iface))
The program now permit me to select the interface. The output
Moreover the getInterface() function seems to be unexistent:
from pcapy import *
getInterface()
Traceback (most recent call last):
File stdin, line 1, in ?
NameError: name 'getInterface' is not defined
Maybe it can be used only on *nix platforms?
--
Hi!
I made a little, simple program that sends strings over an ICMP packet.
The source here:
http://billiejoex.altervista.org/a1.txt
Now all I need is create a simple network sniffer able to sniff the ICMP
packets and print the strings on the screen.
A useful library known in a lot of other
Thank you for your fast reply. You're right. I'll be more specific, sorry.
The example source is the one you can find on the 'Impacket' page on the
same site of pcapy:
http://oss.coresecurity.com/impacket/sniff.py
I use a Win XP prof sp2 system, python ver. 2.4.1.
Here's the output:
for simply sniff network traffic?
I made a simple 'data over ICMP' client that sends
packets containing strings:
http://billiejoex.altervista.org/a1.txt
...now I have to develop a simple server that
sniffs them.
Greetings
billiejoex
--
http://mail.python.org/mailman/listinfo/python-list
89 matches
Mail list logo