Jump to content
  • 0

Cython - Problem with code


santa12

Question

Hi, I have a problem with cython, namely with cython turned off = then python works fine but on cython I have a problem with the cPickle function.

when booting cython source client, cPickle import exits the game completely without any errors. Does anyone know why this is happening? Does cython have a problem using this function? Apparently it's some python function

 

in short, a client built in the new language cython does not detect this function at all and is nowhere in the client

 

sample code that uses this

	def LoadConfigurations(self):
		try:
			f = open('settings/switchbot.pkl', 'rb')
			self.dict = cPickle.load(f)
			f.close()
		except IOError:
			self.dict = {}	
		
		self.listBox.RemoveAllItems()
			
		lineWidth = self.listBox.GetWidth()
		if len(self.dict) > self.__GetViewItemCount():	
			lineWidth -= 20
			
		self.__AdjustScrollbar()
			
		for key in self.dict.iterkeys():
			config = self.dict.get(key, None)
			if not config:
				continue
				
			line = self.ConfigurationLine(lineWidth)
			line.Load(key, config["name"])
			line.SetLoadEvent(ui.__mem_func__(self.__OnApplyConfiguration))
			line.SetDeleteEvent(ui.__mem_func__(self.__OnDeleteConfiguration))
			self.listBox.AppendItem(line)
			
			self.listItems[key] = line

	def SaveConfigurations(self):
		with open('settings/switchbot.pkl', 'wb') as f:
			cPickle.dump(self.dict, f)

 

Edited by santa12
Link to post

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Activity

    1. 0

      Sash bug +19% absorb

    2. 1

      TRANSMUTATION WITH BLESSING SCROLL AND MAGIC STONE 100%

    3. 1

      [HowTo] The "hello world" of metin2

    4. 1

      TRANSMUTATION WITH BLESSING SCROLL AND MAGIC STONE 100%

    5. 0

      Sash absorb bug

    6. 0

      Debug DB vanilla Core

    7. 0

      Give item after kill monster [c++]

    8. 6

      Current Peer host names...

  • Recently Browsing

    No registered users viewing this page.

Shoutbox

Shoutbox

Chatroom Rules

 

Join our Discord

A request for help = Shoutbox Ban

Be respectful & Respect the rules

 

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.