The idea is a risk game application and data collected and controlled by a
gameserver, which happens to be a webserver too.
But for learning the principles, i want to start with tic-tac-toe multiplayer.
Thanks for your answers, I will read all your advices first now.
--
http://mail.python.org/
hi,
I struggle for some days about a "model" for a multiplayer game application.
I read so much from my enemy Google, i got lost by all that info and dont know
which path i should chose.
a multiplayer game application, sending/receiving instantly every change in
the game to a central webserver,
Hi all,
from python I post data to a webpage using urllib and can print that content.
See code below.
But now i am wondering how to trace sessions? it is needed for a multiplayer
game, connected to a webserver. How do i trace a PHP-session? I suppose i have
to save a cookie with the sessionID
thanks!
solved with:
import urllib.request
import urllib.parse
user = 'user'
pw = 'password'
login_url = 'http://www.riskopoly.nl/test/index.php'
data = urllib.parse.urlencode({'user': user, 'pw': pw})
data = data.encode('utf-8')
# adding charset parameter to the Content-Type header.
request =
Hi,
i just try to connect to a website, read that page and display the rules get
from it.
Then i get this error message:
File "D:/Python/Py projects/socket test/sockettest.py", line 21, in
fileobj.write("GET "+filename+" HTTP/1.0\n\n")
io.UnsupportedOperation: not writable
My code:
# imp
Come check out http://www.thetutorialspot.com
--
http://mail.python.org/mailman/listinfo/python-list
hey, thanks, that works fine. I wrapped it around, done a lot of tests
and it works fine.
Just had done a few other things to make it stable.
cheers.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
thats the reason why its not working. Imagine the end() method of the
thread object is called so the C++ Function is opened where the code
for this method is in.
At a line the Code ...->End() is called which waits that the C++
Thread class
is finished. BUT here is the problem: In the Method o
Hi!
I have a big problem I can't solve and I hope anyone of you can help
me. I use the Python C API and in C++ I have a class which represets a
thread object, similiar to the thread class of the known Python Thread
class but with some needed additions so thats the reason why I have to
built my own
On 16 Apr., 11:08, Piet van Oostrum wrote:
> > googler.1.webmas...@spamgourmet.com (g1w) wrote:
> >g1w> hi, yes, thats true, Alan Touring told us, so it would be nice to let
> >g1w> the user abort it.
> >g1w> Is there a chance for windows, too?
>
> I don't know. I have no access to Python on W
hi, yes, thats true, Alan Touring told us, so it would be nice to let
the user abort it.
Is there a chance for windows, too?
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I just have a design problem and don't know how to solve it. I call a
function which
executes a simple "PyRun_String(...)" command.
imagine the script while 1: pass is executed so the app would hang. Is
there any chance
to break out this PyRun_String-function? I just searched the forums
for t
http://rafb.net/p/Uyb5Ps45.html
Pelase note, when I call PyObject_CallObject(...) in the wrapped C
register(..) method it works fine.
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
I have a problem with PyEval_EvalCode(...)
I compile the following code and execute them with PyEval_EvalCode
(...)
class MyClass(mod.Upper):
pass
register(MyClass) #just the type, not the instance
Thats all. So register(...) is a Python C API method so i take the
type and store
it in
Hi!
Okay, thats just the question. I did that what you wrote but it
doesn't really works.
What is, if Py_SetProgramName() gets a NULL Pointer, if argv[0] is
empty?
Well, the problem is, in my opinion that os.environ returns some paths
in python.exe
and in my embedded interpreter if I call os.envi
Hi!
Thanks. Well, os.py is found and all the others which don't need a
library.
I tested this:
I execute Py_Main(...) in my app which executes the console
interpreter and
i tried to execute "import socket" which works.
So Py_Main has something what my created PyRun_SimpleString doesn't
have.
Ma
Hi!
Okay, I checkede Py_Main(...) and called some python code there. There
it works too. So I know whats missing.
sys.environ.. returns nothing.
How can I set the paths with the Python C API?
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
i have a problem. I compiled Python and the socket module so I got
this structure. (all on windows)
C:\test\dll_files\python25.dll
C:\test\my_app
C:\test\dll_files\DLLs\
C:\test\dll_files\python.exe
If I run python.exe I get the console and I can call "import socket"
which
succeeds. I wrote
Hi,
i have a problem. I compiled Python and the socket module so I got
this structure. (all on windows)
C:\test\dll_files\python25.dll
C:\test\my_app
C:\test\dll_files\DLLs\
C:\test\dll_files\python.exe
If I run python I get the console and I can call "import socket" which
succeeds. I wrote a sm
the hook is, how to delete the locals of this function, maybe thats a
workaround?
thanks and bye.
--
http://mail.python.org/mailman/listinfo/python-list
On 26 Jan., 03:25, "Gabriel Genellina" wrote:
> En Sun, 25 Jan 2009 23:46:01 -0200,
> escribió:
>
>
>
> > I have a problm with deallocating stuff. I call a function with this
> > command:
>
> > PyObject *rvalue = PyObject_CallMethod(obj, "execute","",NULL);
>
> > if(rvalue==NULL)
> > PyErr_
Hi!
I have a problm with deallocating stuff. I call a function with this
command:
PyObject *rvalue = PyObject_CallMethod(obj, "execute","",NULL);
if(rvalue==NULL)
PyErr_Print();
else
Py_DECREF(rvalue);
Can it be, that something is missing here? Imagine I allocate an
object of a type:
t
Hi!
Thanks for the fast answer. Yes, its enough but I never thought that
Vista64 is not a real 64-bit operating system :-o.
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
I downloaded Python64 for Windows Vista64 but the value returned from
sys.maxint is just a 32bit integer. I found out, thats by design,
Microsoft decided to make the long value 32bit. What can I do to
compile python 2.6 with maxint of 64bit integers?
Can I replace the int values to a int64 va
Hi!
Woow, thanks. The unix command install_name_tool solved my problem.
Thanks a lot.
--
http://mail.python.org/mailman/listinfo/python-list
yeap, okay, its just the beginning so I didn't know that the framework
is still the dylib file.
Well, I only want to compile python and put the framework in the
subdirectory. Thats all.
And the current state is, that the framework is not found because the
path of the compiled Python
library is hard
Thank you, I found PySys_SetPythonHome() to set the path where the lib
folder of Python is, but I guess they are not really implemented
because they are fixed compiled with an absolute path, aren't they?
Thats the problem. I hadn't compiled Python and I don't know if I
should
compile it as a dylib
Hi! :)
Thank you. I found PySys_SetPythonHome() to set the path where the lib
folder of Python is, but I guess they are not really implemented
because they are fixed compiled for an absolute path, aren't they?
Thats the whole problem. Do you have a suggestoin for the command line
how I can build
hmm.. very strange. Is it so complicated to compile python that I can
move the framework to the app folder?
hmm. thats really strange :-(
/myapp.app
/subfolder/Python.framework
any suggestions? Thank you very muc.
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for the link but I don't want to do a make a python script as
an applicatin, I want to embedd python into a C++ app so thats the
reason why I have to compile Python.
--
http://mail.python.org/mailman/listinfo/python-list
I want to embedd it into my app so on the 'customers'-mac I want
to put python into a subdirectory of my app.
and with the configure command above, that will not work
because the library has to be on every system in /Library/Framework/
so I found out that @executable_path is replaced by the path o
I want to embedd it into another app so on the 'customers'-mac I want
to put python into a subdirectory of my app.
bye
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
I asked something similar a few days ago. Is it possible to compile
Python 2.6.1 with a dynamic path on Mac OSX Leopard 10.5.x. I found
out that I could use @executable_path but I don't know how the
configure command would look like.
This is my current configure command for the default /Libra
Hi!
I asked something similar a few days ago. Is it possible to compile
Python 2.6.1 with a dynamic path on MacOSX?
I don't know how the configure command would look like.
This is my current configure command for the default /Library/
Frameworks/ path:
./configure --with-framework-name=Python --
Hi!
I asked something similar a few days ago. Is it possible to compile
Python 2.6.1 with a dynamic path?
I don't know how the configure command would look like.
This is my current configure command for the default /Library/
Frameworks/ path:
./configure --with-framework-name=Python --with-unive
Hi! :)
>Sorry, there were a few line wrap-arounds in the diff file due to long
>lines but the changes for the four significant lines should be easy to
>do manually.
Hadn't done that before but I found a ressource how to read that
syntax.
x86_64 would be enough. i test that again. Thank you. :)
-
hi, thanks for your help.
May the diff file is wrong? on my system it doesn't work.
Well, set the -enable-universalsdk= path occurs that error.
Hmm. that is really a disaster, isn't it :( hm.
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
I didn't wanted to post 11.000 Lines here, so I uploaded it here:
http://rapidshare.com/files/181425216/config.log.html
--
http://mail.python.org/mailman/listinfo/python-list
hm... any ideas?
--
http://mail.python.org/mailman/listinfo/python-list
Hi searched for "Library/Frameworks/" in the config file and edited it
to "@executable_path".
Well my configure and make command worked very fine. Just 'make
install' aborted after this error message.
test -d "/Applications/Python 2.6" || mkdir -p "/Applications/Python
2.6"
test -d "/Application
Hi!
I compiled Python 2.6.1 on a Mac OSX 10.5.5 Intel machine with this
configure command and got this message
FAILS: ./configure --with-framework-name=Python --with-
universal-archs=all --enable-framework --enable-
universals...@executable_path/my/path/to/app
WORKS: ./configur
Hi!
I have a big problem with compiling Python on MacOSX. I compile it -
everything works
./configure
make
so I get a libpython2.5.a file which I include into a Xcode Project. I
want to static link it with my project (works in Debug mode but not in
Release)
1. Is there a static library flag whi
and merry christmas :)
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
I have a small problem with my python embedded interpreter. I do some
stuff where two threads exists which do some pythons stuff in the same
stuff.
So bpoth call PyGILState_Ensure() which occurs a crash. What can I do,
that one thread waits until the other thread released the gil state?
Than
Hi!
Any ideas? Thanks, :)
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
thats a very interesting point and good to know. I have to release
the GIL but how do I do?
In this case i need PyEval_AcquireLock and PyEval_ReleaseLock?
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
Hi :)
I have a main() function of my app which intializes the Python
Interpreter and some other stuff. When I am finished I call:
PyGILState state = PyGILState_Ensure()
//call PyRun_String()
PyGILStateRelease(state);
The first question is, I found out the API contains other commands lik
PyEval_A
Hi!
I shortened the quode. Everything should be all right and nothing is a
NULL Pointer.
What about PyMarshal_ReadObjectFromFile(FILE* p), this crashs too :-/
hm...
the problem is, on mac everything is all right..
thanks...
--
http://mail.python.org/mailman/listinfo/python-list
Hi! Please remember, that the script crashs on Line
PyMarshal_WriteObjectToFile. :-(
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
Can anyone help me with this issue?
int main (int argc, char * const argv[]) {
Py_Initialize();
FILE* fp = fopen("/Users/test/Desktop/123.pyc","wb");
PyCodeObject* op = (PyCodeObject*)Py_CompileString("import sys
\nprint 'hello'","",Py_file_input);
PyMarshal_WriteObjectToFile
Hi!
I fixed the code. This code snippet runs in a seperate thread:
PyObject *dict=NULL;
PyGILState_STATE state = PyGILState_Ensure();
dict = CreateMyGlobalDictionary();
Hi!
Thank you very much for your answers. I have a menue with a script in
it.
So my app starts a new thread for each script.
So I would like to run two scripts all the same time. Could someone
give me a tip,
what I have to set in my code?
Thank you :)
--
http://mail.python.org/mailman/listinfo/p
Does anyone has a tip?
--
http://mail.python.org/mailman/listinfo/python-list
The automatic reply to this e-mail which you should have
received in response to your e-mail to [EMAIL PROTECTED] has not been defined.
Please contact [EMAIL PROTECTED] for assistance.
--
http://mail.python.org/mailman/listinfo/python-list
This is my first post--I'm a Java developer trying to expand my
horizons. I'm trying to figure out how to find out the last
modification date/time for a file. I've found a reference to
*PyOS_GetLastModificationTime *as an Operating System Utility, but I
can't figure out which module I need to
Your file is attached.--
http://mail.python.org/mailman/listinfo/python-list
The automatic reply to this e-mail which you should have
received in response to your e-mail to [EMAIL PROTECTED] has not been defined.
Please contact [EMAIL PROTECTED] for assistance.
--
http://mail.python.org/mailman/listinfo/python-list
The automatic reply to this e-mail which you should have
received in response to your e-mail to [EMAIL PROTECTED] has not been defined.
Please contact [EMAIL PROTECTED] for assistance.
--
http://mail.python.org/mailman/listinfo/python-list
Thanks to Thomas Wouters for quickly getting mail.python.org back up
once he was notified. The mail backlog seems to be mostly finished.
--
Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/
"It's 106 miles to Chicago. We have a full tank of gas, a half-pack of
cigarette
The automatic reply to this e-mail which you should have
received in response to your e-mail to [EMAIL PROTECTED] has not been defined.
Please contact [EMAIL PROTECTED] for assistance.
--
http://mail.python.org/mailman/listinfo/python-list
The automatic reply to this e-mail which you should have
received in response to your e-mail to [EMAIL PROTECTED] has not been defined.
Please contact [EMAIL PROTECTED] for assistance.
--
http://mail.python.org/mailman/listinfo/python-list
Yes, we know that www.python.org is down. XS4ALL is suffering a power
outage. Yes, they have backup and redundant power, but it's not working
properly for the segment of the building the web server is located in.
Fortunately, mail.python.org is located in a different part of the
building, which i
Yes, we know that www.python.org is down. Please be patient.
--
Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/
"The joy of coding Python should be in seeing short, concise, readable
classes that express a lot of action in a small amount of clear code --
not in reams
The automatic reply to this e-mail which you should have
received in response to your e-mail to [EMAIL PROTECTED] has not been defined.
Please contact [EMAIL PROTECTED] for assistance.
--
http://mail.python.org/mailman/listinfo/python-list
This is a notice from Inter-netcom Mail Server. You sent an email infected with
a virus. Please take action and clean your computerReceived: (qmail 12701
invoked from network); 5 Dec 2004 21:41:05 -
Received: from corporativo?16780-209.pool.etb.net.co.80.167.65.in-addr.arpa
(HELO python.
65 matches
Mail list logo