Is there any obfuscator out there that obfuscates the python code (byte
code i guess)???
--
http://mail.python.org/mailman/listinfo/python-list
I am interested in using libdnet with Python, how can I go about
"installing" it on windows?
http://libdnet.sourceforge.net/
Ultimately, I would like to get Scapy
(http://www.secdev.org/projects/scapy/) running on windows...currently
it is a *nix app written in Python, so I think I should be able
so something like,
x = sock.recv(1024)
while (len(x) > 0):
# do stuff
x = sock.recv(1024)
??
So what if the client sends 4 bytes, and then sends 8000 bytes? WIll I
get the first 4 bytes as a separate msg so to speak? Basically i want
to catch each message from the client as a whole.
well on the server, if I have,
x = sock.recv(1024) and the client sends more than 1024 bytes...the
server won't receive it all right? So I am wondering, how do I setup
the server to handle some unknown amount of data?
Note, in previous post it should have been, x = sock.recv(1024) not x =
se
By the way, what is 'rb' and 'wb' ?
Also, when I create a client/server sockets I do something like...
SERVER
---
server.bind(('', 4321))
(sock, addr) = server.accept()
x = server.recv(1024)
CLIENT
client.connect(('localhost', 4321))
x = open("abc.txt", "rb")
client.send(x)
thanks Phil, the problem was that I was not using "rb" and "wb".
thanks.
--
http://mail.python.org/mailman/listinfo/python-list
I have a image file on my pc, say a .jpg. Basically I want to setup a
client/server socket, and I want the client to read in the jpg and send
it to the server, where the server can write that data into a new file
on the server.
I tried just doing something like..
x = open("abc.jpg")
y = x.read()
so each character in the string is 1 byte? if so, can u point me to
somewhere that states that perhaps?
thanks
--
http://mail.python.org/mailman/listinfo/python-list
Ok, I have the following directory structure
C:\pycode
--> blah.py
--> mynewdir
--> __init__.py
--> abc.py
[[ C:\pycode\mynewdir\abc.py ]]
def doFoo():
print "hi"
def doBar():
print "bye"
[[ C:\pycode\mynewdir\__init__.py ]]
from mynewdir import *
[[ C:\pycode\blah
Thanks for the input. I was just looking for some feedback about which
was better and faster, if an answer exists. However, I am not choosing
Perl or Python b/c of it's RegEx engine as someone mentioned. The
question was just because I was curious, sorry if I misled you to think
I was choosing w
also is it common to have one class per file?
seems weird to have, MyCustomWidget.MyCustomWidget
thanks
--
http://mail.python.org/mailman/listinfo/python-list
Thanks, but I am not familiar with the "__all__" variable, could u give
me an example?
Without using, __all__would i do this in my __init__.py?
import MyCustomWidget1
import MyCustomWidget2
import MyCustomWidget3
etc?
--
http://mail.python.org/mailman/listinfo/python-list
I found some benchmarking (perhaps simple) but search for "The Great
Computer language shootout" look at the original shootout and the
win32 one.
Thomas:
"I doubt the total execution time for all the RegEx queries you ever
ran took
as much time as you just wasted on your little experiment. " .
Well so far from what I have found, Perl is faster than Python for
RegEx, although perl is harder to read.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I am interested in regular expressions and how Perl and Python
compare. Particulary, I am interested in performance (i.e. speed),
memory usage, flexibility, completeness (i.e. supports simple and
complex regex operations...basically is RegEx a strong module/library
in Python?)
Anyone have
What is the best/common way to structure ur python code for an
application?
For example...if I create some custom GUI widgets I have this
C:\stuff
--> gui
--: MyCustomWidget.py
--: TestWidgets.py
so MyCustomWidget.py has one class, class MyCustomWidget: ...
so from TestWidgets.p
Hi,
First, I come from a Java background.
Ok, so I have this idea that I want to create an EventBus...basically
a central class where objects can register themselves as listeners for
different events. This central class also has methods so that objects
can fire events. Something like this...
Thanks for the input.
i am renaming my module to be customthing. I noticed that is how many
python modules are, so I will stick to the "convention".
Thanks for the help.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I have a question about how to define constants.
My directory structure looks like...
C:\
--> abc.py
--> utils
--> __init__.py
--> CustomThing.py
Ok, CustomThing looks like...
TOP = 0
LEFT = 1
class CustomThing:
def __init__(self):
self.foo = "foo"
stefan: i added, "return 1" to my sendFile method on the server...took
care of the error, thanks.
f. petitjean: i cleaned up my code by closing the file, however, when i
tried your exact code above...i got stuck an infinite loop and my PC
speaker beeped over and over :)
thanks.
--
http://mail.
Experient I have been :)
Here is what I am getting now
CLIENT
---
d = xmlrpclib.Binary(open("C:\\somefile.exe").read())
server.sendFile(d)
SERVER
--
def sendFile(tmp):
print "FILE:", tmp
The server receives the file, because it prints it out, but on the
client I get
how would I decode it?
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I am trying to use a Scrollbar for a Listbox. I want a scrollbar
which which has the vertical and horizontal scroll bars. Here is how i
am doing it now, is the only way or "best" way to do it?
# vertical scroll bar for list
self._scrollbarY = Scrollbar(self.myContainer)
Hi,
I want to use XML-RPC to send a file from client-to-server or from
server-to-client. I know XML-RPC supports, int, string etc...not
objects.
I thought i read somewhere that by using pickle or something, that u
could get a string representation of your object (or a file in my case)
and sen
Yea that is what i needed. Can you recommend a good Tkinter site (or
book, but preferably site) about learning Tkinter.
I've tried:
http://www.python.org/moin/TkInter
http://www.pythonware.com/library/tkinter/introduction/
But I am looking for more about events, etc.
Thanks
--
http://mail.pyt
Hi,
I am using Tkinter and I have a Label and a Scale. I want to update
my label everytime the Scale value changes. What is the best way of
doing this? Do i have to bind for every event type? Or is there some
better way? If I do have to bind each type of event to the scale, what
types occur
nevermind, i should access it by
HORIZONTAL
not
Tkinter.HORIZONTAL
since I imported everything from Tkinter already. Thanks anyway
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
When I do something like.
s = Scale(master)
s.bind("", callback)
def callback(self, event):
print event.type
I see "7" printed out. Where are these constants defined for various
event types? Basically i want to do something like...
def callback(self, event):
if event.type == ENT
Hi,
I was reading through the Tkinter tutorial at
http://www.pythonware.com/library/tkinter/introduction/index.htm ...and
it mentions that by doing,
from Tkinter import *
you have access to the constants in Tkconstants, since Tkinter imports
it automatically.
However, in the shell if I do..
f
fredrik...
any ideas on my last post? (copied below for u)
oh and Fredrik, i tried the SingleInstaller linkwhich points to a
script using NSIS. I followed those instructions which generated an
.exe. HOwever, when i run the .exe nothing happens (meaning no
process starts, no output, no
So how there is currently available way to have 1 .exe which includes
everything needed to run a python app?
:sigh:
--
http://mail.python.org/mailman/listinfo/python-list
oh and Fredrik, i tried the SingleInstaller linkwhich points to a
script using NSIS. I followed those instructions which generated an
.exe. HOwever, when i run the .exe nothing happens (meaning no
process starts, no output, no errors, nothing).
any ideas on that? have ever used it?
--
ht
I tried the installer v6...and i generated a spec, and i built the
exe...when i run the exe i get a error popup window from Windows asking
me to send an Error report.
The warnings that were generated during the build all appear to be
"ignorable" as the documentation mentions.
any ideas?
--
http
must have missed it on py2exe front pageand for google i didnt try
that search exactly. Thanks though. I was trying like "one executable
py2exe", etc.
--
http://mail.python.org/mailman/listinfo/python-list
my requirements for getting the OS info havent changed. My first
message says "How can I get the OS Name, such as "Windows XP Pro"."
that's what I wanted all along.
thanks for the information anyway, i believe platform is better than my
previous approach.
thanks
--
http://mail.python.org/m
Hi,
Is there a way to create one .exe using py2exe (or some other
extension/utility that can do it)?
Basically i want to generate one .exe that contains everything my
python app needs to run instead of having a .exe, some .zips, etc.
thanks
--
http://mail.python.org/mailman/listinfo/python-
where can I get wmi module, it doesnt come with Python right?
thanks.
--
http://mail.python.org/mailman/listinfo/python-list
i guess i wanted the result in a nice string like Windows XP instead of
5.1
i guess i'll have to convert it myself, thanks
--
http://mail.python.org/mailman/listinfo/python-list
for more information on web application frameworks check out
http://pyre.third-bit.com/pyweb/
It is a project aimed at helping web app developers to figure out which
frameworks to use, etc.
good luck!
--
http://mail.python.org/mailman/listinfo/python-list
How can I get the OS Name, such as "Windows XP Pro". I know I can do
sys.getwindowsversion but that doesnt return a nice Windows XP Pro
string.
and os.name gives "nt"
thanks.
--
http://mail.python.org/mailman/listinfo/python-list
hi,
how can i use python to figure the ip address of the machine which
the python script is running on? I dont mean like 127.0.0.1but i
want the external IP address (such as ipconfig on windows displays).
any ideas??
THanks
--
http://mail.python.org/mailman/listinfo/python-list
thanks.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I have a question about Python. I know that it is an interpreted
language, meaning a python program is converted to binary on the fly
each time it is run, or compiled.
What would be the purpose of compiling? I guess the compiled python
code (question, is compiled python code called byte c
Jeremy,
Thanks for clearing that up. I am so used to java (i.e.
foo.setLogRequests(0))...that I forgot I could just do, foo.logRequests
= 0.
Learning one day at a time :)
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
Jeremy Jones wrote:
> codecraig wrote:
>
> >Hi,
> > I thought I posted this, but its been about 10min and hasnt shown
up
> >on the group.
> > Basically I created a SimpleXMLRPCServer and when one of its
methods
> >gets called and it returns a response to t
Hi,
I thought I posted this, but its been about 10min and hasnt shown up
on the group.
Basically I created a SimpleXMLRPCServer and when one of its methods
gets called and it returns a response to the client, the server prints
some info out to the console, such as,
localhost - - [14/Apr/2005 1
Hi,
I have a simple script which starts a SimpleXMLRPCServer. A client
connects to the server and executes one of the servers methods. When
the server processes the request and returns it, the server prints some
info out to the console, something like this..
localhost - - [14/Apr/2005 15:47:12
Thanks so much Thomas!!! I added encodings to my setup's...here it is
setup(console=[{"script": 'monkey_shell.py'}], options={"py2exe":
{"packages": ["encodings"]}})
and i did the same for the other python script.
Thanks!!
--
http://mail.python.org/mailman/listinfo/python-list
sorry, I am actually still getting the 500 internal error I reported
earlier.
thanks for ur input.
--
http://mail.python.org/mailman/listinfo/python-list
update to this. I generated an exe for the client and server. They
both run fine, except, when i send a command from the client to server,
the cleint spits out this..
xmlrpclib.ProtocolError:
When I run the .py's by themselves I do not get this. This only occurs
with the generated .exe's.
th
surei posted another thread eariler, which explains much more
related to py2exe..check that out and let me know if that helps.
http://groups-beta.google.com/group/comp.lang.python/browse_thread/thread/4071921987be308d
--
http://mail.python.org/mailman/listinfo/python-list
i want to distribute my python script as an executable. I have tried
py2exe but it caused a problem in my script when I ran it. I know
about Gordon McMillans Installer (which is no longer hosted)..but i
tried that and when i run the .exe it generated, it just crashes (i.e.
Windows wants to send a
Hi,
I tried to take the Monkey Shell script
(http://www.sharp-ideas.net/archives/2005/03/monkey_shell_us.html) and
make it into an executable. I am making an executable for the server
piece (monkey_shelld.py). So my setup.py looks like this
# setup.py
from distutils.core import setup
import py
53 matches
Mail list logo