M
M
Millerish2016-06-22 16:49:09
Ruby on Rails
Millerish, 2016-06-22 16:49:09

How to properly build an application in py2exe?

Good afternoon!
Tell me where the error is, I figure out how to build an exe from python. I am using py2exe.

C:\Python27\python.exe setup.py py2exe

The application itself starts without errors, but behaves as if it does not have access to the Internet. application .

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Sidorov, 2015-11-19
@bismoney

or filter directly in the query

Post
  .where.not(id: @posts_hot.map(&:id))
  .where.not(id: Post.where(post_block_id: 2)) # magic number anipattern. лучше заменить на константу
  .where.not(id: Post.joins(:post_asset).where.not(post_asset: { quote: nil }))
  .order(created_at: :desc)
  .limit(15)

or filter after query in code
Post
  .includes(:post_asset)
  .where.not(id: @posts_hot.map(&:id))
  .order(created_at: :desc)
  .limit(15)
  .select { |post| post.post_block_id != 2 }
  .select { |post| post.post_asset.try :quote }

R
Ruslan Ezhgurov, 2016-07-07
@Millerish

Just write setup.py py2exe

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question