Search found 542 matches
- Fri Aug 17, 2012 3:40 am
- Forum: API Design
- Topic: Coding Style
- Replies: 42
- Views: 191691
- Thu Aug 16, 2012 6:23 pm
- Forum: API Design
- Topic: Coding Style
- Replies: 42
- Views: 191691
Hhhmmm... I find these ones veeeeeeeeery ugly: # Python Imports # OS from os.path import dirname from os.path import join # Source.Python Imports ... Why not just leave it to that? # Python Imports from os.path import dirname from os.path import join # Source.Python Imports ... Looks easier to read ...
- Thu Aug 16, 2012 1:57 pm
- Forum: API Design
- Topic: Player List Filters
- Replies: 20
- Views: 20678
- Tue Aug 14, 2012 1:04 pm
- Forum: API Design
- Topic: Player List Filters
- Replies: 20
- Views: 20678
- Sun Jul 22, 2012 7:30 pm
- Forum: API Design
- Topic: Using __call__ to execute a command on server/client
- Replies: 8
- Views: 9595
For your given example, this does not sound like a good idea to me at all. We would have to store all available commands for each type within Source.Python itself. This is definitely something we are not willing to do. Player functionality, like that of playerlib, is something that has not even got...
- Sun Jul 22, 2012 2:11 am
- Forum: API Design
- Topic: Configuration files
- Replies: 4
- Views: 6344
It will be a module that will utilize some of the same functionality of cfglib. If you look at GunGame51's cfg structure, you will likely see many of those design concepts integrated as well: http://code.google.com/p/gungame51/source/browse/#svn%2Ftrunk%2Fcstrike%2Faddons%2Feventscripts%2Fgungame51...
- Fri Jul 20, 2012 10:45 pm
- Forum: API Design
- Topic: Configuration files
- Replies: 4
- Views: 6344
Configuration files
Hello
Do we need to parse .cfg files for addon configuration? Is it worth a C++ library for it or should we stay with Python on this thing (like the ES cfglib)?
Do we need to parse .cfg files for addon configuration? Is it worth a C++ library for it or should we stay with Python on this thing (like the ES cfglib)?
- Fri Jul 20, 2012 10:42 pm
- Forum: Whatever
- Topic: General Python question
- Replies: 2
- Views: 4318
- Fri Jul 20, 2012 10:07 pm
- Forum: Whatever
- Topic: General Python question
- Replies: 2
- Views: 4318
General Python question
Hi, is it faster to have a C++ code where you write boost.python mostly than to have Python code with the same? Like import os if __name__ == "__main__": x = [3, 6, 7, 9] z = os.getcwd() # do something else like reading a file and display its contents to the screen and #include <st...
- Fri Jul 20, 2012 4:47 pm
- Forum: API Design
- Topic: Event system discussion
- Replies: 22
- Views: 25959
- Thu Jul 19, 2012 7:19 pm
- Forum: General Discussion
- Topic: Admin System
- Replies: 22
- Views: 22824
If you want to support it, I'm all for that! The only reason why I pushed back on this is because I have my hands full maintaining SP leaving me no time for maintaining an admin system. I can imagine ;) Sure I wanna support it. Just take care of SP working 100% correctly, then we can move on with a...
- Thu Jul 19, 2012 12:51 pm
- Forum: Module/Package Submissions
- Topic: Auth API
- Replies: 10
- Views: 28292
- Thu Jul 19, 2012 12:44 pm
- Forum: API Design
- Topic: Using __call__ to execute a command on server/client
- Replies: 8
- Views: 9595
- Thu Jul 19, 2012 12:33 pm
- Forum: Plugin Development Support
- Topic: Error: _LoadedAddon has no attribute 'globals'
- Replies: 21
- Views: 20119
I actually encountered this error when trying to fix this issue: http://www.sourcepython.com/forums/showthread.php?43-Load-amp-Unload Though, it required that the error occurred in load and then I reload the addon. Yeah I tried to load and then reload it, of course. You might try the new build (jus...
- Wed Jul 18, 2012 10:54 pm
- Forum: API Design
- Topic: Using __call__ to execute a command on server/client
- Replies: 8
- Views: 9595
- Wed Jul 18, 2012 9:29 pm
- Forum: API Design
- Topic: Using __call__ to execute a command on server/client
- Replies: 8
- Views: 9595
Using __call__ to execute a command on server/client
How about something like that: # sp core module import sp_C # just a name for the C++ core, don't know what the name is, so let's assume it's sp_C class Server(sp_C.Server): def __call__(self, *args, **kwargs): # assuming args[0] is a command-string, like 'say "H...
- Wed Jul 18, 2012 9:15 pm
- Forum: Plugin Development Support
- Topic: Error: _LoadedAddon has no attribute 'globals'
- Replies: 21
- Views: 20119
- Wed Jul 18, 2012 8:52 am
- Forum: Plugin Development Support
- Topic: Error: _LoadedAddon has no attribute 'globals'
- Replies: 21
- Views: 20119
You are importing a module that doesn't exist within source.python's search paths. Python then attempts to load your addon and bails out because the module decorators. Because it bails out mid-load, nothing is setup for the module. This is why you don't have a globals attribute. This is to be expec...
- Wed Jul 18, 2012 7:04 am
- Forum: Plugin Development Support
- Topic: Error: _LoadedAddon has no attribute 'globals'
- Replies: 21
- Views: 20119
- Wed Jul 18, 2012 6:58 am
- Forum: Plugin Development Support
- Topic: Error: _LoadedAddon has no attribute 'globals'
- Replies: 21
- Views: 20119